diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/CHANGELOG.md b/sdk/durabletask/azure-resourcemanager-durabletask/CHANGELOG.md
index ef25979b9188d..ab41c8edc33af 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/CHANGELOG.md
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/CHANGELOG.md
@@ -1,14 +1,112 @@
# Release History
-## 1.2.0-beta.1 (Unreleased)
+## 1.2.0-beta.1 (2026-10-20)
+
+- Azure Resource Manager Durable Task client library for Java. This package contains Microsoft Azure SDK for Durable Task Management SDK. Package api-version 2026-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
-### Breaking Changes
+* `models.TaskQueueThroughput` was added
+
+* `models.DetectorDataset` was added
+
+* `models.TransparentDataEncryptionKeySource` was added
+
+* `models.TaskQueue$Definition` was added
+
+* `models.DetectorStatusId` was added
+
+* `models.DetectorMetadata` was added
+
+* `models.TaskQueue$UpdateStages` was added
+
+* `models.DetectorTableColumn` was added
+
+* `models.UserAssignedIdentity` was added
+
+* `models.TaskQueue` was added
+
+* `models.ManagedServiceIdentity` was added
+
+* `models.DetectorRenderingProperties` was added
+
+* `models.DetectorStatus` was added
+
+* `models.ReplicationRole` was added
+
+* `models.FailoverState` was added
+
+* `models.TaskQueueUpdate` was added
+
+* `models.TaskQueues` was added
+
+* `models.FailoverInstanceProperties` was added
+
+* `models.FailoverInstances` was added
+
+* `models.DetectorType` was added
+
+* `models.TransparentDataEncryptionProperties` was added
+
+* `models.Detectors` was added
+
+* `models.DetectorProperties` was added
+
+* `models.TransparentDataEncryption` was added
-### Bugs Fixed
+* `models.TaskQueue$DefinitionStages` was added
+
+* `models.TransparentDataEncryptions` was added
+
+* `models.ManagedServiceIdentityType` was added
+
+* `models.TaskQueue$Update` was added
+
+* `models.FailoverInstance` was added
+
+* `models.TaskQueueProperties` was added
+
+* `models.DetectorRenderingType` was added
+
+* `models.DetectorTable` was added
+
+* `models.Detector` was added
+
+#### `models.Scheduler$Definition` was modified
+
+* `withIdentity(models.ManagedServiceIdentity)` was added
+
+#### `models.Schedulers` was modified
+
+* `restart(java.lang.String,java.lang.String)` was added
+* `restartWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
+
+#### `DurableTaskManager` was modified
+
+* `taskQueues()` was added
+* `detectors()` was added
+* `failoverInstances()` was added
+* `transparentDataEncryptions()` was added
+
+#### `models.Scheduler` was modified
+
+* `restart()` was added
+* `identity()` was added
+* `restartWithResponse(com.azure.core.util.Context)` was added
+
+#### `models.Scheduler$Update` was modified
+
+* `withIdentity(models.ManagedServiceIdentity)` was added
+
+#### `models.TaskHubProperties` was modified
+
+* `withCapabilities(java.util.List)` was added
+* `capabilities()` was added
+
+#### `models.SchedulerUpdate` was modified
-### Other Changes
+* `withIdentity(models.ManagedServiceIdentity)` was added
+* `identity()` was added
## 1.1.0 (2026-03-09)
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/README.md b/sdk/durabletask/azure-resourcemanager-durabletask/README.md
index 007d17977e86c..4c9cac2f8c7f0 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/README.md
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Durable Task client library for Java.
-This package contains Microsoft Azure SDK for Durable Task Management SDK. Package api-version 2026-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Durable Task Management SDK. Package api-version 2026-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-durabletask
- 1.1.0
+ 1.2.0-beta.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/SAMPLE.md b/sdk/durabletask/azure-resourcemanager-durabletask/SAMPLE.md
index 8545ffd6fcd1b..bac68472250f9 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/SAMPLE.md
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/SAMPLE.md
@@ -1,6 +1,20 @@
# Code snippets and samples
+## Detectors
+
+- [Get](#detectors_get)
+- [ListByScheduler](#detectors_listbyscheduler)
+
+## FailoverInstances
+
+- [CreateOrReplace](#failoverinstances_createorreplace)
+- [Delete](#failoverinstances_delete)
+- [Failover](#failoverinstances_failover)
+- [ForceFailoverAllowDataLoss](#failoverinstances_forcefailoverallowdataloss)
+- [Get](#failoverinstances_get)
+- [ListByScheduler](#failoverinstances_listbyscheduler)
+
## Operations
- [List](#operations_list)
@@ -26,6 +40,7 @@
- [ListByResourceGroup](#schedulers_listbyresourcegroup)
- [ListPrivateEndpointConnections](#schedulers_listprivateendpointconnections)
- [ListPrivateLinks](#schedulers_listprivatelinks)
+- [Restart](#schedulers_restart)
- [Update](#schedulers_update)
- [UpdatePrivateEndpointConnection](#schedulers_updateprivateendpointconnection)
@@ -35,6 +50,203 @@
- [Delete](#taskhubs_delete)
- [Get](#taskhubs_get)
- [ListByScheduler](#taskhubs_listbyscheduler)
+
+## TaskQueues
+
+- [CreateOrUpdate](#taskqueues_createorupdate)
+- [Delete](#taskqueues_delete)
+- [Get](#taskqueues_get)
+- [ListByTaskHub](#taskqueues_listbytaskhub)
+- [Update](#taskqueues_update)
+
+## TransparentDataEncryptions
+
+- [CreateOrReplace](#transparentdataencryptions_createorreplace)
+- [Delete](#transparentdataencryptions_delete)
+- [Get](#transparentdataencryptions_get)
+- [ListByScheduler](#transparentdataencryptions_listbyscheduler)
+### Detectors_Get
+
+```java
+/**
+ * Samples for Detectors Get.
+ */
+public final class DetectorsGetSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/Detectors_Get.json
+ */
+ /**
+ * Sample code: Detectors_Get.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void detectorsGet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.detectors()
+ .getWithResponse("rgopenapi", "testscheduler", "cpuhealth", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Detectors_ListByScheduler
+
+```java
+/**
+ * Samples for Detectors ListByScheduler.
+ */
+public final class DetectorsListBySchedulerSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/Detectors_ListByScheduler.json
+ */
+ /**
+ * Sample code: Detectors_ListByScheduler.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void detectorsListByScheduler(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.detectors().listByScheduler("rgopenapi", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FailoverInstances_CreateOrReplace
+
+```java
+import com.azure.resourcemanager.durabletask.fluent.models.FailoverInstanceInner;
+import com.azure.resourcemanager.durabletask.models.FailoverInstanceProperties;
+
+/**
+ * Samples for FailoverInstances CreateOrReplace.
+ */
+public final class FailoverInstancesCreateOrReplaceSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/FailoverInstances_CreateOrReplace_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: FailoverInstances_CreateOrReplace_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ failoverInstancesCreateOrReplaceMaximumSet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.failoverInstances()
+ .createOrReplace("rgdurabletask", "testscheduler", new FailoverInstanceInner()
+ .withProperties(new FailoverInstanceProperties().withPartnerSchedulerResourceId(
+ "/subscriptions/194D3C1E-462F-4738-9025-092A628C06EB/resourceGroups/rgdurabletask-secondary/providers/Microsoft.DurableTask/schedulers/testscheduler-secondary")),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FailoverInstances_Delete
+
+```java
+/**
+ * Samples for FailoverInstances Delete.
+ */
+public final class FailoverInstancesDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/FailoverInstances_Delete_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: FailoverInstances_Delete_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ failoverInstancesDeleteMaximumSet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.failoverInstances().delete("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FailoverInstances_Failover
+
+```java
+/**
+ * Samples for FailoverInstances Failover.
+ */
+public final class FailoverInstancesFailoverSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/FailoverInstances_Failover.json
+ */
+ /**
+ * Sample code: FailoverInstances_Failover.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void failoverInstancesFailover(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.failoverInstances().failover("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FailoverInstances_ForceFailoverAllowDataLoss
+
+```java
+/**
+ * Samples for FailoverInstances ForceFailoverAllowDataLoss.
+ */
+public final class FailoverInstancesForceFailoverAllowDataLossSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/FailoverInstances_ForceFailoverAllowDataLoss.json
+ */
+ /**
+ * Sample code: FailoverInstances_ForceFailoverAllowDataLoss.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ failoverInstancesForceFailoverAllowDataLoss(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.failoverInstances()
+ .forceFailoverAllowDataLoss("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FailoverInstances_Get
+
+```java
+/**
+ * Samples for FailoverInstances Get.
+ */
+public final class FailoverInstancesGetSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/FailoverInstances_Get_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: FailoverInstances_Get_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ failoverInstancesGetMaximumSet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.failoverInstances().getWithResponse("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### FailoverInstances_ListByScheduler
+
+```java
+/**
+ * Samples for FailoverInstances ListByScheduler.
+ */
+public final class FailoverInstancesListBySchedulerSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/FailoverInstances_ListByScheduler_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: FailoverInstances_ListByScheduler_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ failoverInstancesListBySchedulerMaximumSet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.failoverInstances().listByScheduler("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Operations_List
```java
@@ -43,7 +255,7 @@
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file: 2026-02-01/Operations_List.json
+ * x-ms-original-file: 2026-07-01-preview/Operations_List.json
*/
/**
* Sample code: Operations_List.
@@ -70,7 +282,7 @@ import java.util.Arrays;
*/
public final class RetentionPoliciesCreateOrReplaceSamples {
/*
- * x-ms-original-file: 2026-02-01/RetentionPolicies_CreateOrReplace_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/RetentionPolicies_CreateOrReplace_MaximumSet_Gen.json
*/
/**
* Sample code: RetentionPolicies_CreateOrReplace_MaximumSet.
@@ -98,7 +310,7 @@ public final class RetentionPoliciesCreateOrReplaceSamples {
*/
public final class RetentionPoliciesDeleteSamples {
/*
- * x-ms-original-file: 2026-02-01/RetentionPolicies_Delete_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/RetentionPolicies_Delete_MaximumSet_Gen.json
*/
/**
* Sample code: RetentionPolicies_Delete_MaximumSet.
@@ -120,7 +332,7 @@ public final class RetentionPoliciesDeleteSamples {
*/
public final class RetentionPoliciesGetSamples {
/*
- * x-ms-original-file: 2026-02-01/RetentionPolicies_Get_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/RetentionPolicies_Get_MaximumSet_Gen.json
*/
/**
* Sample code: RetentionPolicies_Get_MaximumSet.
@@ -142,7 +354,7 @@ public final class RetentionPoliciesGetSamples {
*/
public final class RetentionPoliciesListBySchedulerSamples {
/*
- * x-ms-original-file: 2026-02-01/RetentionPolicies_ListByScheduler_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/RetentionPolicies_ListByScheduler_MaximumSet_Gen.json
*/
/**
* Sample code: RetentionPolicies_ListByScheduler_MaximumSet.
@@ -170,7 +382,7 @@ import java.util.Arrays;
*/
public final class RetentionPoliciesUpdateSamples {
/*
- * x-ms-original-file: 2026-02-01/RetentionPolicies_Update_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/RetentionPolicies_Update_MaximumSet_Gen.json
*/
/**
* Sample code: RetentionPolicies_Update_MaximumSet.
@@ -195,9 +407,12 @@ public final class RetentionPoliciesUpdateSamples {
### Schedulers_CreateOrUpdate
```java
+import com.azure.resourcemanager.durabletask.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.durabletask.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.durabletask.models.SchedulerProperties;
import com.azure.resourcemanager.durabletask.models.SchedulerSku;
import com.azure.resourcemanager.durabletask.models.SchedulerSkuName;
+import com.azure.resourcemanager.durabletask.models.UserAssignedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -207,7 +422,7 @@ import java.util.Map;
*/
public final class SchedulersCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-02-01/Schedulers_CreateOrUpdate.json
+ * x-ms-original-file: 2026-07-01-preview/Schedulers_CreateOrUpdate.json
*/
/**
* Sample code: Schedulers_CreateOrUpdate.
@@ -222,6 +437,10 @@ public final class SchedulersCreateOrUpdateSamples {
.withTags(mapOf("department", "research", "development", "true"))
.withProperties(new SchedulerProperties().withIpAllowlist(Arrays.asList("10.0.0.0/8"))
.withSku(new SchedulerSku().withName(SchedulerSkuName.DEDICATED)))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf(
+ "/subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity",
+ new UserAssignedIdentity())))
.create();
}
@@ -252,7 +471,7 @@ import com.azure.resourcemanager.durabletask.models.PrivateLinkServiceConnection
*/
public final class SchedulersCreateOrUpdatePrivateEndpointConnectionSamples {
/*
- * x-ms-original-file: 2026-02-01/PrivateEndpointConnections_Create_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/PrivateEndpointConnections_Create_MaximumSet_Gen.json
*/
/**
* Sample code: PrivateEndpointConnections_Create_MaximumSet.
@@ -283,7 +502,7 @@ public final class SchedulersCreateOrUpdatePrivateEndpointConnectionSamples {
*/
public final class SchedulersDeleteSamples {
/*
- * x-ms-original-file: 2026-02-01/Schedulers_Delete.json
+ * x-ms-original-file: 2026-07-01-preview/Schedulers_Delete.json
*/
/**
* Sample code: Schedulers_Delete.
@@ -304,7 +523,7 @@ public final class SchedulersDeleteSamples {
*/
public final class SchedulersDeletePrivateEndpointConnectionSamples {
/*
- * x-ms-original-file: 2026-02-01/PrivateEndpointConnections_Delete_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/PrivateEndpointConnections_Delete_MaximumSet_Gen.json
*/
/**
* Sample code: PrivateEndpointConnections_Delete_MaximumSet.
@@ -328,7 +547,7 @@ public final class SchedulersDeletePrivateEndpointConnectionSamples {
*/
public final class SchedulersGetByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-02-01/Schedulers_Get.json
+ * x-ms-original-file: 2026-07-01-preview/Schedulers_Get.json
*/
/**
* Sample code: Schedulers_Get.
@@ -350,7 +569,7 @@ public final class SchedulersGetByResourceGroupSamples {
*/
public final class SchedulersGetPrivateEndpointConnectionSamples {
/*
- * x-ms-original-file: 2026-02-01/PrivateEndpointConnections_Get_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/PrivateEndpointConnections_Get_MaximumSet_Gen.json
*/
/**
* Sample code: PrivateEndpointConnections_Get_MaximumSet.
@@ -374,7 +593,7 @@ public final class SchedulersGetPrivateEndpointConnectionSamples {
*/
public final class SchedulersGetPrivateLinkSamples {
/*
- * x-ms-original-file: 2026-02-01/PrivateLinkResources_Get_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/PrivateLinkResources_Get_MaximumSet_Gen.json
*/
/**
* Sample code: PrivateLinkResources_Get_MaximumSet.
@@ -398,7 +617,7 @@ public final class SchedulersGetPrivateLinkSamples {
*/
public final class SchedulersListSamples {
/*
- * x-ms-original-file: 2026-02-01/Schedulers_ListBySubscription.json
+ * x-ms-original-file: 2026-07-01-preview/Schedulers_ListBySubscription.json
*/
/**
* Sample code: Schedulers_ListBySubscription.
@@ -419,7 +638,7 @@ public final class SchedulersListSamples {
*/
public final class SchedulersListByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-02-01/Schedulers_ListByResourceGroup.json
+ * x-ms-original-file: 2026-07-01-preview/Schedulers_ListByResourceGroup.json
*/
/**
* Sample code: Schedulers_ListByResourceGroup.
@@ -440,7 +659,7 @@ public final class SchedulersListByResourceGroupSamples {
*/
public final class SchedulersListPrivateEndpointConnectionsSamples {
/*
- * x-ms-original-file: 2026-02-01/PrivateEndpointConnections_List_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/PrivateEndpointConnections_List_MaximumSet_Gen.json
*/
/**
* Sample code: PrivateEndpointConnections_List_MaximumSet.
@@ -463,7 +682,7 @@ public final class SchedulersListPrivateEndpointConnectionsSamples {
*/
public final class SchedulersListPrivateLinksSamples {
/*
- * x-ms-original-file: 2026-02-01/PrivateLinkResources_List_MaximumSet_Gen.json
+ * x-ms-original-file: 2026-07-01-preview/PrivateLinkResources_List_MaximumSet_Gen.json
*/
/**
* Sample code: PrivateLinkResources_List_MaximumSet.
@@ -477,9 +696,32 @@ public final class SchedulersListPrivateLinksSamples {
}
```
+### Schedulers_Restart
+
+```java
+/**
+ * Samples for Schedulers Restart.
+ */
+public final class SchedulersRestartSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/Schedulers_Restart.json
+ */
+ /**
+ * Sample code: Schedulers_Restart.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void schedulersRestart(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.schedulers().restartWithResponse("rgopenapi", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Schedulers_Update
```java
+import com.azure.resourcemanager.durabletask.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.durabletask.models.ManagedServiceIdentityType;
import com.azure.resourcemanager.durabletask.models.Scheduler;
import com.azure.resourcemanager.durabletask.models.SchedulerPropertiesUpdate;
import com.azure.resourcemanager.durabletask.models.SchedulerSkuName;
@@ -493,7 +735,7 @@ import java.util.Map;
*/
public final class SchedulersUpdateSamples {
/*
- * x-ms-original-file: 2026-02-01/Schedulers_Update.json
+ * x-ms-original-file: 2026-07-01-preview/Schedulers_Update.json
*/
/**
* Sample code: Schedulers_Update.
@@ -508,6 +750,7 @@ public final class SchedulersUpdateSamples {
.withTags(mapOf("hello", "world"))
.withProperties(new SchedulerPropertiesUpdate().withIpAllowlist(Arrays.asList("10.0.0.0/8"))
.withSku(new SchedulerSkuUpdate().withName(SchedulerSkuName.DEDICATED).withCapacity(3)))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE))
.apply();
}
@@ -538,7 +781,7 @@ import com.azure.resourcemanager.durabletask.models.PrivateLinkServiceConnection
*/
public final class SchedulersUpdatePrivateEndpointConnectionSamples {
/*
- * x-ms-original-file: 2026-02-01/PrivateEndpointConnections_Update.json
+ * x-ms-original-file: 2026-07-01-preview/PrivateEndpointConnections_Update.json
*/
/**
* Sample code: PrivateEndpointConnections_Update.
@@ -563,13 +806,14 @@ public final class SchedulersUpdatePrivateEndpointConnectionSamples {
```java
import com.azure.resourcemanager.durabletask.models.TaskHubProperties;
+import java.util.Arrays;
/**
* Samples for TaskHubs CreateOrUpdate.
*/
public final class TaskHubsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-02-01/TaskHubs_CreateOrUpdate.json
+ * x-ms-original-file: 2026-07-01-preview/TaskHubs_CreateOrUpdate.json
*/
/**
* Sample code: TaskHubs_CreateOrUpdate.
@@ -580,7 +824,7 @@ public final class TaskHubsCreateOrUpdateSamples {
manager.taskHubs()
.define("testtaskhub")
.withExistingScheduler("rgopenapi", "testscheduler")
- .withProperties(new TaskHubProperties())
+ .withProperties(new TaskHubProperties().withCapabilities(Arrays.asList("ExampleFutureCapability")))
.create();
}
}
@@ -594,7 +838,7 @@ public final class TaskHubsCreateOrUpdateSamples {
*/
public final class TaskHubsDeleteSamples {
/*
- * x-ms-original-file: 2026-02-01/TaskHubs_Delete.json
+ * x-ms-original-file: 2026-07-01-preview/TaskHubs_Delete.json
*/
/**
* Sample code: TaskHubs_Delete.
@@ -615,7 +859,7 @@ public final class TaskHubsDeleteSamples {
*/
public final class TaskHubsGetSamples {
/*
- * x-ms-original-file: 2026-02-01/TaskHubs_Get.json
+ * x-ms-original-file: 2026-07-01-preview/TaskHubs_Get.json
*/
/**
* Sample code: TaskHubs_Get.
@@ -637,7 +881,7 @@ public final class TaskHubsGetSamples {
*/
public final class TaskHubsListBySchedulerSamples {
/*
- * x-ms-original-file: 2026-02-01/TaskHubs_ListByScheduler.json
+ * x-ms-original-file: 2026-07-01-preview/TaskHubs_ListByScheduler.json
*/
/**
* Sample code: TaskHubs_ListByScheduler.
@@ -650,3 +894,246 @@ public final class TaskHubsListBySchedulerSamples {
}
```
+### TaskQueues_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.durabletask.models.TaskQueueProperties;
+import com.azure.resourcemanager.durabletask.models.TaskQueueThroughput;
+
+/**
+ * Samples for TaskQueues CreateOrUpdate.
+ */
+public final class TaskQueuesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TaskQueues_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: TaskQueues_CreateOrUpdate.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void taskQueuesCreateOrUpdate(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.taskQueues()
+ .define("QueueA")
+ .withExistingTaskHub("rgopenapi", "testscheduler", "testtaskhub")
+ .withProperties(
+ new TaskQueueProperties().withThroughput(new TaskQueueThroughput().withActionsPerSecond(40)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TaskQueues_CreateOrUpdate_MinimumSet.json
+ */
+ /**
+ * Sample code: TaskQueues_CreateOrUpdate_MinimumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ taskQueuesCreateOrUpdateMinimumSet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.taskQueues()
+ .define("QueueA")
+ .withExistingTaskHub("rgopenapi", "testscheduler", "testtaskhub")
+ .withProperties(new TaskQueueProperties())
+ .create();
+ }
+}
+```
+
+### TaskQueues_Delete
+
+```java
+/**
+ * Samples for TaskQueues Delete.
+ */
+public final class TaskQueuesDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TaskQueues_Delete.json
+ */
+ /**
+ * Sample code: TaskQueues_Delete.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void taskQueuesDelete(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.taskQueues()
+ .delete("rgopenapi", "testscheduler", "testtaskhub", "QueueA", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TaskQueues_Get
+
+```java
+/**
+ * Samples for TaskQueues Get.
+ */
+public final class TaskQueuesGetSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TaskQueues_Get.json
+ */
+ /**
+ * Sample code: TaskQueues_Get.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void taskQueuesGet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.taskQueues()
+ .getWithResponse("rgopenapi", "testscheduler", "testtaskhub", "QueueA", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TaskQueues_ListByTaskHub
+
+```java
+/**
+ * Samples for TaskQueues ListByTaskHub.
+ */
+public final class TaskQueuesListByTaskHubSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TaskQueues_ListByTaskHub.json
+ */
+ /**
+ * Sample code: TaskQueues_ListByTaskHub.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void taskQueuesListByTaskHub(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.taskQueues()
+ .listByTaskHub("rgopenapi", "testscheduler", "testtaskhub", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TaskQueues_Update
+
+```java
+import com.azure.resourcemanager.durabletask.models.TaskQueue;
+import com.azure.resourcemanager.durabletask.models.TaskQueueProperties;
+import com.azure.resourcemanager.durabletask.models.TaskQueueThroughput;
+
+/**
+ * Samples for TaskQueues Update.
+ */
+public final class TaskQueuesUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TaskQueues_Update.json
+ */
+ /**
+ * Sample code: TaskQueues_Update.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void taskQueuesUpdate(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ TaskQueue resource = manager.taskQueues()
+ .getWithResponse("rgopenapi", "testscheduler", "testtaskhub", "QueueA", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withProperties(
+ new TaskQueueProperties().withThroughput(new TaskQueueThroughput().withActionsPerSecond(80)))
+ .apply();
+ }
+}
+```
+
+### TransparentDataEncryptions_CreateOrReplace
+
+```java
+import com.azure.resourcemanager.durabletask.fluent.models.TransparentDataEncryptionInner;
+import com.azure.resourcemanager.durabletask.models.TransparentDataEncryptionKeySource;
+import com.azure.resourcemanager.durabletask.models.TransparentDataEncryptionProperties;
+
+/**
+ * Samples for TransparentDataEncryptions CreateOrReplace.
+ */
+public final class TransparentDataEncryptionsCreateOrReplaceSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TransparentDataEncryptions_CreateOrReplace_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TransparentDataEncryptions_CreateOrReplace_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void transparentDataEncryptionsCreateOrReplaceMaximumSet(
+ com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.transparentDataEncryptions()
+ .createOrReplace("rgdurabletask", "testscheduler",
+ new TransparentDataEncryptionInner().withProperties(new TransparentDataEncryptionProperties()
+ .withKeySource(TransparentDataEncryptionKeySource.CUSTOMER_MANAGED)
+ .withKeyVaultKeyUri("fakeTokenPlaceholder")
+ .withAutoRotationEnabled(true)),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TransparentDataEncryptions_Delete
+
+```java
+/**
+ * Samples for TransparentDataEncryptions Delete.
+ */
+public final class TransparentDataEncryptionsDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TransparentDataEncryptions_Delete_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TransparentDataEncryptions_Delete_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ transparentDataEncryptionsDeleteMaximumSet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.transparentDataEncryptions().delete("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TransparentDataEncryptions_Get
+
+```java
+/**
+ * Samples for TransparentDataEncryptions Get.
+ */
+public final class TransparentDataEncryptionsGetSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TransparentDataEncryptions_Get_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TransparentDataEncryptions_Get_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void
+ transparentDataEncryptionsGetMaximumSet(com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.transparentDataEncryptions()
+ .getWithResponse("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### TransparentDataEncryptions_ListByScheduler
+
+```java
+/**
+ * Samples for TransparentDataEncryptions ListByScheduler.
+ */
+public final class TransparentDataEncryptionsListBySchedulerSamples {
+ /*
+ * x-ms-original-file: 2026-07-01-preview/TransparentDataEncryptions_ListByScheduler_MaximumSet_Gen.json
+ */
+ /**
+ * Sample code: TransparentDataEncryptions_ListByScheduler_MaximumSet.
+ *
+ * @param manager Entry point to DurableTaskManager.
+ */
+ public static void transparentDataEncryptionsListBySchedulerMaximumSet(
+ com.azure.resourcemanager.durabletask.DurableTaskManager manager) {
+ manager.transparentDataEncryptions()
+ .listByScheduler("rgdurabletask", "testscheduler", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/pom.xml b/sdk/durabletask/azure-resourcemanager-durabletask/pom.xml
index 19587078a1fcf..890d41ce476f4 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/pom.xml
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for Durable Task Management
- This package contains Microsoft Azure SDK for Durable Task Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2026-02-01.
+ This package contains Microsoft Azure SDK for Durable Task Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2026-07-01-preview.
https://github.com/Azure/azure-sdk-for-java
@@ -45,6 +45,7 @@
UTF-8
0
0
+ true
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/DurableTaskManager.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/DurableTaskManager.java
index 1a980c20fb66e..b031ca333edf0 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/DurableTaskManager.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/DurableTaskManager.java
@@ -25,15 +25,23 @@
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.durabletask.fluent.DurableTaskManagementClient;
+import com.azure.resourcemanager.durabletask.implementation.DetectorsImpl;
import com.azure.resourcemanager.durabletask.implementation.DurableTaskManagementClientBuilder;
+import com.azure.resourcemanager.durabletask.implementation.FailoverInstancesImpl;
import com.azure.resourcemanager.durabletask.implementation.OperationsImpl;
import com.azure.resourcemanager.durabletask.implementation.RetentionPoliciesImpl;
import com.azure.resourcemanager.durabletask.implementation.SchedulersImpl;
import com.azure.resourcemanager.durabletask.implementation.TaskHubsImpl;
+import com.azure.resourcemanager.durabletask.implementation.TaskQueuesImpl;
+import com.azure.resourcemanager.durabletask.implementation.TransparentDataEncryptionsImpl;
+import com.azure.resourcemanager.durabletask.models.Detectors;
+import com.azure.resourcemanager.durabletask.models.FailoverInstances;
import com.azure.resourcemanager.durabletask.models.Operations;
import com.azure.resourcemanager.durabletask.models.RetentionPolicies;
import com.azure.resourcemanager.durabletask.models.Schedulers;
import com.azure.resourcemanager.durabletask.models.TaskHubs;
+import com.azure.resourcemanager.durabletask.models.TaskQueues;
+import com.azure.resourcemanager.durabletask.models.TransparentDataEncryptions;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -48,12 +56,20 @@
public final class DurableTaskManager {
private Operations operations;
+ private Detectors detectors;
+
private Schedulers schedulers;
private TaskHubs taskHubs;
+ private TaskQueues taskQueues;
+
private RetentionPolicies retentionPolicies;
+ private TransparentDataEncryptions transparentDataEncryptions;
+
+ private FailoverInstances failoverInstances;
+
private final DurableTaskManagementClient clientObject;
private DurableTaskManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -281,6 +297,18 @@ public Operations operations() {
return operations;
}
+ /**
+ * Gets the resource collection API of Detectors.
+ *
+ * @return Resource collection API of Detectors.
+ */
+ public Detectors detectors() {
+ if (this.detectors == null) {
+ this.detectors = new DetectorsImpl(clientObject.getDetectors(), this);
+ }
+ return detectors;
+ }
+
/**
* Gets the resource collection API of Schedulers. It manages Scheduler, PrivateEndpointConnection.
*
@@ -305,6 +333,18 @@ public TaskHubs taskHubs() {
return taskHubs;
}
+ /**
+ * Gets the resource collection API of TaskQueues. It manages TaskQueue.
+ *
+ * @return Resource collection API of TaskQueues.
+ */
+ public TaskQueues taskQueues() {
+ if (this.taskQueues == null) {
+ this.taskQueues = new TaskQueuesImpl(clientObject.getTaskQueues(), this);
+ }
+ return taskQueues;
+ }
+
/**
* Gets the resource collection API of RetentionPolicies.
*
@@ -317,6 +357,31 @@ public RetentionPolicies retentionPolicies() {
return retentionPolicies;
}
+ /**
+ * Gets the resource collection API of TransparentDataEncryptions.
+ *
+ * @return Resource collection API of TransparentDataEncryptions.
+ */
+ public TransparentDataEncryptions transparentDataEncryptions() {
+ if (this.transparentDataEncryptions == null) {
+ this.transparentDataEncryptions
+ = new TransparentDataEncryptionsImpl(clientObject.getTransparentDataEncryptions(), this);
+ }
+ return transparentDataEncryptions;
+ }
+
+ /**
+ * Gets the resource collection API of FailoverInstances.
+ *
+ * @return Resource collection API of FailoverInstances.
+ */
+ public FailoverInstances failoverInstances() {
+ if (this.failoverInstances == null) {
+ this.failoverInstances = new FailoverInstancesImpl(clientObject.getFailoverInstances(), this);
+ }
+ return failoverInstances;
+ }
+
/**
* Gets wrapped service client DurableTaskManagementClient providing direct access to the underlying auto-generated
* API implementation, based on Azure REST API.
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/DetectorsClient.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/DetectorsClient.java
new file mode 100644
index 0000000000000..29435df168de2
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/DetectorsClient.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.durabletask.fluent.models.DetectorInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in DetectorsClient.
+ */
+public interface DetectorsClient {
+ /**
+ * Gets a diagnostic detector.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param detectorId The name of the Detector.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a diagnostic detector along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String schedulerName, String detectorId,
+ Context context);
+
+ /**
+ * Gets a diagnostic detector.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param detectorId The name of the Detector.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a diagnostic detector.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DetectorInner get(String resourceGroupName, String schedulerName, String detectorId);
+
+ /**
+ * Lists the diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScheduler(String resourceGroupName, String schedulerName);
+
+ /**
+ * Lists the diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScheduler(String resourceGroupName, String schedulerName, Context context);
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/DurableTaskManagementClient.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/DurableTaskManagementClient.java
index 3905cde4e2312..396747d0d2630 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/DurableTaskManagementClient.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/DurableTaskManagementClient.java
@@ -53,6 +53,13 @@ public interface DurableTaskManagementClient {
*/
OperationsClient getOperations();
+ /**
+ * Gets the DetectorsClient object to access its operations.
+ *
+ * @return the DetectorsClient object.
+ */
+ DetectorsClient getDetectors();
+
/**
* Gets the SchedulersClient object to access its operations.
*
@@ -67,10 +74,31 @@ public interface DurableTaskManagementClient {
*/
TaskHubsClient getTaskHubs();
+ /**
+ * Gets the TaskQueuesClient object to access its operations.
+ *
+ * @return the TaskQueuesClient object.
+ */
+ TaskQueuesClient getTaskQueues();
+
/**
* Gets the RetentionPoliciesClient object to access its operations.
*
* @return the RetentionPoliciesClient object.
*/
RetentionPoliciesClient getRetentionPolicies();
+
+ /**
+ * Gets the TransparentDataEncryptionsClient object to access its operations.
+ *
+ * @return the TransparentDataEncryptionsClient object.
+ */
+ TransparentDataEncryptionsClient getTransparentDataEncryptions();
+
+ /**
+ * Gets the FailoverInstancesClient object to access its operations.
+ *
+ * @return the FailoverInstancesClient object.
+ */
+ FailoverInstancesClient getFailoverInstances();
}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/FailoverInstancesClient.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/FailoverInstancesClient.java
new file mode 100644
index 0000000000000..7311fc27eefdf
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/FailoverInstancesClient.java
@@ -0,0 +1,300 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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.SyncPoller;
+import com.azure.resourcemanager.durabletask.fluent.models.FailoverInstanceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in FailoverInstancesClient.
+ */
+public interface FailoverInstancesClient {
+ /**
+ * Get a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String schedulerName, Context context);
+
+ /**
+ * Get a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverInstanceInner get(String resourceGroupName, String schedulerName);
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverInstanceInner> beginCreateOrReplace(String resourceGroupName,
+ String schedulerName, FailoverInstanceInner resource);
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverInstanceInner> beginCreateOrReplace(String resourceGroupName,
+ String schedulerName, FailoverInstanceInner resource, Context context);
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverInstanceInner createOrReplace(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource);
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverInstanceInner createOrReplace(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource, Context context);
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 schedulerName);
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 schedulerName, Context context);
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 schedulerName);
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 schedulerName, Context context);
+
+ /**
+ * List Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScheduler(String resourceGroupName, String schedulerName);
+
+ /**
+ * List Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScheduler(String resourceGroupName, String schedulerName,
+ Context context);
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverInstanceInner> beginFailover(String resourceGroupName,
+ String schedulerName);
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverInstanceInner> beginFailover(String resourceGroupName,
+ String schedulerName, Context context);
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverInstanceInner failover(String resourceGroupName, String schedulerName);
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverInstanceInner failover(String resourceGroupName, String schedulerName, Context context);
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverInstanceInner>
+ beginForceFailoverAllowDataLoss(String resourceGroupName, String schedulerName);
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FailoverInstanceInner>
+ beginForceFailoverAllowDataLoss(String resourceGroupName, String schedulerName, Context context);
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverInstanceInner forceFailoverAllowDataLoss(String resourceGroupName, String schedulerName);
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FailoverInstanceInner forceFailoverAllowDataLoss(String resourceGroupName, String schedulerName, Context context);
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/SchedulersClient.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/SchedulersClient.java
index 2e9dbfe93c9cd..d74bfcc75e6e0 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/SchedulersClient.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/SchedulersClient.java
@@ -602,4 +602,30 @@ PagedIterable listPrivateEndpointConnections(Str
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listPrivateEndpointConnections(String resourceGroupName,
String schedulerName, Context context);
+
+ /**
+ * Restart a Scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown 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 restartWithResponse(String resourceGroupName, String schedulerName, Context context);
+
+ /**
+ * Restart a Scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 schedulerName);
}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/TaskQueuesClient.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/TaskQueuesClient.java
new file mode 100644
index 0000000000000..8a91653880fef
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/TaskQueuesClient.java
@@ -0,0 +1,285 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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.SyncPoller;
+import com.azure.resourcemanager.durabletask.fluent.models.TaskQueueInner;
+import com.azure.resourcemanager.durabletask.models.TaskQueueUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in TaskQueuesClient.
+ */
+public interface TaskQueuesClient {
+ /**
+ * Get a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, Context context);
+
+ /**
+ * Get a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskQueueInner get(String resourceGroupName, String schedulerName, String taskHubName, String taskQueueName);
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskQueueInner> beginCreateOrUpdate(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueInner resource);
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskQueueInner> beginCreateOrUpdate(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueInner resource, Context context);
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskQueueInner createOrUpdate(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueInner resource);
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskQueueInner createOrUpdate(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueInner resource, Context context);
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskQueueInner> beginUpdate(String resourceGroupName, String schedulerName,
+ String taskHubName, String taskQueueName, TaskQueueUpdate properties);
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TaskQueueInner> beginUpdate(String resourceGroupName, String schedulerName,
+ String taskHubName, String taskQueueName, TaskQueueUpdate properties, Context context);
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskQueueInner update(String resourceGroupName, String schedulerName, String taskHubName, String taskQueueName,
+ TaskQueueUpdate properties);
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TaskQueueInner update(String resourceGroupName, String schedulerName, String taskHubName, String taskQueueName,
+ TaskQueueUpdate properties, Context context);
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 schedulerName, String taskHubName,
+ String taskQueueName);
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 schedulerName, String taskHubName,
+ String taskQueueName, Context context);
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 schedulerName, String taskHubName, String taskQueueName);
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 schedulerName, String taskHubName, String taskQueueName,
+ Context context);
+
+ /**
+ * List Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTaskHub(String resourceGroupName, String schedulerName, String taskHubName);
+
+ /**
+ * List Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByTaskHub(String resourceGroupName, String schedulerName, String taskHubName,
+ Context context);
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/TransparentDataEncryptionsClient.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/TransparentDataEncryptionsClient.java
new file mode 100644
index 0000000000000..1743fc9579df2
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/TransparentDataEncryptionsClient.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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.SyncPoller;
+import com.azure.resourcemanager.durabletask.fluent.models.TransparentDataEncryptionInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in TransparentDataEncryptionsClient.
+ */
+public interface TransparentDataEncryptionsClient {
+ /**
+ * Get a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Transparent Data Encryption along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String schedulerName,
+ Context context);
+
+ /**
+ * Get a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Transparent Data Encryption.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TransparentDataEncryptionInner get(String resourceGroupName, String schedulerName);
+
+ /**
+ * Create or Update a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 transparent data encryption resource belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TransparentDataEncryptionInner>
+ beginCreateOrReplace(String resourceGroupName, String schedulerName, TransparentDataEncryptionInner resource);
+
+ /**
+ * Create or Update a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 transparent data encryption resource belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TransparentDataEncryptionInner> beginCreateOrReplace(
+ String resourceGroupName, String schedulerName, TransparentDataEncryptionInner resource, Context context);
+
+ /**
+ * Create or Update a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 transparent data encryption resource belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TransparentDataEncryptionInner createOrReplace(String resourceGroupName, String schedulerName,
+ TransparentDataEncryptionInner resource);
+
+ /**
+ * Create or Update a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 transparent data encryption resource belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TransparentDataEncryptionInner createOrReplace(String resourceGroupName, String schedulerName,
+ TransparentDataEncryptionInner resource, Context context);
+
+ /**
+ * Delete a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 schedulerName);
+
+ /**
+ * Delete a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 schedulerName, Context context);
+
+ /**
+ * Delete a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 schedulerName);
+
+ /**
+ * Delete a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 schedulerName, Context context);
+
+ /**
+ * List Transparent Data Encryptions.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TransparentDataEncryption list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScheduler(String resourceGroupName, String schedulerName);
+
+ /**
+ * List Transparent Data Encryptions.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TransparentDataEncryption list operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByScheduler(String resourceGroupName, String schedulerName,
+ Context context);
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/DetectorInner.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/DetectorInner.java
new file mode 100644
index 0000000000000..430051c07b895
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/DetectorInner.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.durabletask.models.DetectorProperties;
+import java.io.IOException;
+
+/**
+ * A diagnostic detector resource belonging to the scheduler.
+ */
+@Immutable
+public final class DetectorInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private DetectorProperties properties;
+
+ /*
+ * 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 DetectorInner class.
+ */
+ private DetectorInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public DetectorProperties 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.
+ *
+ * @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;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DetectorInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DetectorInner 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 DetectorInner.
+ */
+ public static DetectorInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DetectorInner deserializedDetectorInner = new DetectorInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDetectorInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDetectorInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDetectorInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedDetectorInner.properties = DetectorProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedDetectorInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDetectorInner;
+ });
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/FailoverInstanceInner.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/FailoverInstanceInner.java
new file mode 100644
index 0000000000000..14367a1d37b27
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/FailoverInstanceInner.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.durabletask.models.FailoverInstanceProperties;
+import java.io.IOException;
+
+/**
+ * A failover instance belonging to the scheduler.
+ */
+@Fluent
+public final class FailoverInstanceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private FailoverInstanceProperties properties;
+
+ /*
+ * 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 FailoverInstanceInner class.
+ */
+ public FailoverInstanceInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public FailoverInstanceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the FailoverInstanceInner object itself.
+ */
+ public FailoverInstanceInner withProperties(FailoverInstanceProperties properties) {
+ this.properties = properties;
+ 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;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FailoverInstanceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FailoverInstanceInner 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 FailoverInstanceInner.
+ */
+ public static FailoverInstanceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FailoverInstanceInner deserializedFailoverInstanceInner = new FailoverInstanceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFailoverInstanceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFailoverInstanceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFailoverInstanceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedFailoverInstanceInner.properties = FailoverInstanceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFailoverInstanceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFailoverInstanceInner;
+ });
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/SchedulerInner.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/SchedulerInner.java
index 06f427562c541..27af5a085eab7 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/SchedulerInner.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/SchedulerInner.java
@@ -10,6 +10,7 @@
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.durabletask.models.ManagedServiceIdentity;
import com.azure.resourcemanager.durabletask.models.SchedulerProperties;
import java.io.IOException;
import java.util.Map;
@@ -24,6 +25,11 @@ public final class SchedulerInner extends Resource {
*/
private SchedulerProperties properties;
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private ManagedServiceIdentity identity;
+
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@@ -70,6 +76,26 @@ public SchedulerInner withProperties(SchedulerProperties properties) {
return this;
}
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the SchedulerInner object itself.
+ */
+ public SchedulerInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
@@ -136,6 +162,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
return jsonWriter.writeEndObject();
}
@@ -168,6 +195,8 @@ public static SchedulerInner fromJson(JsonReader jsonReader) throws IOException
deserializedSchedulerInner.withTags(tags);
} else if ("properties".equals(fieldName)) {
deserializedSchedulerInner.properties = SchedulerProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedSchedulerInner.identity = ManagedServiceIdentity.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedSchedulerInner.systemData = SystemData.fromJson(reader);
} else {
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/TaskQueueInner.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/TaskQueueInner.java
new file mode 100644
index 0000000000000..65f2e4ca8b956
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/TaskQueueInner.java
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.durabletask.models.TaskQueueProperties;
+import java.io.IOException;
+
+/**
+ * A Task Queue resource belonging to a Task Hub.
+ */
+@Fluent
+public final class TaskQueueInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private TaskQueueProperties properties;
+
+ /*
+ * 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 TaskQueueInner class.
+ */
+ public TaskQueueInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public TaskQueueProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the TaskQueueInner object itself.
+ */
+ public TaskQueueInner withProperties(TaskQueueProperties properties) {
+ this.properties = properties;
+ 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;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TaskQueueInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TaskQueueInner 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 TaskQueueInner.
+ */
+ public static TaskQueueInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TaskQueueInner deserializedTaskQueueInner = new TaskQueueInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedTaskQueueInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedTaskQueueInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedTaskQueueInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedTaskQueueInner.properties = TaskQueueProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTaskQueueInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTaskQueueInner;
+ });
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/TransparentDataEncryptionInner.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/TransparentDataEncryptionInner.java
new file mode 100644
index 0000000000000..4e41b97e44739
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/fluent/models/TransparentDataEncryptionInner.java
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.durabletask.models.TransparentDataEncryptionProperties;
+import java.io.IOException;
+
+/**
+ * A transparent data encryption resource belonging to the scheduler.
+ */
+@Fluent
+public final class TransparentDataEncryptionInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private TransparentDataEncryptionProperties properties;
+
+ /*
+ * 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 TransparentDataEncryptionInner class.
+ */
+ public TransparentDataEncryptionInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public TransparentDataEncryptionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the TransparentDataEncryptionInner object itself.
+ */
+ public TransparentDataEncryptionInner withProperties(TransparentDataEncryptionProperties properties) {
+ this.properties = properties;
+ 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;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TransparentDataEncryptionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TransparentDataEncryptionInner 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 TransparentDataEncryptionInner.
+ */
+ public static TransparentDataEncryptionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TransparentDataEncryptionInner deserializedTransparentDataEncryptionInner
+ = new TransparentDataEncryptionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedTransparentDataEncryptionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedTransparentDataEncryptionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedTransparentDataEncryptionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedTransparentDataEncryptionInner.properties
+ = TransparentDataEncryptionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedTransparentDataEncryptionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedTransparentDataEncryptionInner;
+ });
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorImpl.java
new file mode 100644
index 0000000000000..548951173588b
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorImpl.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.durabletask.fluent.models.DetectorInner;
+import com.azure.resourcemanager.durabletask.models.Detector;
+import com.azure.resourcemanager.durabletask.models.DetectorProperties;
+
+public final class DetectorImpl implements Detector {
+ private DetectorInner innerObject;
+
+ private final com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager;
+
+ DetectorImpl(DetectorInner innerObject, com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public DetectorProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public DetectorInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.durabletask.DurableTaskManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorsClientImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorsClientImpl.java
new file mode 100644
index 0000000000000..756b7a6665085
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorsClientImpl.java
@@ -0,0 +1,363 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.durabletask.fluent.DetectorsClient;
+import com.azure.resourcemanager.durabletask.fluent.models.DetectorInner;
+import com.azure.resourcemanager.durabletask.implementation.models.DetectorListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DetectorsClient.
+ */
+public final class DetectorsClientImpl implements DetectorsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DetectorsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DurableTaskManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DetectorsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DetectorsClientImpl(DurableTaskManagementClientImpl client) {
+ this.service
+ = RestProxy.create(DetectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DurableTaskManagementClientDetectors to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DurableTaskManagementClientDetectors")
+ public interface DetectorsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/detectors/{detectorId}")
+ @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("schedulerName") String schedulerName,
+ @PathParam("detectorId") String detectorId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/detectors/{detectorId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @PathParam("detectorId") String detectorId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/detectors")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByScheduler(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/detectors")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySchedulerSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySchedulerNext(
+ @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)
+ Response listBySchedulerNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets a diagnostic detector.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param detectorId The name of the Detector.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a diagnostic detector along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String schedulerName,
+ String detectorId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, detectorId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a diagnostic detector.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param detectorId The name of the Detector.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a diagnostic detector on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String schedulerName, String detectorId) {
+ return getWithResponseAsync(resourceGroupName, schedulerName, detectorId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a diagnostic detector.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param detectorId The name of the Detector.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a diagnostic detector along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String schedulerName, String detectorId,
+ Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, schedulerName, detectorId, accept, context);
+ }
+
+ /**
+ * Gets a diagnostic detector.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param detectorId The name of the Detector.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a diagnostic detector.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DetectorInner get(String resourceGroupName, String schedulerName, String detectorId) {
+ return getWithResponse(resourceGroupName, schedulerName, detectorId, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySchedulerSinglePageAsync(String resourceGroupName,
+ String schedulerName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByScheduler(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context))
+ .>map(res -> new 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 diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySchedulerAsync(String resourceGroupName, String schedulerName) {
+ return new PagedFlux<>(() -> listBySchedulerSinglePageAsync(resourceGroupName, schedulerName),
+ nextLink -> listBySchedulerNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerSinglePage(String resourceGroupName, String schedulerName) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerSinglePage(String resourceGroupName, String schedulerName,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName) {
+ return new PagedIterable<>(() -> listBySchedulerSinglePage(resourceGroupName, schedulerName),
+ nextLink -> listBySchedulerNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists the diagnostic detectors belonging to a scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName,
+ Context context) {
+ return new PagedIterable<>(() -> listBySchedulerSinglePage(resourceGroupName, schedulerName, context),
+ nextLink -> listBySchedulerNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySchedulerNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listBySchedulerNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Detector list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorsImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorsImpl.java
new file mode 100644
index 0000000000000..67e3ba9f10df6
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DetectorsImpl.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.durabletask.fluent.DetectorsClient;
+import com.azure.resourcemanager.durabletask.fluent.models.DetectorInner;
+import com.azure.resourcemanager.durabletask.models.Detector;
+import com.azure.resourcemanager.durabletask.models.Detectors;
+
+public final class DetectorsImpl implements Detectors {
+ private static final ClientLogger LOGGER = new ClientLogger(DetectorsImpl.class);
+
+ private final DetectorsClient innerClient;
+
+ private final com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager;
+
+ public DetectorsImpl(DetectorsClient innerClient,
+ com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String schedulerName, String detectorId,
+ Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, schedulerName, detectorId, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DetectorImpl(inner.getValue(), this.manager()));
+ }
+
+ public Detector get(String resourceGroupName, String schedulerName, String detectorId) {
+ DetectorInner inner = this.serviceClient().get(resourceGroupName, schedulerName, detectorId);
+ if (inner != null) {
+ return new DetectorImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName) {
+ PagedIterable inner = this.serviceClient().listByScheduler(resourceGroupName, schedulerName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByScheduler(resourceGroupName, schedulerName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorImpl(inner1, this.manager()));
+ }
+
+ private DetectorsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.durabletask.DurableTaskManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DurableTaskManagementClientImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DurableTaskManagementClientImpl.java
index a02acad3075b0..55fbb8b6119e5 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DurableTaskManagementClientImpl.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/DurableTaskManagementClientImpl.java
@@ -26,11 +26,15 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.durabletask.fluent.DetectorsClient;
import com.azure.resourcemanager.durabletask.fluent.DurableTaskManagementClient;
+import com.azure.resourcemanager.durabletask.fluent.FailoverInstancesClient;
import com.azure.resourcemanager.durabletask.fluent.OperationsClient;
import com.azure.resourcemanager.durabletask.fluent.RetentionPoliciesClient;
import com.azure.resourcemanager.durabletask.fluent.SchedulersClient;
import com.azure.resourcemanager.durabletask.fluent.TaskHubsClient;
+import com.azure.resourcemanager.durabletask.fluent.TaskQueuesClient;
+import com.azure.resourcemanager.durabletask.fluent.TransparentDataEncryptionsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -143,6 +147,20 @@ public OperationsClient getOperations() {
return this.operations;
}
+ /**
+ * The DetectorsClient object to access its operations.
+ */
+ private final DetectorsClient detectors;
+
+ /**
+ * Gets the DetectorsClient object to access its operations.
+ *
+ * @return the DetectorsClient object.
+ */
+ public DetectorsClient getDetectors() {
+ return this.detectors;
+ }
+
/**
* The SchedulersClient object to access its operations.
*/
@@ -171,6 +189,20 @@ public TaskHubsClient getTaskHubs() {
return this.taskHubs;
}
+ /**
+ * The TaskQueuesClient object to access its operations.
+ */
+ private final TaskQueuesClient taskQueues;
+
+ /**
+ * Gets the TaskQueuesClient object to access its operations.
+ *
+ * @return the TaskQueuesClient object.
+ */
+ public TaskQueuesClient getTaskQueues() {
+ return this.taskQueues;
+ }
+
/**
* The RetentionPoliciesClient object to access its operations.
*/
@@ -185,6 +217,34 @@ public RetentionPoliciesClient getRetentionPolicies() {
return this.retentionPolicies;
}
+ /**
+ * The TransparentDataEncryptionsClient object to access its operations.
+ */
+ private final TransparentDataEncryptionsClient transparentDataEncryptions;
+
+ /**
+ * Gets the TransparentDataEncryptionsClient object to access its operations.
+ *
+ * @return the TransparentDataEncryptionsClient object.
+ */
+ public TransparentDataEncryptionsClient getTransparentDataEncryptions() {
+ return this.transparentDataEncryptions;
+ }
+
+ /**
+ * The FailoverInstancesClient object to access its operations.
+ */
+ private final FailoverInstancesClient failoverInstances;
+
+ /**
+ * Gets the FailoverInstancesClient object to access its operations.
+ *
+ * @return the FailoverInstancesClient object.
+ */
+ public FailoverInstancesClient getFailoverInstances() {
+ return this.failoverInstances;
+ }
+
/**
* Initializes an instance of DurableTaskManagementClient client.
*
@@ -202,11 +262,15 @@ public RetentionPoliciesClient getRetentionPolicies() {
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
this.subscriptionId = subscriptionId;
- this.apiVersion = "2026-02-01";
+ this.apiVersion = "2026-07-01-preview";
this.operations = new OperationsClientImpl(this);
+ this.detectors = new DetectorsClientImpl(this);
this.schedulers = new SchedulersClientImpl(this);
this.taskHubs = new TaskHubsClientImpl(this);
+ this.taskQueues = new TaskQueuesClientImpl(this);
this.retentionPolicies = new RetentionPoliciesClientImpl(this);
+ this.transparentDataEncryptions = new TransparentDataEncryptionsClientImpl(this);
+ this.failoverInstances = new FailoverInstancesClientImpl(this);
}
/**
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstanceImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstanceImpl.java
new file mode 100644
index 0000000000000..ab99488db9e10
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstanceImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.durabletask.fluent.models.FailoverInstanceInner;
+import com.azure.resourcemanager.durabletask.models.FailoverInstance;
+import com.azure.resourcemanager.durabletask.models.FailoverInstanceProperties;
+
+public final class FailoverInstanceImpl implements FailoverInstance {
+ private FailoverInstanceInner innerObject;
+
+ private final com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager;
+
+ FailoverInstanceImpl(FailoverInstanceInner innerObject,
+ com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public FailoverInstanceProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public FailoverInstanceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.durabletask.DurableTaskManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstancesClientImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstancesClientImpl.java
new file mode 100644
index 0000000000000..62b67bc12e4d0
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstancesClientImpl.java
@@ -0,0 +1,1090 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.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.BinaryData;
+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.durabletask.fluent.FailoverInstancesClient;
+import com.azure.resourcemanager.durabletask.fluent.models.FailoverInstanceInner;
+import com.azure.resourcemanager.durabletask.implementation.models.FailoverInstanceListResult;
+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 FailoverInstancesClient.
+ */
+public final class FailoverInstancesClientImpl implements FailoverInstancesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final FailoverInstancesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DurableTaskManagementClientImpl client;
+
+ /**
+ * Initializes an instance of FailoverInstancesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FailoverInstancesClientImpl(DurableTaskManagementClientImpl client) {
+ this.service
+ = RestProxy.create(FailoverInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DurableTaskManagementClientFailoverInstances to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DurableTaskManagementClientFailoverInstances")
+ public interface FailoverInstancesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default")
+ @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("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrReplace(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") FailoverInstanceInner resource, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrReplaceSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") FailoverInstanceInner resource, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default")
+ @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("schedulerName") String schedulerName,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByScheduler(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySchedulerSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default/failover")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> failover(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default/failover")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response failoverSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default/forceFailoverAllowDataLoss")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> forceFailoverAllowDataLoss(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/failoverInstances/default/forceFailoverAllowDataLoss")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response forceFailoverAllowDataLossSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySchedulerNext(
+ @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)
+ Response listBySchedulerNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 Instance along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String schedulerName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 Instance on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String schedulerName) {
+ return getWithResponseAsync(resourceGroupName, schedulerName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String schedulerName,
+ Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, schedulerName, accept, context);
+ }
+
+ /**
+ * Get a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FailoverInstanceInner get(String resourceGroupName, String schedulerName) {
+ return getWithResponse(resourceGroupName, schedulerName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName,
+ String schedulerName, FailoverInstanceInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, contentType, accept, resource,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrReplaceWithResponse(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, contentType, accept, resource,
+ Context.NONE);
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover instance belonging to the scheduler along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrReplaceWithResponse(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, contentType, accept, resource, context);
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FailoverInstanceInner>
+ beginCreateOrReplaceAsync(String resourceGroupName, String schedulerName, FailoverInstanceInner resource) {
+ Mono>> mono
+ = createOrReplaceWithResponseAsync(resourceGroupName, schedulerName, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), FailoverInstanceInner.class, FailoverInstanceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FailoverInstanceInner>
+ beginCreateOrReplace(String resourceGroupName, String schedulerName, FailoverInstanceInner resource) {
+ Response response = createOrReplaceWithResponse(resourceGroupName, schedulerName, resource);
+ return this.client.getLroResult(response,
+ FailoverInstanceInner.class, FailoverInstanceInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a failover instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FailoverInstanceInner> beginCreateOrReplace(
+ String resourceGroupName, String schedulerName, FailoverInstanceInner resource, Context context) {
+ Response response
+ = createOrReplaceWithResponse(resourceGroupName, schedulerName, resource, context);
+ return this.client.getLroResult(response,
+ FailoverInstanceInner.class, FailoverInstanceInner.class, context);
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrReplaceAsync(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource) {
+ return beginCreateOrReplaceAsync(resourceGroupName, schedulerName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FailoverInstanceInner createOrReplace(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource) {
+ return beginCreateOrReplace(resourceGroupName, schedulerName, resource).getFinalResult();
+ }
+
+ /**
+ * Create or Update a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a failover instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FailoverInstanceInner createOrReplace(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource, Context context) {
+ return beginCreateOrReplace(resourceGroupName, schedulerName, resource, context).getFinalResult();
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown 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 schedulerName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String schedulerName) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, Context.NONE);
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String schedulerName, Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, context);
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 schedulerName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, schedulerName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 schedulerName) {
+ Response response = deleteWithResponse(resourceGroupName, schedulerName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 schedulerName,
+ Context context) {
+ Response response = deleteWithResponse(resourceGroupName, schedulerName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 schedulerName) {
+ return beginDeleteAsync(resourceGroupName, schedulerName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 schedulerName) {
+ beginDelete(resourceGroupName, schedulerName).getFinalResult();
+ }
+
+ /**
+ * Delete a Failover Instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 schedulerName, Context context) {
+ beginDelete(resourceGroupName, schedulerName, context).getFinalResult();
+ }
+
+ /**
+ * List Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySchedulerSinglePageAsync(String resourceGroupName,
+ String schedulerName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByScheduler(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context))
+ .>map(res -> new 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 Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySchedulerAsync(String resourceGroupName, String schedulerName) {
+ return new PagedFlux<>(() -> listBySchedulerSinglePageAsync(resourceGroupName, schedulerName),
+ nextLink -> listBySchedulerNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerSinglePage(String resourceGroupName,
+ String schedulerName) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerSinglePage(String resourceGroupName,
+ String schedulerName, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName) {
+ return new PagedIterable<>(() -> listBySchedulerSinglePage(resourceGroupName, schedulerName),
+ nextLink -> listBySchedulerNextSinglePage(nextLink));
+ }
+
+ /**
+ * List Failover Instances.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName,
+ Context context) {
+ return new PagedIterable<>(() -> listBySchedulerSinglePage(resourceGroupName, schedulerName, context),
+ nextLink -> listBySchedulerNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> failoverWithResponseAsync(String resourceGroupName, String schedulerName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response failoverWithResponse(String resourceGroupName, String schedulerName) {
+ final String accept = "application/json";
+ return service.failoverSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, Context.NONE);
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response failoverWithResponse(String resourceGroupName, String schedulerName, Context context) {
+ final String accept = "application/json";
+ return service.failoverSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context);
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FailoverInstanceInner>
+ beginFailoverAsync(String resourceGroupName, String schedulerName) {
+ Mono>> mono = failoverWithResponseAsync(resourceGroupName, schedulerName);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), FailoverInstanceInner.class, FailoverInstanceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FailoverInstanceInner> beginFailover(String resourceGroupName,
+ String schedulerName) {
+ Response response = failoverWithResponse(resourceGroupName, schedulerName);
+ return this.client.getLroResult(response,
+ FailoverInstanceInner.class, FailoverInstanceInner.class, Context.NONE);
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FailoverInstanceInner> beginFailover(String resourceGroupName,
+ String schedulerName, Context context) {
+ Response response = failoverWithResponse(resourceGroupName, schedulerName, context);
+ return this.client.getLroResult(response,
+ FailoverInstanceInner.class, FailoverInstanceInner.class, context);
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono failoverAsync(String resourceGroupName, String schedulerName) {
+ return beginFailoverAsync(resourceGroupName, schedulerName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FailoverInstanceInner failover(String resourceGroupName, String schedulerName) {
+ return beginFailover(resourceGroupName, schedulerName).getFinalResult();
+ }
+
+ /**
+ * Trigger a graceful failover for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FailoverInstanceInner failover(String resourceGroupName, String schedulerName, Context context) {
+ return beginFailover(resourceGroupName, schedulerName, context).getFinalResult();
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> forceFailoverAllowDataLossWithResponseAsync(String resourceGroupName,
+ String schedulerName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.forceFailoverAllowDataLoss(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response forceFailoverAllowDataLossWithResponse(String resourceGroupName,
+ String schedulerName) {
+ final String accept = "application/json";
+ return service.forceFailoverAllowDataLossSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, Context.NONE);
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response forceFailoverAllowDataLossWithResponse(String resourceGroupName, String schedulerName,
+ Context context) {
+ final String accept = "application/json";
+ return service.forceFailoverAllowDataLossSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context);
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FailoverInstanceInner>
+ beginForceFailoverAllowDataLossAsync(String resourceGroupName, String schedulerName) {
+ Mono>> mono
+ = forceFailoverAllowDataLossWithResponseAsync(resourceGroupName, schedulerName);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), FailoverInstanceInner.class, FailoverInstanceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FailoverInstanceInner>
+ beginForceFailoverAllowDataLoss(String resourceGroupName, String schedulerName) {
+ Response response = forceFailoverAllowDataLossWithResponse(resourceGroupName, schedulerName);
+ return this.client.getLroResult(response,
+ FailoverInstanceInner.class, FailoverInstanceInner.class, Context.NONE);
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FailoverInstanceInner>
+ beginForceFailoverAllowDataLoss(String resourceGroupName, String schedulerName, Context context) {
+ Response response
+ = forceFailoverAllowDataLossWithResponse(resourceGroupName, schedulerName, context);
+ return this.client.getLroResult(response,
+ FailoverInstanceInner.class, FailoverInstanceInner.class, context);
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono forceFailoverAllowDataLossAsync(String resourceGroupName,
+ String schedulerName) {
+ return beginForceFailoverAllowDataLossAsync(resourceGroupName, schedulerName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FailoverInstanceInner forceFailoverAllowDataLoss(String resourceGroupName, String schedulerName) {
+ return beginForceFailoverAllowDataLoss(resourceGroupName, schedulerName).getFinalResult();
+ }
+
+ /**
+ * Trigger a forced failover with potential data loss for the parent scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 instance belonging to the scheduler.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FailoverInstanceInner forceFailoverAllowDataLoss(String resourceGroupName, String schedulerName,
+ Context context) {
+ return beginForceFailoverAllowDataLoss(resourceGroupName, schedulerName, context).getFinalResult();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySchedulerNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listBySchedulerNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FailoverInstance list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySchedulerNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySchedulerNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstancesImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstancesImpl.java
new file mode 100644
index 0000000000000..cc0bc159095c3
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/FailoverInstancesImpl.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.durabletask.fluent.FailoverInstancesClient;
+import com.azure.resourcemanager.durabletask.fluent.models.FailoverInstanceInner;
+import com.azure.resourcemanager.durabletask.models.FailoverInstance;
+import com.azure.resourcemanager.durabletask.models.FailoverInstances;
+
+public final class FailoverInstancesImpl implements FailoverInstances {
+ private static final ClientLogger LOGGER = new ClientLogger(FailoverInstancesImpl.class);
+
+ private final FailoverInstancesClient innerClient;
+
+ private final com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager;
+
+ public FailoverInstancesImpl(FailoverInstancesClient innerClient,
+ com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String schedulerName, Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, schedulerName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new FailoverInstanceImpl(inner.getValue(), this.manager()));
+ }
+
+ public FailoverInstance get(String resourceGroupName, String schedulerName) {
+ FailoverInstanceInner inner = this.serviceClient().get(resourceGroupName, schedulerName);
+ if (inner != null) {
+ return new FailoverInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public FailoverInstance createOrReplace(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource) {
+ FailoverInstanceInner inner = this.serviceClient().createOrReplace(resourceGroupName, schedulerName, resource);
+ if (inner != null) {
+ return new FailoverInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public FailoverInstance createOrReplace(String resourceGroupName, String schedulerName,
+ FailoverInstanceInner resource, Context context) {
+ FailoverInstanceInner inner
+ = this.serviceClient().createOrReplace(resourceGroupName, schedulerName, resource, context);
+ if (inner != null) {
+ return new FailoverInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String schedulerName) {
+ this.serviceClient().delete(resourceGroupName, schedulerName);
+ }
+
+ public void delete(String resourceGroupName, String schedulerName, Context context) {
+ this.serviceClient().delete(resourceGroupName, schedulerName, context);
+ }
+
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName) {
+ PagedIterable inner
+ = this.serviceClient().listByScheduler(resourceGroupName, schedulerName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FailoverInstanceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByScheduler(String resourceGroupName, String schedulerName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByScheduler(resourceGroupName, schedulerName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FailoverInstanceImpl(inner1, this.manager()));
+ }
+
+ public FailoverInstance failover(String resourceGroupName, String schedulerName) {
+ FailoverInstanceInner inner = this.serviceClient().failover(resourceGroupName, schedulerName);
+ if (inner != null) {
+ return new FailoverInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public FailoverInstance failover(String resourceGroupName, String schedulerName, Context context) {
+ FailoverInstanceInner inner = this.serviceClient().failover(resourceGroupName, schedulerName, context);
+ if (inner != null) {
+ return new FailoverInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public FailoverInstance forceFailoverAllowDataLoss(String resourceGroupName, String schedulerName) {
+ FailoverInstanceInner inner = this.serviceClient().forceFailoverAllowDataLoss(resourceGroupName, schedulerName);
+ if (inner != null) {
+ return new FailoverInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public FailoverInstance forceFailoverAllowDataLoss(String resourceGroupName, String schedulerName,
+ Context context) {
+ FailoverInstanceInner inner
+ = this.serviceClient().forceFailoverAllowDataLoss(resourceGroupName, schedulerName, context);
+ if (inner != null) {
+ return new FailoverInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private FailoverInstancesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.durabletask.DurableTaskManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulerImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulerImpl.java
index 7114cdcba90d8..45d59182cb01e 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulerImpl.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulerImpl.java
@@ -4,10 +4,12 @@
package com.azure.resourcemanager.durabletask.implementation;
+import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.durabletask.fluent.models.SchedulerInner;
+import com.azure.resourcemanager.durabletask.models.ManagedServiceIdentity;
import com.azure.resourcemanager.durabletask.models.Scheduler;
import com.azure.resourcemanager.durabletask.models.SchedulerProperties;
import com.azure.resourcemanager.durabletask.models.SchedulerPropertiesUpdate;
@@ -49,6 +51,10 @@ public SchedulerProperties properties() {
return this.innerModel().properties();
}
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public SystemData systemData() {
return this.innerModel().systemData();
}
@@ -146,6 +152,14 @@ public Scheduler refresh(Context context) {
return this;
}
+ public Response restartWithResponse(Context context) {
+ return serviceManager.schedulers().restartWithResponse(resourceGroupName, schedulerName, context);
+ }
+
+ public void restart() {
+ serviceManager.schedulers().restart(resourceGroupName, schedulerName);
+ }
+
public SchedulerImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -171,6 +185,16 @@ public SchedulerImpl withProperties(SchedulerProperties properties) {
return this;
}
+ public SchedulerImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+ }
+
public SchedulerImpl withProperties(SchedulerPropertiesUpdate properties) {
this.updateProperties.withProperties(properties);
return this;
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersClientImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersClientImpl.java
index fc016d1bc47b4..72981e0b8b750 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersClientImpl.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersClientImpl.java
@@ -14,6 +14,7 @@
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
@@ -322,6 +323,24 @@ Response listPrivateEndpointConnectionsSync
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
@HeaderParam("Accept") String accept, Context context);
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/restart")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> restart(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/restart")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response restartSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -2154,6 +2173,70 @@ public PagedIterable listPrivateEndpointConnecti
nextLink -> listPrivateEndpointConnectionsNextSinglePage(nextLink, context));
}
+ /**
+ * Restart a Scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown 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 schedulerName) {
+ return FluxUtil
+ .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Restart a Scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 schedulerName) {
+ return restartWithResponseAsync(resourceGroupName, schedulerName).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Restart a Scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown 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 restartWithResponse(String resourceGroupName, String schedulerName, Context context) {
+ return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, context);
+ }
+
+ /**
+ * Restart a Scheduler.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 schedulerName) {
+ restartWithResponse(resourceGroupName, schedulerName, Context.NONE);
+ }
+
/**
* Get the next page of items.
*
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersImpl.java
index dbe92f373bd8b..948ed54c7fc42 100644
--- a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersImpl.java
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/SchedulersImpl.java
@@ -157,6 +157,14 @@ public PagedIterable listPrivateEndpointConnections(S
return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
}
+ public Response restartWithResponse(String resourceGroupName, String schedulerName, Context context) {
+ return this.serviceClient().restartWithResponse(resourceGroupName, schedulerName, context);
+ }
+
+ public void restart(String resourceGroupName, String schedulerName) {
+ this.serviceClient().restart(resourceGroupName, schedulerName);
+ }
+
public Scheduler getById(String id) {
String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueueImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueueImpl.java
new file mode 100644
index 0000000000000..088d7b87420a3
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueueImpl.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.durabletask.fluent.models.TaskQueueInner;
+import com.azure.resourcemanager.durabletask.models.TaskQueue;
+import com.azure.resourcemanager.durabletask.models.TaskQueueProperties;
+import com.azure.resourcemanager.durabletask.models.TaskQueueUpdate;
+
+public final class TaskQueueImpl implements TaskQueue, TaskQueue.Definition, TaskQueue.Update {
+ private TaskQueueInner innerObject;
+
+ private final com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public TaskQueueProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public TaskQueueInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.durabletask.DurableTaskManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String schedulerName;
+
+ private String taskHubName;
+
+ private String taskQueueName;
+
+ private TaskQueueUpdate updateProperties;
+
+ public TaskQueueImpl withExistingTaskHub(String resourceGroupName, String schedulerName, String taskHubName) {
+ this.resourceGroupName = resourceGroupName;
+ this.schedulerName = schedulerName;
+ this.taskHubName = taskHubName;
+ return this;
+ }
+
+ public TaskQueue create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getTaskQueues()
+ .createOrUpdate(resourceGroupName, schedulerName, taskHubName, taskQueueName, this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public TaskQueue create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getTaskQueues()
+ .createOrUpdate(resourceGroupName, schedulerName, taskHubName, taskQueueName, this.innerModel(), context);
+ return this;
+ }
+
+ TaskQueueImpl(String name, com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerObject = new TaskQueueInner();
+ this.serviceManager = serviceManager;
+ this.taskQueueName = name;
+ }
+
+ public TaskQueueImpl update() {
+ this.updateProperties = new TaskQueueUpdate();
+ return this;
+ }
+
+ public TaskQueue apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getTaskQueues()
+ .update(resourceGroupName, schedulerName, taskHubName, taskQueueName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public TaskQueue apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getTaskQueues()
+ .update(resourceGroupName, schedulerName, taskHubName, taskQueueName, updateProperties, context);
+ return this;
+ }
+
+ TaskQueueImpl(TaskQueueInner innerObject, com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.schedulerName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "schedulers");
+ this.taskHubName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "taskHubs");
+ this.taskQueueName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "taskQueues");
+ }
+
+ public TaskQueue refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getTaskQueues()
+ .getWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public TaskQueue refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getTaskQueues()
+ .getWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, context)
+ .getValue();
+ return this;
+ }
+
+ public TaskQueueImpl withProperties(TaskQueueProperties properties) {
+ if (isInCreateMode()) {
+ this.innerModel().withProperties(properties);
+ return this;
+ } else {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel() == null || this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueuesClientImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueuesClientImpl.java
new file mode 100644
index 0000000000000..a053934036992
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueuesClientImpl.java
@@ -0,0 +1,1030 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.durabletask.fluent.TaskQueuesClient;
+import com.azure.resourcemanager.durabletask.fluent.models.TaskQueueInner;
+import com.azure.resourcemanager.durabletask.implementation.models.TaskQueueListResult;
+import com.azure.resourcemanager.durabletask.models.TaskQueueUpdate;
+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 TaskQueuesClient.
+ */
+public final class TaskQueuesClientImpl implements TaskQueuesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final TaskQueuesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DurableTaskManagementClientImpl client;
+
+ /**
+ * Initializes an instance of TaskQueuesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ TaskQueuesClientImpl(DurableTaskManagementClientImpl client) {
+ this.service
+ = RestProxy.create(TaskQueuesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DurableTaskManagementClientTaskQueues to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DurableTaskManagementClientTaskQueues")
+ public interface TaskQueuesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @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("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @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("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") TaskQueueInner resource, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") TaskQueueInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @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("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") TaskQueueUpdate properties, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") TaskQueueUpdate properties, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @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("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues/{taskQueueName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @PathParam("taskQueueName") String taskQueueName,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByTaskHub(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/taskHubs/{taskHubName}/taskQueues")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByTaskHubSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @PathParam("taskHubName") String taskHubName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByTaskHubNext(
+ @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)
+ Response listByTaskHubNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String schedulerName,
+ String taskHubName, String taskQueueName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName) {
+ return getWithResponseAsync(resourceGroupName, schedulerName, taskHubName, taskQueueName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, schedulerName, taskHubName, taskQueueName, accept, context);
+ }
+
+ /**
+ * Get a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TaskQueueInner get(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName) {
+ return getWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueInner resource) {
+ 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, schedulerName, taskHubName, taskQueueName,
+ contentType, accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String schedulerName,
+ String taskHubName, String taskQueueName, TaskQueueInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName, contentType,
+ accept, resource, Context.NONE);
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String schedulerName,
+ String taskHubName, String taskQueueName, TaskQueueInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName, contentType,
+ accept, resource, context);
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, TaskQueueInner> beginCreateOrUpdateAsync(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, schedulerName, taskHubName, taskQueueName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ TaskQueueInner.class, TaskQueueInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, TaskQueueInner> beginCreateOrUpdate(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueInner resource) {
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, resource);
+ return this.client.getLroResult(response, TaskQueueInner.class,
+ TaskQueueInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, TaskQueueInner> beginCreateOrUpdate(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueInner resource, Context context) {
+ Response response = createOrUpdateWithResponse(resourceGroupName, schedulerName, taskHubName,
+ taskQueueName, resource, context);
+ return this.client.getLroResult(response, TaskQueueInner.class,
+ TaskQueueInner.class, context);
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, schedulerName, taskHubName, taskQueueName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create 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 Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TaskQueueInner createOrUpdate(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueInner resource) {
+ return beginCreateOrUpdate(resourceGroupName, schedulerName, taskHubName, taskQueueName, resource)
+ .getFinalResult();
+ }
+
+ /**
+ * Create or update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TaskQueueInner createOrUpdate(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueInner resource, Context context) {
+ return beginCreateOrUpdate(resourceGroupName, schedulerName, taskHubName, taskQueueName, resource, context)
+ .getFinalResult();
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String schedulerName,
+ String taskHubName, String taskQueueName, TaskQueueUpdate properties) {
+ 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, schedulerName, taskHubName, taskQueueName,
+ contentType, accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueUpdate properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName, contentType,
+ accept, properties, Context.NONE);
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueUpdate properties, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName, contentType,
+ accept, properties, context);
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, TaskQueueInner> beginUpdateAsync(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueUpdate properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, schedulerName, taskHubName, taskQueueName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ TaskQueueInner.class, TaskQueueInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, TaskQueueInner> beginUpdate(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueUpdate properties) {
+ Response response
+ = updateWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, properties);
+ return this.client.getLroResult(response, TaskQueueInner.class,
+ TaskQueueInner.class, Context.NONE);
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, TaskQueueInner> beginUpdate(String resourceGroupName,
+ String schedulerName, String taskHubName, String taskQueueName, TaskQueueUpdate properties, Context context) {
+ Response response
+ = updateWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, properties, context);
+ return this.client.getLroResult(response, TaskQueueInner.class,
+ TaskQueueInner.class, context);
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, schedulerName, taskHubName, taskQueueName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TaskQueueInner update(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueUpdate properties) {
+ return beginUpdate(resourceGroupName, schedulerName, taskHubName, taskQueueName, properties).getFinalResult();
+ }
+
+ /**
+ * Update a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Task Queue resource belonging to a Task Hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TaskQueueInner update(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, TaskQueueUpdate properties, Context context) {
+ return beginUpdate(resourceGroupName, schedulerName, taskHubName, taskQueueName, properties, context)
+ .getFinalResult();
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown 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 schedulerName,
+ String taskHubName, String taskQueueName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName,
+ Context.NONE);
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, taskQueueName, context);
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 schedulerName,
+ String taskHubName, String taskQueueName) {
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, schedulerName, taskHubName, taskQueueName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 schedulerName,
+ String taskHubName, String taskQueueName) {
+ Response response
+ = deleteWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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 schedulerName,
+ String taskHubName, String taskQueueName, Context context) {
+ Response response
+ = deleteWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 schedulerName, String taskHubName,
+ String taskQueueName) {
+ return beginDeleteAsync(resourceGroupName, schedulerName, taskHubName, taskQueueName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 schedulerName, String taskHubName, String taskQueueName) {
+ beginDelete(resourceGroupName, schedulerName, taskHubName, taskQueueName).getFinalResult();
+ }
+
+ /**
+ * Delete a Task Queue.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param taskQueueName The name of the TaskQueue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 schedulerName, String taskHubName, String taskQueueName,
+ Context context) {
+ beginDelete(resourceGroupName, schedulerName, taskHubName, taskQueueName, context).getFinalResult();
+ }
+
+ /**
+ * List Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByTaskHubSinglePageAsync(String resourceGroupName,
+ String schedulerName, String taskHubName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByTaskHub(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, accept, context))
+ .>map(res -> new 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 Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByTaskHubAsync(String resourceGroupName, String schedulerName,
+ String taskHubName) {
+ return new PagedFlux<>(() -> listByTaskHubSinglePageAsync(resourceGroupName, schedulerName, taskHubName),
+ nextLink -> listByTaskHubNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByTaskHubSinglePage(String resourceGroupName, String schedulerName,
+ String taskHubName) {
+ final String accept = "application/json";
+ Response res
+ = service.listByTaskHubSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByTaskHubSinglePage(String resourceGroupName, String schedulerName,
+ String taskHubName, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByTaskHubSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, taskHubName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByTaskHub(String resourceGroupName, String schedulerName,
+ String taskHubName) {
+ return new PagedIterable<>(() -> listByTaskHubSinglePage(resourceGroupName, schedulerName, taskHubName),
+ nextLink -> listByTaskHubNextSinglePage(nextLink));
+ }
+
+ /**
+ * List Task Queues by Task Hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param taskHubName The name of the TaskHub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByTaskHub(String resourceGroupName, String schedulerName,
+ String taskHubName, Context context) {
+ return new PagedIterable<>(
+ () -> listByTaskHubSinglePage(resourceGroupName, schedulerName, taskHubName, context),
+ nextLink -> listByTaskHubNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByTaskHubNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByTaskHubNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByTaskHubNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listByTaskHubNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a TaskQueue list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByTaskHubNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByTaskHubNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueuesImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueuesImpl.java
new file mode 100644
index 0000000000000..34f7de322be32
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TaskQueuesImpl.java
@@ -0,0 +1,177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.durabletask.fluent.TaskQueuesClient;
+import com.azure.resourcemanager.durabletask.fluent.models.TaskQueueInner;
+import com.azure.resourcemanager.durabletask.models.TaskQueue;
+import com.azure.resourcemanager.durabletask.models.TaskQueues;
+
+public final class TaskQueuesImpl implements TaskQueues {
+ private static final ClientLogger LOGGER = new ClientLogger(TaskQueuesImpl.class);
+
+ private final TaskQueuesClient innerClient;
+
+ private final com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager;
+
+ public TaskQueuesImpl(TaskQueuesClient innerClient,
+ com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String schedulerName, String taskHubName,
+ String taskQueueName, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new TaskQueueImpl(inner.getValue(), this.manager()));
+ }
+
+ public TaskQueue get(String resourceGroupName, String schedulerName, String taskHubName, String taskQueueName) {
+ TaskQueueInner inner = this.serviceClient().get(resourceGroupName, schedulerName, taskHubName, taskQueueName);
+ if (inner != null) {
+ return new TaskQueueImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String schedulerName, String taskHubName, String taskQueueName) {
+ this.serviceClient().delete(resourceGroupName, schedulerName, taskHubName, taskQueueName);
+ }
+
+ public void delete(String resourceGroupName, String schedulerName, String taskHubName, String taskQueueName,
+ Context context) {
+ this.serviceClient().delete(resourceGroupName, schedulerName, taskHubName, taskQueueName, context);
+ }
+
+ public PagedIterable listByTaskHub(String resourceGroupName, String schedulerName, String taskHubName) {
+ PagedIterable inner
+ = this.serviceClient().listByTaskHub(resourceGroupName, schedulerName, taskHubName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new TaskQueueImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByTaskHub(String resourceGroupName, String schedulerName, String taskHubName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByTaskHub(resourceGroupName, schedulerName, taskHubName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new TaskQueueImpl(inner1, this.manager()));
+ }
+
+ public TaskQueue getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String schedulerName = ResourceManagerUtils.getValueFromIdByName(id, "schedulers");
+ if (schedulerName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'schedulers'.", id)));
+ }
+ String taskHubName = ResourceManagerUtils.getValueFromIdByName(id, "taskHubs");
+ if (taskHubName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskHubs'.", id)));
+ }
+ String taskQueueName = ResourceManagerUtils.getValueFromIdByName(id, "taskQueues");
+ if (taskQueueName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskQueues'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String schedulerName = ResourceManagerUtils.getValueFromIdByName(id, "schedulers");
+ if (schedulerName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'schedulers'.", id)));
+ }
+ String taskHubName = ResourceManagerUtils.getValueFromIdByName(id, "taskHubs");
+ if (taskHubName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskHubs'.", id)));
+ }
+ String taskQueueName = ResourceManagerUtils.getValueFromIdByName(id, "taskQueues");
+ if (taskQueueName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskQueues'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, schedulerName, taskHubName, taskQueueName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String schedulerName = ResourceManagerUtils.getValueFromIdByName(id, "schedulers");
+ if (schedulerName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'schedulers'.", id)));
+ }
+ String taskHubName = ResourceManagerUtils.getValueFromIdByName(id, "taskHubs");
+ if (taskHubName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskHubs'.", id)));
+ }
+ String taskQueueName = ResourceManagerUtils.getValueFromIdByName(id, "taskQueues");
+ if (taskQueueName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskQueues'.", id)));
+ }
+ this.delete(resourceGroupName, schedulerName, taskHubName, taskQueueName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String schedulerName = ResourceManagerUtils.getValueFromIdByName(id, "schedulers");
+ if (schedulerName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'schedulers'.", id)));
+ }
+ String taskHubName = ResourceManagerUtils.getValueFromIdByName(id, "taskHubs");
+ if (taskHubName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskHubs'.", id)));
+ }
+ String taskQueueName = ResourceManagerUtils.getValueFromIdByName(id, "taskQueues");
+ if (taskQueueName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'taskQueues'.", id)));
+ }
+ this.delete(resourceGroupName, schedulerName, taskHubName, taskQueueName, context);
+ }
+
+ private TaskQueuesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.durabletask.DurableTaskManager manager() {
+ return this.serviceManager;
+ }
+
+ public TaskQueueImpl define(String name) {
+ return new TaskQueueImpl(name, this.manager());
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TransparentDataEncryptionImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TransparentDataEncryptionImpl.java
new file mode 100644
index 0000000000000..1873e2a93deac
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TransparentDataEncryptionImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.durabletask.fluent.models.TransparentDataEncryptionInner;
+import com.azure.resourcemanager.durabletask.models.TransparentDataEncryption;
+import com.azure.resourcemanager.durabletask.models.TransparentDataEncryptionProperties;
+
+public final class TransparentDataEncryptionImpl implements TransparentDataEncryption {
+ private TransparentDataEncryptionInner innerObject;
+
+ private final com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager;
+
+ TransparentDataEncryptionImpl(TransparentDataEncryptionInner innerObject,
+ com.azure.resourcemanager.durabletask.DurableTaskManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public TransparentDataEncryptionProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public TransparentDataEncryptionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.durabletask.DurableTaskManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TransparentDataEncryptionsClientImpl.java b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TransparentDataEncryptionsClientImpl.java
new file mode 100644
index 0000000000000..beaad4dd05b16
--- /dev/null
+++ b/sdk/durabletask/azure-resourcemanager-durabletask/src/main/java/com/azure/resourcemanager/durabletask/implementation/TransparentDataEncryptionsClientImpl.java
@@ -0,0 +1,737 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.durabletask.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.BinaryData;
+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.durabletask.fluent.TransparentDataEncryptionsClient;
+import com.azure.resourcemanager.durabletask.fluent.models.TransparentDataEncryptionInner;
+import com.azure.resourcemanager.durabletask.implementation.models.TransparentDataEncryptionListResult;
+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 TransparentDataEncryptionsClient.
+ */
+public final class TransparentDataEncryptionsClientImpl implements TransparentDataEncryptionsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final TransparentDataEncryptionsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DurableTaskManagementClientImpl client;
+
+ /**
+ * Initializes an instance of TransparentDataEncryptionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ TransparentDataEncryptionsClientImpl(DurableTaskManagementClientImpl client) {
+ this.service = RestProxy.create(TransparentDataEncryptionsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DurableTaskManagementClientTransparentDataEncryptions to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DurableTaskManagementClientTransparentDataEncryptions")
+ public interface TransparentDataEncryptionsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions/default")
+ @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("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions/default")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions/default")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrReplace(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") TransparentDataEncryptionInner resource, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions/default")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrReplaceSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") TransparentDataEncryptionInner resource, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions/default")
+ @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("schedulerName") String schedulerName,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions/default")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByScheduler(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DurableTask/schedulers/{schedulerName}/transparentDataEncryptions")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySchedulerSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("schedulerName") String schedulerName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySchedulerNext(
+ @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)
+ Response listBySchedulerNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Transparent Data Encryption along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String schedulerName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, schedulerName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Transparent Data Encryption on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String schedulerName) {
+ return getWithResponseAsync(resourceGroupName, schedulerName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Transparent Data Encryption.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param schedulerName The name of the Scheduler.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Transparent Data Encryption along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response