diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/CHANGELOG.md b/sdk/storageactions/azure-resourcemanager-storageactions/CHANGELOG.md
index 84e109562872..afc9aee7a8df 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/CHANGELOG.md
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/CHANGELOG.md
@@ -1,14 +1,139 @@
# Release History
-## 1.0.0-beta.4 (Unreleased)
+## 1.0.0-beta.4 (2025-05-09)
-### Features Added
+- Azure Resource Manager StorageActions client library for Java. This package contains Microsoft Azure SDK for StorageActions Management SDK. The Azure Storage Actions Management API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.StorageTaskReportSummary` was removed
+
+#### `models.StorageTasksReports` was removed
+
+#### `models.StorageTaskPreviewActionProperties` was removed
+
+#### `models.StorageTasksListResult` was removed
+
+#### `models.StorageTaskAssignmentsListResult` was removed
+
+#### `models.StorageTaskProperties` was removed
+
+#### `models.OperationListResult` was removed
+
+#### `models.StorageTaskAssignments` was removed
+
+#### `models.StorageTask$DefinitionStages` was modified
+
+* Required stage 5, 6 was added
+* `withProperties(models.StorageTaskProperties)` was removed in stage 4
+
+#### `models.StorageTask` was modified
+
+* `properties()` was removed
+
+#### `models.StorageTaskPreviewAction` was modified
+
+* `properties()` was removed
+
+#### `models.StorageTask$Definition` was modified
+
+* `withProperties(models.StorageTaskProperties)` was removed
+
+#### `models.StorageTasks` was modified
+
+* `list(com.azure.core.util.Context)` was removed
+* `previewActionsWithResponse(java.lang.String,fluent.models.StorageTaskPreviewActionInner,com.azure.core.util.Context)` was removed
+* `list()` was removed
+* `previewActions(java.lang.String,fluent.models.StorageTaskPreviewActionInner)` was removed
+
+#### `models.StorageTask$Update` was modified
+
+* `withProperties(models.StorageTaskProperties)` was removed
+
+#### `models.StorageTaskUpdateParameters` was modified
+
+* `withProperties(models.StorageTaskProperties)` was removed
+* `properties()` was removed
+
+#### `models.UserAssignedIdentity` was modified
+
+* `java.util.UUID principalId()` -> `java.lang.String principalId()`
+* `java.util.UUID clientId()` -> `java.lang.String clientId()`
+
+#### `StorageActionsManager` was modified
+
+* `fluent.StorageActionsMgmtClient serviceClient()` -> `fluent.StorageActionsClient serviceClient()`
+* `storageTaskAssignments()` was removed
+* `storageTasksReports()` was removed
+
+#### `models.ManagedServiceIdentity` was modified
+
+* `java.util.UUID tenantId()` -> `java.lang.String tenantId()`
+* `java.util.UUID principalId()` -> `java.lang.String principalId()`
+
+### Features Added
+
+* `implementation.models.OperationListResult` was added
+
+* `implementation.models.StorageTaskReportSummary` was added
+
+* `implementation.models.StorageTasksListResult` was added
+
+* `models.StorageTasksOperationGroups` was added
+
+* `implementation.models.StorageTaskAssignmentsListResult` was added
+
+#### `models.StorageTask` was modified
+
+* `provisioningState()` was added
+* `action()` was added
+* `description()` was added
+* `creationTimeInUtc()` was added
+* `enabled()` was added
+* `taskVersion()` was added
+
+#### `models.StorageTaskPreviewAction` was modified
+
+* `container()` was added
+* `action()` was added
+* `blobs()` was added
+
+#### `models.StorageTask$Definition` was modified
+
+* `withDescription(java.lang.String)` was added
+* `withEnabled(boolean)` was added
+* `withAction(models.StorageTaskAction)` was added
+
+#### `models.StorageTasks` was modified
+
+* `listBySubscription(com.azure.core.util.Context)` was added
+* `list(java.lang.String,java.lang.String,java.lang.Integer,java.lang.String,com.azure.core.util.Context)` was added
+* `list(java.lang.String,java.lang.String)` was added
+* `storageTaskAssignmentList(java.lang.String,java.lang.String,java.lang.Integer,com.azure.core.util.Context)` was added
+* `storageTaskAssignmentList(java.lang.String,java.lang.String)` was added
+* `listBySubscription()` was added
+
+#### `models.StorageTask$Update` was modified
+
+* `withDescription(java.lang.String)` was added
+* `withAction(models.StorageTaskAction)` was added
+* `withEnabled(java.lang.Boolean)` was added
+
+#### `models.StorageTaskUpdateParameters` was modified
+
+* `provisioningState()` was added
+* `creationTimeInUtc()` was added
+* `enabled()` was added
+* `withEnabled(java.lang.Boolean)` was added
+* `action()` was added
+* `taskVersion()` was added
+* `description()` was added
+* `withAction(models.StorageTaskAction)` was added
+* `withDescription(java.lang.String)` was added
+
+#### `StorageActionsManager` was modified
-### Other Changes
+* `storageTasksOperationGroups()` was added
## 1.0.0-beta.3 (2025-04-18)
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/README.md b/sdk/storageactions/azure-resourcemanager-storageactions/README.md
index e086619eb030..0b60aecd1f1d 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/README.md
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager StorageActions client library for Java.
-This package contains Microsoft Azure SDK for StorageActions Management SDK. The Azure Storage Actions Management API. Package tag package-2023-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for StorageActions Management SDK. The Azure Storage Actions Management API. 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-storageactions
- 1.0.0-beta.3
+ 1.0.0-beta.4
```
[//]: # ({x-version-update-end})
@@ -70,6 +70,26 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+```java
+Map operationMap = new LinkedHashMap<>();
+operationMap.put("tier", "Hot");
+storageTask = storageActionsManager.storageTasks()
+ .define(taskName)
+ .withRegion(REGION)
+ .withExistingResourceGroup(resourceGroupName)
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withProperties(new StorageTaskProperties()
+ .withAction(new StorageTaskAction()
+ .withIfProperty(new IfCondition().withCondition("[[[equals(AccessTier, 'Cool')]]")
+ .withOperations(Arrays
+ .asList(new StorageTaskOperation().withName(StorageTaskOperationName.SET_BLOB_TIER)
+ .withParameters(operationMap)
+ .withOnSuccess(OnSuccess.CONTINUE)
+ .withOnFailure(OnFailure.BREAK)))))
+ .withDescription("Storage task")
+ .withEnabled(true))
+ .create();
+```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storageactions/azure-resourcemanager-storageactions/SAMPLE.md)
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/SAMPLE.md b/sdk/storageactions/azure-resourcemanager-storageactions/SAMPLE.md
index 9b8685b7c7d9..77e24ff3efbd 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/SAMPLE.md
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/SAMPLE.md
@@ -1,439 +1,2 @@
# Code snippets and samples
-
-## Operations
-
-- [List](#operations_list)
-
-## StorageTaskAssignment
-
-- [List](#storagetaskassignment_list)
-
-## StorageTasks
-
-- [Create](#storagetasks_create)
-- [Delete](#storagetasks_delete)
-- [GetByResourceGroup](#storagetasks_getbyresourcegroup)
-- [List](#storagetasks_list)
-- [ListByResourceGroup](#storagetasks_listbyresourcegroup)
-- [PreviewActions](#storagetasks_previewactions)
-- [Update](#storagetasks_update)
-
-## StorageTasksReport
-
-- [List](#storagetasksreport_list)
-### Operations_List
-
-```java
-/**
- * Samples for StorageTasksReport List.
- */
-public final class StorageTasksReportListSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksList/ListStorageTasksRunReportSummary.json
- */
- /**
- * Sample code: ListStorageTasksByResourceGroup.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void
- listStorageTasksByResourceGroup(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTasksReports().list("rgroup1", "mytask1", null, null, com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### StorageTaskAssignment_List
-
-```java
-/**
- * Samples for StorageTasks Delete.
- */
-public final class StorageTasksDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksCrud/DeleteStorageTask.json
- */
- /**
- * Sample code: DeleteStorageTask.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void deleteStorageTask(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTasks().delete("res4228", "mytask1", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### StorageTasks_Create
-
-```java
-/**
- * Samples for StorageTasks GetByResourceGroup.
- */
-public final class StorageTasksGetByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksCrud/GetStorageTask.json
- */
- /**
- * Sample code: GetStorageTask.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void getStorageTask(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTasks().getByResourceGroupWithResponse("res4228", "mytask1", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### StorageTasks_Delete
-
-```java
-/**
- * Samples for StorageTaskAssignment List.
- */
-public final class StorageTaskAssignmentListSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksList/ListStorageTaskAssignmentIds.json
- */
- /**
- * Sample code: ListStorageTaskAssignmentsByResourceGroup.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void listStorageTaskAssignmentsByResourceGroup(
- com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTaskAssignments().list("rgroup1", "mytask1", null, com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### StorageTasks_GetByResourceGroup
-
-```java
-/**
- * Samples for Operations List.
- */
-public final class OperationsListSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/misc/
- * OperationsList.json
- */
- /**
- * Sample code: OperationsList.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void operationsList(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.operations().list(com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### StorageTasks_List
-
-```java
-/**
- * Samples for StorageTasks ListByResourceGroup.
- */
-public final class StorageTasksListByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksList/ListStorageTasksByResourceGroup.json
- */
- /**
- * Sample code: ListStorageTasksByResourceGroup.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void
- listStorageTasksByResourceGroup(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTasks().listByResourceGroup("res6117", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### StorageTasks_ListByResourceGroup
-
-```java
-import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskPreviewActionInner;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionCondition;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionIfCondition;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionProperties;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewBlobProperties;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewContainerProperties;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewKeyValueProperties;
-import java.util.Arrays;
-
-/**
- * Samples for StorageTasks PreviewActions.
- */
-public final class StorageTasksPreviewActionsSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/misc/
- * PerformStorageTaskActionsPreview.json
- */
- /**
- * Sample code: PerformStorageTaskActionsPreview.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void
- performStorageTaskActionsPreview(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTasks()
- .previewActionsWithResponse("eastus",
- new StorageTaskPreviewActionInner()
- .withProperties(
- new StorageTaskPreviewActionProperties()
- .withContainer(
- new StorageTaskPreviewContainerProperties().withName("firstContainer")
- .withMetadata(Arrays.asList(new StorageTaskPreviewKeyValueProperties()
- .withKey("fakeTokenPlaceholder")
- .withValue("mContainerValue1"))))
- .withBlobs(Arrays.asList(new StorageTaskPreviewBlobProperties()
- .withName("folder1/file1.txt")
- .withProperties(Arrays.asList(new StorageTaskPreviewKeyValueProperties()
- .withKey("fakeTokenPlaceholder")
- .withValue("Wed, 07 Jun 2023 05:23:29 GMT"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("Wed, 07 Jun 2023 05:23:29 GMT"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("0x8DB67175454D36D"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("38619"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("text/xml"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue(""),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue(""),
- new StorageTaskPreviewKeyValueProperties()
- .withKey("fakeTokenPlaceholder")
- .withValue(""),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("njr6iDrmU9+FC89WMK22EA=="),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue(""),
- new StorageTaskPreviewKeyValueProperties()
- .withKey("fakeTokenPlaceholder")
- .withValue(""),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("BlockBlob"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("Hot"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("true"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("unlocked"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("available"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("true"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("1")))
- .withMetadata(Arrays
- .asList(new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("mValue1")))
- .withTags(Arrays
- .asList(new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("tValue1"))),
- new StorageTaskPreviewBlobProperties()
- .withName("folder2/file1.txt")
- .withProperties(Arrays.asList(
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("Wed, 06 Jun 2023 05:23:29 GMT"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("Wed, 06 Jun 2023 05:23:29 GMT"),
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("0x6FB67175454D36D")))
- .withMetadata(Arrays.asList(
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("mValue2")))
- .withTags(Arrays.asList(
- new StorageTaskPreviewKeyValueProperties().withKey("fakeTokenPlaceholder")
- .withValue("tValue2")))))
- .withAction(new StorageTaskPreviewActionCondition()
- .withIfProperty(new StorageTaskPreviewActionIfCondition()
- .withCondition("[[equals(AccessTier, 'Hot')]]"))
- .withElseBlockExists(true))),
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### StorageTasks_PreviewActions
-
-```java
-import com.azure.resourcemanager.storageactions.models.ElseCondition;
-import com.azure.resourcemanager.storageactions.models.IfCondition;
-import com.azure.resourcemanager.storageactions.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.storageactions.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.storageactions.models.OnFailure;
-import com.azure.resourcemanager.storageactions.models.OnSuccess;
-import com.azure.resourcemanager.storageactions.models.StorageTaskAction;
-import com.azure.resourcemanager.storageactions.models.StorageTaskOperation;
-import com.azure.resourcemanager.storageactions.models.StorageTaskOperationName;
-import com.azure.resourcemanager.storageactions.models.StorageTaskProperties;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for StorageTasks Create.
- */
-public final class StorageTasksCreateSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksCrud/PutStorageTask.json
- */
- /**
- * Sample code: PutStorageTask.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void putStorageTask(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTasks()
- .define("mytask1")
- .withRegion("westus")
- .withExistingResourceGroup("res4228")
- .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
- .withProperties(
- new StorageTaskProperties().withEnabled(true)
- .withDescription("My Storage task")
- .withAction(new StorageTaskAction()
- .withIfProperty(new IfCondition().withCondition("[[equals(AccessTier, 'Cool')]]")
- .withOperations(Arrays
- .asList(new StorageTaskOperation().withName(StorageTaskOperationName.SET_BLOB_TIER)
- .withParameters(mapOf("tier", "Hot"))
- .withOnSuccess(OnSuccess.CONTINUE)
- .withOnFailure(OnFailure.BREAK))))
- .withElseProperty(new ElseCondition().withOperations(
- Arrays.asList(new StorageTaskOperation().withName(StorageTaskOperationName.DELETE_BLOB)
- .withOnSuccess(OnSuccess.CONTINUE)
- .withOnFailure(OnFailure.BREAK))))))
- .create();
- }
-
- // Use "Map.of" if available
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
-```
-
-### StorageTasks_Update
-
-```java
-import com.azure.resourcemanager.storageactions.models.ElseCondition;
-import com.azure.resourcemanager.storageactions.models.IfCondition;
-import com.azure.resourcemanager.storageactions.models.ManagedServiceIdentity;
-import com.azure.resourcemanager.storageactions.models.ManagedServiceIdentityType;
-import com.azure.resourcemanager.storageactions.models.OnFailure;
-import com.azure.resourcemanager.storageactions.models.OnSuccess;
-import com.azure.resourcemanager.storageactions.models.StorageTask;
-import com.azure.resourcemanager.storageactions.models.StorageTaskAction;
-import com.azure.resourcemanager.storageactions.models.StorageTaskOperation;
-import com.azure.resourcemanager.storageactions.models.StorageTaskOperationName;
-import com.azure.resourcemanager.storageactions.models.StorageTaskProperties;
-import com.azure.resourcemanager.storageactions.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Samples for StorageTasks Update.
- */
-public final class StorageTasksUpdateSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksCrud/PatchStorageTask.json
- */
- /**
- * Sample code: PatchStorageTask.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void patchStorageTask(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- StorageTask resource = manager.storageTasks()
- .getByResourceGroupWithResponse("res4228", "mytask1", com.azure.core.util.Context.NONE)
- .getValue();
- resource.update()
- .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf(
- "/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/resourceGroups/res4228/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUserAssignedIdentity",
- new UserAssignedIdentity())))
- .withProperties(
- new StorageTaskProperties().withEnabled(true)
- .withDescription("My Storage task")
- .withAction(new StorageTaskAction()
- .withIfProperty(new IfCondition().withCondition("[[equals(AccessTier, 'Cool')]]")
- .withOperations(Arrays
- .asList(new StorageTaskOperation().withName(StorageTaskOperationName.SET_BLOB_TIER)
- .withParameters(mapOf("tier", "Hot"))
- .withOnSuccess(OnSuccess.CONTINUE)
- .withOnFailure(OnFailure.BREAK))))
- .withElseProperty(new ElseCondition().withOperations(
- Arrays.asList(new StorageTaskOperation().withName(StorageTaskOperationName.DELETE_BLOB)
- .withOnSuccess(OnSuccess.CONTINUE)
- .withOnFailure(OnFailure.BREAK))))))
- .apply();
- }
-
- // Use "Map.of" if available
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
-```
-
-### StorageTasksReport_List
-
-```java
-/**
- * Samples for StorageTasks List.
- */
-public final class StorageTasksListSamples {
- /*
- * x-ms-original-file:
- * specification/storageactions/resource-manager/Microsoft.StorageActions/stable/2023-01-01/examples/
- * storageTasksList/ListStorageTasksBySubscription.json
- */
- /**
- * Sample code: ListStorageTasksBySubscription.
- *
- * @param manager Entry point to StorageActionsManager.
- */
- public static void
- listStorageTasksBySubscription(com.azure.resourcemanager.storageactions.StorageActionsManager manager) {
- manager.storageTasks().list(com.azure.core.util.Context.NONE);
- }
-}
-```
-
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/pom.xml b/sdk/storageactions/azure-resourcemanager-storageactions/pom.xml
index 3ca5800c36cc..4e35d47012d3 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/pom.xml
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/pom.xml
@@ -1,7 +1,7 @@
4.0.0
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for StorageActions Management
- This package contains Microsoft Azure SDK for StorageActions Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Storage Actions Management API. Package tag package-2023-01-01.
+ This package contains Microsoft Azure SDK for StorageActions Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Storage Actions Management API.
https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/StorageActionsManager.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/StorageActionsManager.java
index e17b94b7573a..4c616deef506 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/StorageActionsManager.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/StorageActionsManager.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions;
@@ -24,16 +24,14 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.storageactions.fluent.StorageActionsMgmtClient;
+import com.azure.resourcemanager.storageactions.fluent.StorageActionsClient;
import com.azure.resourcemanager.storageactions.implementation.OperationsImpl;
-import com.azure.resourcemanager.storageactions.implementation.StorageActionsMgmtClientBuilder;
-import com.azure.resourcemanager.storageactions.implementation.StorageTaskAssignmentsImpl;
+import com.azure.resourcemanager.storageactions.implementation.StorageActionsClientBuilder;
import com.azure.resourcemanager.storageactions.implementation.StorageTasksImpl;
-import com.azure.resourcemanager.storageactions.implementation.StorageTasksReportsImpl;
+import com.azure.resourcemanager.storageactions.implementation.StorageTasksOperationGroupsImpl;
import com.azure.resourcemanager.storageactions.models.Operations;
-import com.azure.resourcemanager.storageactions.models.StorageTaskAssignments;
import com.azure.resourcemanager.storageactions.models.StorageTasks;
-import com.azure.resourcemanager.storageactions.models.StorageTasksReports;
+import com.azure.resourcemanager.storageactions.models.StorageTasksOperationGroups;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -51,16 +49,14 @@ public final class StorageActionsManager {
private StorageTasks storageTasks;
- private StorageTaskAssignments storageTaskAssignments;
+ private StorageTasksOperationGroups storageTasksOperationGroups;
- private StorageTasksReports storageTasksReports;
-
- private final StorageActionsMgmtClient clientObject;
+ private final StorageActionsClient clientObject;
private StorageActionsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject = new StorageActionsMgmtClientBuilder().pipeline(httpPipeline)
+ this.clientObject = new StorageActionsClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
@@ -295,37 +291,25 @@ public StorageTasks storageTasks() {
}
/**
- * Gets the resource collection API of StorageTaskAssignments.
- *
- * @return Resource collection API of StorageTaskAssignments.
- */
- public StorageTaskAssignments storageTaskAssignments() {
- if (this.storageTaskAssignments == null) {
- this.storageTaskAssignments
- = new StorageTaskAssignmentsImpl(clientObject.getStorageTaskAssignments(), this);
- }
- return storageTaskAssignments;
- }
-
- /**
- * Gets the resource collection API of StorageTasksReports.
+ * Gets the resource collection API of StorageTasksOperationGroups.
*
- * @return Resource collection API of StorageTasksReports.
+ * @return Resource collection API of StorageTasksOperationGroups.
*/
- public StorageTasksReports storageTasksReports() {
- if (this.storageTasksReports == null) {
- this.storageTasksReports = new StorageTasksReportsImpl(clientObject.getStorageTasksReports(), this);
+ public StorageTasksOperationGroups storageTasksOperationGroups() {
+ if (this.storageTasksOperationGroups == null) {
+ this.storageTasksOperationGroups
+ = new StorageTasksOperationGroupsImpl(clientObject.getStorageTasksOperationGroups(), this);
}
- return storageTasksReports;
+ return storageTasksOperationGroups;
}
/**
- * Gets wrapped service client StorageActionsMgmtClient providing direct access to the underlying auto-generated API
+ * Gets wrapped service client StorageActionsClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
*
- * @return Wrapped service client StorageActionsMgmtClient.
+ * @return Wrapped service client StorageActionsClient.
*/
- public StorageActionsMgmtClient serviceClient() {
+ public StorageActionsClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/OperationsClient.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/OperationsClient.java
index a3947f6b6c4d..9b6c80f45667 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/OperationsClient.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/OperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.fluent;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageActionsMgmtClient.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageActionsClient.java
similarity index 67%
rename from sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageActionsMgmtClient.java
rename to sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageActionsClient.java
index 9026d03806e1..d935f9c8ea3b 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageActionsMgmtClient.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageActionsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.fluent;
@@ -8,30 +8,30 @@
import java.time.Duration;
/**
- * The interface for StorageActionsMgmtClient class.
+ * The interface for StorageActionsClient class.
*/
-public interface StorageActionsMgmtClient {
+public interface StorageActionsClient {
/**
- * Gets The ID of the target subscription. The value must be an UUID.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -61,16 +61,9 @@ public interface StorageActionsMgmtClient {
StorageTasksClient getStorageTasks();
/**
- * Gets the StorageTaskAssignmentsClient object to access its operations.
- *
- * @return the StorageTaskAssignmentsClient object.
- */
- StorageTaskAssignmentsClient getStorageTaskAssignments();
-
- /**
- * Gets the StorageTasksReportsClient object to access its operations.
+ * Gets the StorageTasksOperationGroupsClient object to access its operations.
*
- * @return the StorageTasksReportsClient object.
+ * @return the StorageTasksOperationGroupsClient object.
*/
- StorageTasksReportsClient getStorageTasksReports();
+ StorageTasksOperationGroupsClient getStorageTasksOperationGroups();
}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTaskAssignmentsClient.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTaskAssignmentsClient.java
deleted file mode 100644
index 30a4aef3fda1..000000000000
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTaskAssignmentsClient.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storageactions.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskAssignmentInner;
-
-/**
- * An instance of this class provides access to all the operations defined in StorageTaskAssignmentsClient.
- */
-public interface StorageTaskAssignmentsClient {
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String storageTaskName);
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
- * in the list response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String storageTaskName,
- Integer maxpagesize, Context context);
-}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksClient.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksClient.java
index cf2344edb832..92d8cf6d859f 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksClient.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.fluent;
@@ -11,14 +11,45 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskAssignmentInner;
import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskInner;
-import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskPreviewActionInner;
+import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskReportInstanceInner;
import com.azure.resourcemanager.storageactions.models.StorageTaskUpdateParameters;
/**
* An instance of this class provides access to all the operations defined in StorageTasksClient.
*/
public interface StorageTasksClient {
+ /**
+ * Get the storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the storage task properties along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String storageTaskName,
+ Context context);
+
+ /**
+ * Get the storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the storage task properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ StorageTaskInner getByResourceGroup(String resourceGroupName, String storageTaskName);
+
/**
* Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
* created and a subsequent create request is issued with different properties, the storage task properties will be
@@ -97,155 +128,150 @@ StorageTaskInner create(String resourceGroupName, String storageTaskName, Storag
Context context);
/**
- * Delete the storage task resource.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
+ * @return the {@link SyncPoller} for polling of represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String storageTaskName);
+ SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
+ String storageTaskName, StorageTaskUpdateParameters parameters);
/**
- * Delete the storage task resource.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to provide to update the storage task resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of long-running operation.
+ * @return the {@link SyncPoller} for polling of represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String storageTaskName, Context context);
+ SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
+ String storageTaskName, StorageTaskUpdateParameters parameters, Context context);
/**
- * Delete the storage task resource.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String storageTaskName);
+ StorageTaskInner update(String resourceGroupName, String storageTaskName, StorageTaskUpdateParameters parameters);
/**
- * Delete the storage task resource.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to provide to update the storage task resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String storageTaskName, Context context);
+ StorageTaskInner update(String resourceGroupName, String storageTaskName, StorageTaskUpdateParameters parameters,
+ Context context);
/**
- * Get the storage task properties.
+ * Delete the storage task resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the storage task properties along with {@link Response}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String storageTaskName,
- Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String storageTaskName);
/**
- * Get the storage task properties.
+ * Delete the storage task resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the storage task properties.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- StorageTaskInner getByResourceGroup(String resourceGroupName, String storageTaskName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String storageTaskName, Context context);
/**
- * Update storage task properties.
+ * Delete the storage task resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of represents Storage Task.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
- String storageTaskName, StorageTaskUpdateParameters parameters);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String storageTaskName);
/**
- * Update storage task properties.
+ * Delete the storage task resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of represents Storage Task.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
- String storageTaskName, StorageTaskUpdateParameters parameters, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String storageTaskName, Context context);
/**
- * Update storage task properties.
+ * Lists all the storage tasks available under the given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- StorageTaskInner update(String resourceGroupName, String storageTaskName, StorageTaskUpdateParameters parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Update storage task properties.
+ * Lists all the storage tasks available under the given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- StorageTaskInner update(String resourceGroupName, String storageTaskName, StorageTaskUpdateParameters parameters,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
* Lists all the storage tasks available under the subscription.
@@ -255,7 +281,7 @@ StorageTaskInner update(String resourceGroupName, String storageTaskName, Storag
* @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ PagedIterable listBySubscription();
/**
* Lists all the storage tasks available under the subscription.
@@ -267,58 +293,71 @@ StorageTaskInner update(String resourceGroupName, String storageTaskName, Storag
* @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ PagedIterable listBySubscription(Context context);
/**
- * Lists all the storage tasks available under the given resource group.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
+ * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ PagedIterable list(String resourceGroupName, String storageTaskName);
/**
- * Lists all the storage tasks available under the given resource group.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
+ * @param filter Optional. When specified, it can be used to query using reporting properties.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
+ * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ PagedIterable list(String resourceGroupName, String storageTaskName,
+ Integer maxpagesize, String filter, Context context);
/**
- * Runs the input conditions against input object metadata properties and designates matched objects in response.
+ * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
*
- * @param location The location to perform preview of the actions.
- * @param parameters The parameters to preview action condition.
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return storage Task Preview Action along with {@link Response}.
+ * @return the response from the List Storage Tasks operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response previewActionsWithResponse(String location,
- StorageTaskPreviewActionInner parameters, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable storageTaskAssignmentList(String resourceGroupName,
+ String storageTaskName);
/**
- * Runs the input conditions against input object metadata properties and designates matched objects in response.
+ * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
*
- * @param location The location to perform preview of the actions.
- * @param parameters The parameters to preview action condition.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return storage Task Preview Action.
+ * @return the response from the List Storage Tasks operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- StorageTaskPreviewActionInner previewActions(String location, StorageTaskPreviewActionInner parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable storageTaskAssignmentList(String resourceGroupName,
+ String storageTaskName, Integer maxpagesize, Context context);
}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksOperationGroupsClient.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksOperationGroupsClient.java
new file mode 100644
index 000000000000..30c74d5be203
--- /dev/null
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksOperationGroupsClient.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.storageactions.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskPreviewActionInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in StorageTasksOperationGroupsClient.
+ */
+public interface StorageTasksOperationGroupsClient {
+ /**
+ * Runs the input conditions against input object metadata properties and designates matched objects in response.
+ *
+ * @param location The location parameter.
+ * @param parameters The parameters to preview action condition.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return storage Task Preview Action along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response previewActionsWithResponse(String location,
+ StorageTaskPreviewActionInner parameters, Context context);
+
+ /**
+ * Runs the input conditions against input object metadata properties and designates matched objects in response.
+ *
+ * @param location The location parameter.
+ * @param parameters The parameters to preview action condition.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return storage Task Preview Action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ StorageTaskPreviewActionInner previewActions(String location, StorageTaskPreviewActionInner parameters);
+}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksReportsClient.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksReportsClient.java
deleted file mode 100644
index 14686bc66f02..000000000000
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/StorageTasksReportsClient.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storageactions.fluent;
-
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskReportInstanceInner;
-
-/**
- * An instance of this class provides access to all the operations defined in StorageTasksReportsClient.
- */
-public interface StorageTasksReportsClient {
- /**
- * Fetch the storage tasks run report summary for each assignment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String storageTaskName);
-
- /**
- * Fetch the storage tasks run report summary for each assignment.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
- * in the list response.
- * @param filter Optional. When specified, it can be used to query using reporting properties.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String storageTaskName,
- Integer maxpagesize, String filter, Context context);
-}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/OperationInner.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/OperationInner.java
index 9cbc6d0c5eff..e442ec4acd3f 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/OperationInner.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/OperationInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -19,7 +19,7 @@
*
* Details of a REST API operation, returned from the Resource Provider Operations API.
*/
-@Fluent
+@Immutable
public final class OperationInner implements JsonSerializable {
/*
* The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
@@ -28,8 +28,8 @@ public final class OperationInner implements JsonSerializable {
private String name;
/*
- * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
- * ARM/control-plane operations.
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
*/
private Boolean isDataAction;
@@ -45,14 +45,14 @@ public final class OperationInner implements JsonSerializable {
private Origin origin;
/*
- * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
private ActionType actionType;
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
@@ -67,7 +67,7 @@ public String name() {
/**
* Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
- * operations and "false" for ARM/control-plane operations.
+ * operations and "false" for Azure Resource Manager/control-plane operations.
*
* @return the isDataAction value.
*/
@@ -84,17 +84,6 @@ public OperationDisplay display() {
return this.display;
}
- /**
- * Set the display property: Localized display information for this particular operation.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
/**
* Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
* audit logs UX. Default value is "user,system".
@@ -106,8 +95,8 @@ public Origin origin() {
}
/**
- * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
- * only APIs.
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
*
* @return the actionType value.
*/
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskAssignmentInner.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskAssignmentInner.java
index 0e3b3ccb6a4f..befa741750c6 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskAssignmentInner.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskAssignmentInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.fluent.models;
@@ -24,7 +24,7 @@ public final class StorageTaskAssignmentInner implements JsonSerializable tags) {
return this;
}
+ /**
+ * Get the taskVersion property: Storage task version.
+ *
+ * @return the taskVersion value.
+ */
+ public Long taskVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().taskVersion();
+ }
+
+ /**
+ * Get the enabled property: Storage Task is enabled when set to true and disabled when set to false.
+ *
+ * @return the enabled value.
+ */
+ public boolean enabled() {
+ return this.innerProperties() == null ? false : this.innerProperties().enabled();
+ }
+
+ /**
+ * Set the enabled property: Storage Task is enabled when set to true and disabled when set to false.
+ *
+ * @param enabled the enabled value to set.
+ * @return the StorageTaskInner object itself.
+ */
+ public StorageTaskInner withEnabled(boolean enabled) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageTaskProperties();
+ }
+ this.innerProperties().withEnabled(enabled);
+ return this;
+ }
+
+ /**
+ * Get the description property: Text that describes the purpose of the storage task.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: Text that describes the purpose of the storage task.
+ *
+ * @param description the description value to set.
+ * @return the StorageTaskInner object itself.
+ */
+ public StorageTaskInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageTaskProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the action property: The storage task action that is executed.
+ *
+ * @return the action value.
+ */
+ public StorageTaskAction action() {
+ return this.innerProperties() == null ? null : this.innerProperties().action();
+ }
+
+ /**
+ * Set the action property: The storage task action that is executed.
+ *
+ * @param action the action value to set.
+ * @return the StorageTaskInner object itself.
+ */
+ public StorageTaskInner withAction(StorageTaskAction action) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageTaskProperties();
+ }
+ this.innerProperties().withAction(action);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Represents the provisioning state of the storage task.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the creationTimeInUtc property: The creation date and time of the storage task in UTC.
+ *
+ * @return the creationTimeInUtc value.
+ */
+ public OffsetDateTime creationTimeInUtc() {
+ return this.innerProperties() == null ? null : this.innerProperties().creationTimeInUtc();
+ }
+
/**
* Validates the instance.
*
@@ -166,11 +253,12 @@ public void validate() {
} else {
identity().validate();
}
- if (properties() == null) {
+ if (innerProperties() == null) {
throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property properties in model StorageTaskInner"));
+ .log(new IllegalArgumentException(
+ "Missing required property innerProperties in model StorageTaskInner"));
} else {
- properties().validate();
+ innerProperties().validate();
}
}
@@ -185,7 +273,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("identity", this.identity);
- jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -219,7 +307,7 @@ public static StorageTaskInner fromJson(JsonReader jsonReader) throws IOExceptio
} else if ("identity".equals(fieldName)) {
deserializedStorageTaskInner.identity = ManagedServiceIdentity.fromJson(reader);
} else if ("properties".equals(fieldName)) {
- deserializedStorageTaskInner.properties = StorageTaskProperties.fromJson(reader);
+ deserializedStorageTaskInner.innerProperties = StorageTaskProperties.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedStorageTaskInner.systemData = SystemData.fromJson(reader);
} else {
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskPreviewActionInner.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskPreviewActionInner.java
index d30d24d7e145..aa0d0ee9514e 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskPreviewActionInner.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskPreviewActionInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.fluent.models;
@@ -10,8 +10,11 @@
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionProperties;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionCondition;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewBlobProperties;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewContainerProperties;
import java.io.IOException;
+import java.util.List;
/**
* Storage Task Preview Action.
@@ -21,7 +24,7 @@ public final class StorageTaskPreviewActionInner implements JsonSerializable blobs() {
+ return this.innerProperties() == null ? null : this.innerProperties().blobs();
+ }
+
+ /**
+ * Set the blobs property: Properties of some sample blobs in the container to test for matches with the preview
+ * action.
+ *
+ * @param blobs the blobs value to set.
+ * @return the StorageTaskPreviewActionInner object itself.
+ */
+ public StorageTaskPreviewActionInner withBlobs(List blobs) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageTaskPreviewActionProperties();
+ }
+ this.innerProperties().withBlobs(blobs);
+ return this;
+ }
+
+ /**
+ * Get the action property: Preview action to test.
+ *
+ * @return the action value.
+ */
+ public StorageTaskPreviewActionCondition action() {
+ return this.innerProperties() == null ? null : this.innerProperties().action();
+ }
+
+ /**
+ * Set the action property: Preview action to test.
+ *
+ * @param action the action value to set.
* @return the StorageTaskPreviewActionInner object itself.
*/
- public StorageTaskPreviewActionInner withProperties(StorageTaskPreviewActionProperties properties) {
- this.properties = properties;
+ public StorageTaskPreviewActionInner withAction(StorageTaskPreviewActionCondition action) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageTaskPreviewActionProperties();
+ }
+ this.innerProperties().withAction(action);
return this;
}
@@ -55,12 +118,12 @@ public StorageTaskPreviewActionInner withProperties(StorageTaskPreviewActionProp
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (properties() == null) {
+ if (innerProperties() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
- "Missing required property properties in model StorageTaskPreviewActionInner"));
+ "Missing required property innerProperties in model StorageTaskPreviewActionInner"));
} else {
- properties().validate();
+ innerProperties().validate();
}
}
@@ -72,7 +135,7 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
return jsonWriter.writeEndObject();
}
@@ -94,7 +157,7 @@ public static StorageTaskPreviewActionInner fromJson(JsonReader jsonReader) thro
reader.nextToken();
if ("properties".equals(fieldName)) {
- deserializedStorageTaskPreviewActionInner.properties
+ deserializedStorageTaskPreviewActionInner.innerProperties
= StorageTaskPreviewActionProperties.fromJson(reader);
} else {
reader.skipChildren();
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/models/StorageTaskPreviewActionProperties.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskPreviewActionProperties.java
similarity index 94%
rename from sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/models/StorageTaskPreviewActionProperties.java
rename to sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskPreviewActionProperties.java
index 5077d47426e2..a7bdcf853da3 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/models/StorageTaskPreviewActionProperties.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskPreviewActionProperties.java
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.resourcemanager.storageactions.models;
+package com.azure.resourcemanager.storageactions.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
@@ -10,6 +10,9 @@
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionCondition;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewBlobProperties;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewContainerProperties;
import java.io.IOException;
import java.util.List;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/models/StorageTaskProperties.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskProperties.java
similarity index 96%
rename from sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/models/StorageTaskProperties.java
rename to sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskProperties.java
index 3dcee77c5ca0..cb3b4236123d 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/models/StorageTaskProperties.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskProperties.java
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.resourcemanager.storageactions.models;
+package com.azure.resourcemanager.storageactions.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.CoreUtils;
@@ -11,6 +11,8 @@
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.storageactions.models.ProvisioningState;
+import com.azure.resourcemanager.storageactions.models.StorageTaskAction;
import java.io.IOException;
import java.time.OffsetDateTime;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskReportInstanceInner.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskReportInstanceInner.java
index 18d428fcd978..88140d453280 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskReportInstanceInner.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskReportInstanceInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
@@ -16,7 +16,7 @@
/**
* Storage Tasks run report instance.
*/
-@Fluent
+@Immutable
public final class StorageTaskReportInstanceInner extends ProxyResource {
/*
* Storage task execution report for a run instance.
@@ -46,7 +46,7 @@ public final class StorageTaskReportInstanceInner extends ProxyResource {
/**
* Creates an instance of StorageTaskReportInstanceInner class.
*/
- public StorageTaskReportInstanceInner() {
+ private StorageTaskReportInstanceInner() {
}
/**
@@ -58,17 +58,6 @@ public StorageTaskReportProperties properties() {
return this.properties;
}
- /**
- * Set the properties property: Storage task execution report for a run instance.
- *
- * @param properties the properties value to set.
- * @return the StorageTaskReportInstanceInner object itself.
- */
- public StorageTaskReportInstanceInner withProperties(StorageTaskReportProperties properties) {
- this.properties = properties;
- return this;
- }
-
/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskUpdateProperties.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskUpdateProperties.java
new file mode 100644
index 000000000000..6236fa1ebf12
--- /dev/null
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/StorageTaskUpdateProperties.java
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.storageactions.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.storageactions.models.ProvisioningState;
+import com.azure.resourcemanager.storageactions.models.StorageTaskAction;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * Properties of the storage task.
+ */
+@Fluent
+public final class StorageTaskUpdateProperties implements JsonSerializable {
+ /*
+ * Storage task version.
+ */
+ private Long taskVersion;
+
+ /*
+ * Storage Task is enabled when set to true and disabled when set to false
+ */
+ private Boolean enabled;
+
+ /*
+ * Text that describes the purpose of the storage task
+ */
+ private String description;
+
+ /*
+ * The storage task action that is executed
+ */
+ private StorageTaskAction action;
+
+ /*
+ * Represents the provisioning state of the storage task.
+ */
+ private ProvisioningState provisioningState;
+
+ /*
+ * The creation date and time of the storage task in UTC.
+ */
+ private OffsetDateTime creationTimeInUtc;
+
+ /**
+ * Creates an instance of StorageTaskUpdateProperties class.
+ */
+ public StorageTaskUpdateProperties() {
+ }
+
+ /**
+ * Get the taskVersion property: Storage task version.
+ *
+ * @return the taskVersion value.
+ */
+ public Long taskVersion() {
+ return this.taskVersion;
+ }
+
+ /**
+ * Get the enabled property: Storage Task is enabled when set to true and disabled when set to false.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Storage Task is enabled when set to true and disabled when set to false.
+ *
+ * @param enabled the enabled value to set.
+ * @return the StorageTaskUpdateProperties object itself.
+ */
+ public StorageTaskUpdateProperties withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the description property: Text that describes the purpose of the storage task.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: Text that describes the purpose of the storage task.
+ *
+ * @param description the description value to set.
+ * @return the StorageTaskUpdateProperties object itself.
+ */
+ public StorageTaskUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the action property: The storage task action that is executed.
+ *
+ * @return the action value.
+ */
+ public StorageTaskAction action() {
+ return this.action;
+ }
+
+ /**
+ * Set the action property: The storage task action that is executed.
+ *
+ * @param action the action value to set.
+ * @return the StorageTaskUpdateProperties object itself.
+ */
+ public StorageTaskUpdateProperties withAction(StorageTaskAction action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Represents the provisioning state of the storage task.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the creationTimeInUtc property: The creation date and time of the storage task in UTC.
+ *
+ * @return the creationTimeInUtc value.
+ */
+ public OffsetDateTime creationTimeInUtc() {
+ return this.creationTimeInUtc;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (action() != null) {
+ action().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeJsonField("action", this.action);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of StorageTaskUpdateProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of StorageTaskUpdateProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the StorageTaskUpdateProperties.
+ */
+ public static StorageTaskUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ StorageTaskUpdateProperties deserializedStorageTaskUpdateProperties = new StorageTaskUpdateProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("taskVersion".equals(fieldName)) {
+ deserializedStorageTaskUpdateProperties.taskVersion = reader.getNullable(JsonReader::getLong);
+ } else if ("enabled".equals(fieldName)) {
+ deserializedStorageTaskUpdateProperties.enabled = reader.getNullable(JsonReader::getBoolean);
+ } else if ("description".equals(fieldName)) {
+ deserializedStorageTaskUpdateProperties.description = reader.getString();
+ } else if ("action".equals(fieldName)) {
+ deserializedStorageTaskUpdateProperties.action = StorageTaskAction.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedStorageTaskUpdateProperties.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else if ("creationTimeInUtc".equals(fieldName)) {
+ deserializedStorageTaskUpdateProperties.creationTimeInUtc = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedStorageTaskUpdateProperties;
+ });
+ }
+}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/package-info.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/package-info.java
index 62c75a487a6f..e2cb0c25c67e 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/package-info.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/models/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for StorageActionsMgmtClient.
+ * Package containing the inner data models for StorageActions.
* The Azure Storage Actions Management API.
*/
package com.azure.resourcemanager.storageactions.fluent.models;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/package-info.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/package-info.java
index 7f6af6f52cb1..63a423cca1bb 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/package-info.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/fluent/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for StorageActionsMgmtClient.
+ * Package containing the service clients for StorageActions.
* The Azure Storage Actions Management API.
*/
package com.azure.resourcemanager.storageactions.fluent;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationImpl.java
index 2d5d3e2b2e36..8f38d0bf1942 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsClientImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsClientImpl.java
index 2dca62e74955..54319289a066 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsClientImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
@@ -25,9 +25,10 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.storageactions.fluent.OperationsClient;
import com.azure.resourcemanager.storageactions.fluent.models.OperationInner;
-import com.azure.resourcemanager.storageactions.models.OperationListResult;
+import com.azure.resourcemanager.storageactions.implementation.models.OperationListResult;
import reactor.core.publisher.Mono;
/**
@@ -42,31 +43,38 @@ public final class OperationsClientImpl implements OperationsClient {
/**
* The service client containing this operation class.
*/
- private final StorageActionsMgmtClientImpl client;
+ private final StorageActionsClientImpl client;
/**
* Initializes an instance of OperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- OperationsClientImpl(StorageActionsMgmtClientImpl client) {
+ OperationsClientImpl(StorageActionsClientImpl client) {
this.service
= RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for StorageActionsMgmtClientOperations to be used by the proxy service to
+ * The interface defining all the services for StorageActionsClientOperations to be used by the proxy service to
* perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "StorageActionsMgmtCl")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "StorageActionsClient")
public interface OperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.StorageActions/operations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.StorageActions/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -74,7 +82,14 @@ Mono> list(@HostParam("$host") String endpoint,
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -103,24 +118,14 @@ private Mono> listSinglePageAsync() {
/**
* Lists all of the available Storage Actions Rest API operations.
*
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
@@ -128,12 +133,20 @@ private Mono> listSinglePageAsync(Context context)
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
- * {@link PagedFlux}.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -143,13 +156,20 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
- * {@link PagedFlux}.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -162,7 +182,7 @@ private PagedFlux listAsync(Context context) {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
- return new PagedIterable<>(listAsync());
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink));
}
/**
@@ -177,7 +197,7 @@ public PagedIterable list() {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
+ return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -206,6 +226,33 @@ private Mono> listNextSinglePageAsync(String nextL
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Get the next page of items.
*
@@ -214,22 +261,24 @@ private Mono> listNextSinglePageAsync(String nextL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
- * successful completion of {@link Mono}.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class);
}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsImpl.java
index acff497f39d0..8e8c775b47ac 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/OperationsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/ResourceManagerUtils.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/ResourceManagerUtils.java
index 5ce8a09099f3..f1b733c9a0b4 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/ResourceManagerUtils.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/ResourceManagerUtils.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsMgmtClientBuilder.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsClientBuilder.java
similarity index 66%
rename from sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsMgmtClientBuilder.java
rename to sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsClientBuilder.java
index 451e9efb2239..dd88a9f7b3ae 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsMgmtClientBuilder.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
@@ -15,39 +15,39 @@
import java.time.Duration;
/**
- * A builder for creating a new instance of the StorageActionsMgmtClientImpl type.
+ * A builder for creating a new instance of the StorageActionsClientImpl type.
*/
-@ServiceClientBuilder(serviceClients = { StorageActionsMgmtClientImpl.class })
-public final class StorageActionsMgmtClientBuilder {
+@ServiceClientBuilder(serviceClients = { StorageActionsClientImpl.class })
+public final class StorageActionsClientBuilder {
/*
- * The ID of the target subscription. The value must be an UUID.
+ * Service host
*/
- private String subscriptionId;
+ private String endpoint;
/**
- * Sets The ID of the target subscription. The value must be an UUID.
+ * Sets Service host.
*
- * @param subscriptionId the subscriptionId value.
- * @return the StorageActionsMgmtClientBuilder.
+ * @param endpoint the endpoint value.
+ * @return the StorageActionsClientBuilder.
*/
- public StorageActionsMgmtClientBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
+ public StorageActionsClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
/*
- * server parameter
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String endpoint;
+ private String subscriptionId;
/**
- * Sets server parameter.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
- * @param endpoint the endpoint value.
- * @return the StorageActionsMgmtClientBuilder.
+ * @param subscriptionId the subscriptionId value.
+ * @return the StorageActionsClientBuilder.
*/
- public StorageActionsMgmtClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
+ public StorageActionsClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
return this;
}
@@ -60,9 +60,9 @@ public StorageActionsMgmtClientBuilder endpoint(String endpoint) {
* Sets The environment to connect to.
*
* @param environment the environment value.
- * @return the StorageActionsMgmtClientBuilder.
+ * @return the StorageActionsClientBuilder.
*/
- public StorageActionsMgmtClientBuilder environment(AzureEnvironment environment) {
+ public StorageActionsClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
@@ -76,9 +76,9 @@ public StorageActionsMgmtClientBuilder environment(AzureEnvironment environment)
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
- * @return the StorageActionsMgmtClientBuilder.
+ * @return the StorageActionsClientBuilder.
*/
- public StorageActionsMgmtClientBuilder pipeline(HttpPipeline pipeline) {
+ public StorageActionsClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
@@ -92,9 +92,9 @@ public StorageActionsMgmtClientBuilder pipeline(HttpPipeline pipeline) {
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
- * @return the StorageActionsMgmtClientBuilder.
+ * @return the StorageActionsClientBuilder.
*/
- public StorageActionsMgmtClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ public StorageActionsClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -108,19 +108,19 @@ public StorageActionsMgmtClientBuilder defaultPollInterval(Duration defaultPollI
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
- * @return the StorageActionsMgmtClientBuilder.
+ * @return the StorageActionsClientBuilder.
*/
- public StorageActionsMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ public StorageActionsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
- * Builds an instance of StorageActionsMgmtClientImpl with the provided parameters.
+ * Builds an instance of StorageActionsClientImpl with the provided parameters.
*
- * @return an instance of StorageActionsMgmtClientImpl.
+ * @return an instance of StorageActionsClientImpl.
*/
- public StorageActionsMgmtClientImpl buildClient() {
+ public StorageActionsClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
@@ -131,8 +131,8 @@ public StorageActionsMgmtClientImpl buildClient() {
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
- StorageActionsMgmtClientImpl client = new StorageActionsMgmtClientImpl(localPipeline, localSerializerAdapter,
- localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ StorageActionsClientImpl client = new StorageActionsClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
return client;
}
}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsMgmtClientImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsClientImpl.java
similarity index 82%
rename from sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsMgmtClientImpl.java
rename to sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsClientImpl.java
index ffaee39e8292..896ac3ab08f5 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsMgmtClientImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageActionsClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
@@ -15,19 +15,21 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.storageactions.fluent.OperationsClient;
-import com.azure.resourcemanager.storageactions.fluent.StorageActionsMgmtClient;
-import com.azure.resourcemanager.storageactions.fluent.StorageTaskAssignmentsClient;
+import com.azure.resourcemanager.storageactions.fluent.StorageActionsClient;
import com.azure.resourcemanager.storageactions.fluent.StorageTasksClient;
-import com.azure.resourcemanager.storageactions.fluent.StorageTasksReportsClient;
+import com.azure.resourcemanager.storageactions.fluent.StorageTasksOperationGroupsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -38,31 +40,17 @@
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the StorageActionsMgmtClientImpl type.
+ * Initializes a new instance of the StorageActionsClientImpl type.
*/
-@ServiceClient(builder = StorageActionsMgmtClientBuilder.class)
-public final class StorageActionsMgmtClientImpl implements StorageActionsMgmtClient {
+@ServiceClient(builder = StorageActionsClientBuilder.class)
+public final class StorageActionsClientImpl implements StorageActionsClient {
/**
- * The ID of the target subscription. The value must be an UUID.
- */
- private final String subscriptionId;
-
- /**
- * Gets The ID of the target subscription. The value must be an UUID.
- *
- * @return the subscriptionId value.
- */
- public String getSubscriptionId() {
- return this.subscriptionId;
- }
-
- /**
- * server parameter.
+ * Service host.
*/
private final String endpoint;
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
@@ -71,12 +59,12 @@ public String getEndpoint() {
}
/**
- * Api Version.
+ * Version parameter.
*/
private final String apiVersion;
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -84,6 +72,20 @@ public String getApiVersion() {
return this.apiVersion;
}
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* The HTTP pipeline to send requests through.
*/
@@ -155,55 +157,40 @@ public StorageTasksClient getStorageTasks() {
}
/**
- * The StorageTaskAssignmentsClient object to access its operations.
+ * The StorageTasksOperationGroupsClient object to access its operations.
*/
- private final StorageTaskAssignmentsClient storageTaskAssignments;
+ private final StorageTasksOperationGroupsClient storageTasksOperationGroups;
/**
- * Gets the StorageTaskAssignmentsClient object to access its operations.
+ * Gets the StorageTasksOperationGroupsClient object to access its operations.
*
- * @return the StorageTaskAssignmentsClient object.
+ * @return the StorageTasksOperationGroupsClient object.
*/
- public StorageTaskAssignmentsClient getStorageTaskAssignments() {
- return this.storageTaskAssignments;
+ public StorageTasksOperationGroupsClient getStorageTasksOperationGroups() {
+ return this.storageTasksOperationGroups;
}
/**
- * The StorageTasksReportsClient object to access its operations.
- */
- private final StorageTasksReportsClient storageTasksReports;
-
- /**
- * Gets the StorageTasksReportsClient object to access its operations.
- *
- * @return the StorageTasksReportsClient object.
- */
- public StorageTasksReportsClient getStorageTasksReports() {
- return this.storageTasksReports;
- }
-
- /**
- * Initializes an instance of StorageActionsMgmtClient client.
+ * Initializes an instance of StorageActionsClient client.
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
+ * @param endpoint Service host.
* @param subscriptionId The ID of the target subscription. The value must be an UUID.
- * @param endpoint server parameter.
*/
- StorageActionsMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
- Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ StorageActionsClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
this.apiVersion = "2023-01-01";
this.operations = new OperationsClientImpl(this);
this.storageTasks = new StorageTasksClientImpl(this);
- this.storageTaskAssignments = new StorageTaskAssignmentsClientImpl(this);
- this.storageTasksReports = new StorageTasksReportsClientImpl(this);
+ this.storageTasksOperationGroups = new StorageTasksOperationGroupsClientImpl(this);
}
/**
@@ -243,6 +230,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
/**
* Gets the final result, or an error, based on last async poll response.
*
@@ -332,5 +336,5 @@ public Mono getBodyAsString(Charset charset) {
}
}
- private static final ClientLogger LOGGER = new ClientLogger(StorageActionsMgmtClientImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(StorageActionsClientImpl.class);
}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentImpl.java
index 10a32260d52e..9227c15cf1db 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentsClientImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentsClientImpl.java
deleted file mode 100644
index 4ec62c40d5ab..000000000000
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentsClientImpl.java
+++ /dev/null
@@ -1,317 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storageactions.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.storageactions.fluent.StorageTaskAssignmentsClient;
-import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskAssignmentInner;
-import com.azure.resourcemanager.storageactions.models.StorageTaskAssignmentsListResult;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in StorageTaskAssignmentsClient.
- */
-public final class StorageTaskAssignmentsClientImpl implements StorageTaskAssignmentsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final StorageTaskAssignmentsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final StorageActionsMgmtClientImpl client;
-
- /**
- * Initializes an instance of StorageTaskAssignmentsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- StorageTaskAssignmentsClientImpl(StorageActionsMgmtClientImpl client) {
- this.service = RestProxy.create(StorageTaskAssignmentsService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for StorageActionsMgmtClientStorageTaskAssignments to be used by the
- * proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "StorageActionsMgmtCl")
- public interface StorageTaskAssignmentsService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/storageTaskAssignments")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("storageTaskName") String storageTaskName, @QueryParam("$maxpagesize") Integer maxpagesize,
- @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
- * in the list response.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName,
- String storageTaskName, Integer maxpagesize) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- maxpagesize, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
- * in the list response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceGroupName,
- String storageTaskName, Integer maxpagesize, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), resourceGroupName, storageTaskName, maxpagesize,
- this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
- * in the list response.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String storageTaskName,
- Integer maxpagesize) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, storageTaskName, maxpagesize),
- nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String storageTaskName) {
- final Integer maxpagesize = null;
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, storageTaskName, maxpagesize),
- nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
- * in the list response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String storageTaskName,
- Integer maxpagesize, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, storageTaskName, maxpagesize, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceGroupName, String storageTaskName) {
- final Integer maxpagesize = null;
- return new PagedIterable<>(listAsync(resourceGroupName, storageTaskName, maxpagesize));
- }
-
- /**
- * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
- * in the list response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Tasks operation as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceGroupName, String storageTaskName,
- Integer maxpagesize, Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, storageTaskName, maxpagesize, 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 from the List Storage Tasks operation along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * 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 from the List Storage Tasks operation along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink, Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentsImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentsImpl.java
deleted file mode 100644
index 772bb88c9657..000000000000
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskAssignmentsImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storageactions.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.storageactions.fluent.StorageTaskAssignmentsClient;
-import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskAssignmentInner;
-import com.azure.resourcemanager.storageactions.models.StorageTaskAssignment;
-import com.azure.resourcemanager.storageactions.models.StorageTaskAssignments;
-
-public final class StorageTaskAssignmentsImpl implements StorageTaskAssignments {
- private static final ClientLogger LOGGER = new ClientLogger(StorageTaskAssignmentsImpl.class);
-
- private final StorageTaskAssignmentsClient innerClient;
-
- private final com.azure.resourcemanager.storageactions.StorageActionsManager serviceManager;
-
- public StorageTaskAssignmentsImpl(StorageTaskAssignmentsClient innerClient,
- com.azure.resourcemanager.storageactions.StorageActionsManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list(String resourceGroupName, String storageTaskName) {
- PagedIterable inner = this.serviceClient().list(resourceGroupName, storageTaskName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageTaskAssignmentImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(String resourceGroupName, String storageTaskName,
- Integer maxpagesize, Context context) {
- PagedIterable inner
- = this.serviceClient().list(resourceGroupName, storageTaskName, maxpagesize, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new StorageTaskAssignmentImpl(inner1, this.manager()));
- }
-
- private StorageTaskAssignmentsClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.storageactions.StorageActionsManager manager() {
- return this.serviceManager;
- }
-}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskImpl.java
index a749eedb6859..9f96d0b3f91d 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
@@ -9,9 +9,11 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskInner;
import com.azure.resourcemanager.storageactions.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.storageactions.models.ProvisioningState;
import com.azure.resourcemanager.storageactions.models.StorageTask;
-import com.azure.resourcemanager.storageactions.models.StorageTaskProperties;
+import com.azure.resourcemanager.storageactions.models.StorageTaskAction;
import com.azure.resourcemanager.storageactions.models.StorageTaskUpdateParameters;
+import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.Map;
@@ -49,14 +51,34 @@ public ManagedServiceIdentity identity() {
return this.innerModel().identity();
}
- public StorageTaskProperties properties() {
- return this.innerModel().properties();
- }
-
public SystemData systemData() {
return this.innerModel().systemData();
}
+ public Long taskVersion() {
+ return this.innerModel().taskVersion();
+ }
+
+ public boolean enabled() {
+ return this.innerModel().enabled();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public StorageTaskAction action() {
+ return this.innerModel().action();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public OffsetDateTime creationTimeInUtc() {
+ return this.innerModel().creationTimeInUtc();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -171,12 +193,27 @@ public StorageTaskImpl withIdentity(ManagedServiceIdentity identity) {
}
}
- public StorageTaskImpl withProperties(StorageTaskProperties properties) {
+ public StorageTaskImpl withEnabled(boolean enabled) {
+ this.innerModel().withEnabled(enabled);
+ return this;
+ }
+
+ public StorageTaskImpl withDescription(String description) {
if (isInCreateMode()) {
- this.innerModel().withProperties(properties);
+ this.innerModel().withDescription(description);
return this;
} else {
- this.updateParameters.withProperties(properties);
+ this.updateParameters.withDescription(description);
+ return this;
+ }
+ }
+
+ public StorageTaskImpl withAction(StorageTaskAction action) {
+ if (isInCreateMode()) {
+ this.innerModel().withAction(action);
+ return this;
+ } else {
+ this.updateParameters.withAction(action);
return this;
}
}
@@ -191,6 +228,11 @@ public StorageTaskImpl withTags(Map tags) {
}
}
+ public StorageTaskImpl withEnabled(Boolean enabled) {
+ this.updateParameters.withEnabled(enabled);
+ return this;
+ }
+
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskPreviewActionImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskPreviewActionImpl.java
index 2f8e93761fde..e82f3172d3f6 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskPreviewActionImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskPreviewActionImpl.java
@@ -1,12 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskPreviewActionInner;
import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewAction;
-import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionProperties;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewActionCondition;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewBlobProperties;
+import com.azure.resourcemanager.storageactions.models.StorageTaskPreviewContainerProperties;
+import java.util.Collections;
+import java.util.List;
public final class StorageTaskPreviewActionImpl implements StorageTaskPreviewAction {
private StorageTaskPreviewActionInner innerObject;
@@ -19,8 +23,21 @@ public final class StorageTaskPreviewActionImpl implements StorageTaskPreviewAct
this.serviceManager = serviceManager;
}
- public StorageTaskPreviewActionProperties properties() {
- return this.innerModel().properties();
+ public StorageTaskPreviewContainerProperties container() {
+ return this.innerModel().container();
+ }
+
+ public List blobs() {
+ List inner = this.innerModel().blobs();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public StorageTaskPreviewActionCondition action() {
+ return this.innerModel().action();
}
public StorageTaskPreviewActionInner innerModel() {
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskReportInstanceImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskReportInstanceImpl.java
index da65db288bba..23e7f67ac59a 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskReportInstanceImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTaskReportInstanceImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
diff --git a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTasksClientImpl.java b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTasksClientImpl.java
index cfa78c8fd4a5..03526637a288 100644
--- a/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTasksClientImpl.java
+++ b/sdk/storageactions/azure-resourcemanager-storageactions/src/main/java/com/azure/resourcemanager/storageactions/implementation/StorageTasksClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.storageactions.implementation;
@@ -14,7 +14,6 @@
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
@@ -29,15 +28,20 @@
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.storageactions.fluent.StorageTasksClient;
+import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskAssignmentInner;
import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskInner;
-import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskPreviewActionInner;
+import com.azure.resourcemanager.storageactions.fluent.models.StorageTaskReportInstanceInner;
+import com.azure.resourcemanager.storageactions.implementation.models.StorageTaskAssignmentsListResult;
+import com.azure.resourcemanager.storageactions.implementation.models.StorageTaskReportSummary;
+import com.azure.resourcemanager.storageactions.implementation.models.StorageTasksListResult;
import com.azure.resourcemanager.storageactions.models.StorageTaskUpdateParameters;
-import com.azure.resourcemanager.storageactions.models.StorageTasksListResult;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -54,90 +58,195 @@ public final class StorageTasksClientImpl implements StorageTasksClient {
/**
* The service client containing this operation class.
*/
- private final StorageActionsMgmtClientImpl client;
+ private final StorageActionsClientImpl client;
/**
* Initializes an instance of StorageTasksClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- StorageTasksClientImpl(StorageActionsMgmtClientImpl client) {
+ StorageTasksClientImpl(StorageActionsClientImpl client) {
this.service
= RestProxy.create(StorageTasksService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for StorageActionsMgmtClientStorageTasks to be used by the proxy service
- * to perform REST calls.
+ * The interface defining all the services for StorageActionsClientStorageTasks to be used by the proxy service to
+ * perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "StorageActionsMgmtCl")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "StorageActionsClient")
public interface StorageTasksService {
@Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageTaskName") String storageTaskName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageTaskName") String storageTaskName, @HeaderParam("Accept") String accept,
+ Context context);
+
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
@ExpectedResponses({ 200, 201, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> create(@HostParam("$host") String endpoint,
+ Mono>> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("storageTaskName") String storageTaskName, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") StorageTaskInner parameters, @HeaderParam("Accept") String accept,
+ @PathParam("storageTaskName") String storageTaskName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") StorageTaskInner parameters,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
+ @ExpectedResponses({ 200, 201, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageTaskName") String storageTaskName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") StorageTaskInner parameters,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
+ @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("storageTaskName") String storageTaskName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") StorageTaskUpdateParameters parameters,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
+ @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("storageTaskName") String storageTaskName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") StorageTaskUpdateParameters parameters,
Context context);
@Headers({ "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
@ExpectedResponses({ 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("storageTaskName") String storageTaskName, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+ @PathParam("storageTaskName") String storageTaskName, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
- @ExpectedResponses({ 200 })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
+ @ExpectedResponses({ 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("storageTaskName") String storageTaskName, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+ @PathParam("storageTaskName") String storageTaskName, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
- @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}")
- @ExpectedResponses({ 200, 202 })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> update(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("storageTaskName") String storageTaskName, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") StorageTaskUpdateParameters parameters, @HeaderParam("Accept") String accept,
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
Context context);
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.StorageActions/storageTasks")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
+ Mono> listBySubscription(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StorageActions/storageTasks")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySubscriptionSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/reports")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageTaskName") String storageTaskName, @QueryParam("$maxpagesize") Integer maxpagesize,
+ @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/reports")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageTaskName") String storageTaskName, @QueryParam("$maxpagesize") Integer maxpagesize,
+ @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/storageTaskAssignments")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
+ Mono> storageTaskAssignmentList(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageTaskName") String storageTaskName, @QueryParam("$maxpagesize") Integer maxpagesize,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/providers/Microsoft.StorageActions/locations/{location}/previewActions")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageActions/storageTasks/{storageTaskName}/storageTaskAssignments")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> previewActions(@HostParam("$host") String endpoint,
+ Response storageTaskAssignmentListSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
- @PathParam("location") String location,
- @BodyParam("application/json") StorageTaskPreviewActionInner parameters,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageTaskName") String storageTaskName, @QueryParam("$maxpagesize") Integer maxpagesize,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -145,18 +254,157 @@ Mono> previewActions(@HostParam("$host")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ Response listBySubscriptionNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> storageTaskAssignmentListNext(
+ @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 storageTaskAssignmentListNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
}
+ /**
+ * Get the storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the storage task properties along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String storageTaskName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the storage task properties on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String storageTaskName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, storageTaskName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the storage task properties along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String storageTaskName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, accept, context);
+ }
+
+ /**
+ * Get the storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the storage task properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public StorageTaskInner getByResourceGroup(String resourceGroupName, String storageTaskName) {
+ return getByResourceGroupWithResponse(resourceGroupName, storageTaskName, Context.NONE).getValue();
+ }
+
/**
* Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
* created and a subsequent create request is issued with different properties, the storage task properties will be
@@ -179,6 +427,10 @@ private Mono>> createWithResponseAsync(String resource
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
@@ -187,22 +439,69 @@ private Mono>> createWithResponseAsync(String resource
return Mono
.error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
}
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context))
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, contentType, accept, parameters,
+ context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
+ * created and a subsequent create request is issued with different properties, the storage task properties will be
+ * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
+ * same set of properties, the request will succeed.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to create a Storage Task.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createWithResponse(String resourceGroupName, String storageTaskName,
+ StorageTaskInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, contentType, accept, parameters,
+ Context.NONE);
+ }
+
/**
* Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
* created and a subsequent create request is issued with different properties, the storage task properties will be
@@ -217,118 +516,361 @@ private Mono>> createWithResponseAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task along with {@link Response} on successful completion of {@link Mono}.
+ * @return represents Storage Task along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceGroupName, String storageTaskName,
+ private Response createWithResponse(String resourceGroupName, String storageTaskName,
StorageTaskInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, contentType, accept, parameters,
+ context);
+ }
+
+ /**
+ * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
+ * created and a subsequent create request is issued with different properties, the storage task properties will be
+ * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
+ * same set of properties, the request will succeed.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to create a Storage Task.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of represents Storage Task.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, StorageTaskInner> beginCreateAsync(String resourceGroupName,
+ String storageTaskName, StorageTaskInner parameters) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, storageTaskName, parameters);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ StorageTaskInner.class, StorageTaskInner.class, this.client.getContext());
+ }
+
+ /**
+ * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
+ * created and a subsequent create request is issued with different properties, the storage task properties will be
+ * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
+ * same set of properties, the request will succeed.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to create a Storage Task.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents Storage Task.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, StorageTaskInner> beginCreate(String resourceGroupName,
+ String storageTaskName, StorageTaskInner parameters) {
+ Response response = createWithResponse(resourceGroupName, storageTaskName, parameters);
+ return this.client.getLroResult(response, StorageTaskInner.class,
+ StorageTaskInner.class, Context.NONE);
+ }
+
+ /**
+ * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
+ * created and a subsequent create request is issued with different properties, the storage task properties will be
+ * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
+ * same set of properties, the request will succeed.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to create a Storage Task.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents Storage Task.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, StorageTaskInner> beginCreate(String resourceGroupName,
+ String storageTaskName, StorageTaskInner parameters, Context context) {
+ Response response = createWithResponse(resourceGroupName, storageTaskName, parameters, context);
+ return this.client.getLroResult(response, StorageTaskInner.class,
+ StorageTaskInner.class, context);
+ }
+
+ /**
+ * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
+ * created and a subsequent create request is issued with different properties, the storage task properties will be
+ * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
+ * same set of properties, the request will succeed.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to create a Storage Task.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String storageTaskName,
+ StorageTaskInner parameters) {
+ return beginCreateAsync(resourceGroupName, storageTaskName, parameters).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
+ * created and a subsequent create request is issued with different properties, the storage task properties will be
+ * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
+ * same set of properties, the request will succeed.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to create a Storage Task.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public StorageTaskInner create(String resourceGroupName, String storageTaskName, StorageTaskInner parameters) {
+ return beginCreate(resourceGroupName, storageTaskName, parameters).getFinalResult();
+ }
+
+ /**
+ * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
+ * created and a subsequent create request is issued with different properties, the storage task properties will be
+ * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
+ * same set of properties, the request will succeed.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to create a Storage Task.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public StorageTaskInner create(String resourceGroupName, String storageTaskName, StorageTaskInner parameters,
+ Context context) {
+ return beginCreate(resourceGroupName, storageTaskName, parameters, context).getFinalResult();
+ }
+
+ /**
+ * Update storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to provide to update the storage task resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String storageTaskName,
+ StorageTaskUpdateParameters parameters) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, contentType, accept, parameters,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update storage task properties.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param parameters The parameters to provide to update the storage task resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents Storage Task along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String storageTaskName,
+ StorageTaskUpdateParameters parameters) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
}
if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
parameters.validate();
}
+ final String contentType = "application/json";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context);
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, contentType, accept, parameters,
+ Context.NONE);
}
/**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
+ * @param parameters The parameters to provide to update the storage task resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of represents Storage Task.
+ * @return represents Storage Task along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, StorageTaskInner> beginCreateAsync(String resourceGroupName,
- String storageTaskName, StorageTaskInner parameters) {
- Mono>> mono = createWithResponseAsync(resourceGroupName, storageTaskName, parameters);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- StorageTaskInner.class, StorageTaskInner.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String storageTaskName,
+ StorageTaskUpdateParameters parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, contentType, accept, parameters,
+ context);
}
/**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
- * @param context The context to associate with this operation.
+ * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link PollerFlux} for polling of represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, StorageTaskInner> beginCreateAsync(String resourceGroupName,
- String storageTaskName, StorageTaskInner parameters, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = createWithResponseAsync(resourceGroupName, storageTaskName, parameters, context);
+ private PollerFlux, StorageTaskInner> beginUpdateAsync(String resourceGroupName,
+ String storageTaskName, StorageTaskUpdateParameters parameters) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, storageTaskName, parameters);
return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- StorageTaskInner.class, StorageTaskInner.class, context);
+ StorageTaskInner.class, StorageTaskInner.class, this.client.getContext());
}
/**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
+ * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, StorageTaskInner> beginCreate(String resourceGroupName,
- String storageTaskName, StorageTaskInner parameters) {
- return this.beginCreateAsync(resourceGroupName, storageTaskName, parameters).getSyncPoller();
+ public SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
+ String storageTaskName, StorageTaskUpdateParameters parameters) {
+ Response response = updateWithResponse(resourceGroupName, storageTaskName, parameters);
+ return this.client.getLroResult(response, StorageTaskInner.class,
+ StorageTaskInner.class, Context.NONE);
}
/**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
+ * @param parameters The parameters to provide to update the storage task resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -336,86 +878,57 @@ public SyncPoller, StorageTaskInner> beginCreate(St
* @return the {@link SyncPoller} for polling of represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, StorageTaskInner> beginCreate(String resourceGroupName,
- String storageTaskName, StorageTaskInner parameters, Context context) {
- return this.beginCreateAsync(resourceGroupName, storageTaskName, parameters, context).getSyncPoller();
- }
-
- /**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceGroupName, String storageTaskName,
- StorageTaskInner parameters) {
- return beginCreateAsync(resourceGroupName, storageTaskName, parameters).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ public SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
+ String storageTaskName, StorageTaskUpdateParameters parameters, Context context) {
+ Response response = updateWithResponse(resourceGroupName, storageTaskName, parameters, context);
+ return this.client.getLroResult(response, StorageTaskInner.class,
+ StorageTaskInner.class, context);
}
/**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
- * @param context The context to associate with this operation.
+ * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents Storage Task on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceGroupName, String storageTaskName,
- StorageTaskInner parameters, Context context) {
- return beginCreateAsync(resourceGroupName, storageTaskName, parameters, context).last()
+ private Mono updateAsync(String resourceGroupName, String storageTaskName,
+ StorageTaskUpdateParameters parameters) {
+ return beginUpdateAsync(resourceGroupName, storageTaskName, parameters).last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
+ * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public StorageTaskInner create(String resourceGroupName, String storageTaskName, StorageTaskInner parameters) {
- return createAsync(resourceGroupName, storageTaskName, parameters).block();
+ public StorageTaskInner update(String resourceGroupName, String storageTaskName,
+ StorageTaskUpdateParameters parameters) {
+ return beginUpdate(resourceGroupName, storageTaskName, parameters).getFinalResult();
}
/**
- * Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already
- * created and a subsequent create request is issued with different properties, the storage task properties will be
- * updated. If a storage task is already created and a subsequent create or update request is issued with the exact
- * same set of properties, the request will succeed.
+ * Update storage task properties.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to create a Storage Task.
+ * @param parameters The parameters to provide to update the storage task resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -423,9 +936,9 @@ public StorageTaskInner create(String resourceGroupName, String storageTaskName,
* @return represents Storage Task.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public StorageTaskInner create(String resourceGroupName, String storageTaskName, StorageTaskInner parameters,
- Context context) {
- return createAsync(resourceGroupName, storageTaskName, parameters, context).block();
+ public StorageTaskInner update(String resourceGroupName, String storageTaskName,
+ StorageTaskUpdateParameters parameters, Context context) {
+ return beginUpdate(resourceGroupName, storageTaskName, parameters, context).getFinalResult();
}
/**
@@ -445,6 +958,10 @@ private Mono>> deleteWithResponseAsync(String resource
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
if (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
@@ -453,14 +970,10 @@ private Mono>> deleteWithResponseAsync(String resource
return Mono
.error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
}
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -470,35 +983,34 @@ private Mono>> deleteWithResponseAsync(String resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String storageTaskName,
- Context context) {
+ private Response deleteWithResponse(String resourceGroupName, String storageTaskName) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, accept, Context.NONE);
}
/**
@@ -507,16 +1019,35 @@ private Mono>> deleteWithResponseAsync(String resource
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
+ * @return the response body along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String storageTaskName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageTaskName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String storageTaskName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, accept, context);
}
/**
@@ -525,19 +1056,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is 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 storageTaskName,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageTaskName, context);
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String storageTaskName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageTaskName);
return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
+ this.client.getContext());
}
/**
@@ -553,7 +1081,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String storageTaskName) {
- return this.beginDeleteAsync(resourceGroupName, storageTaskName).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, storageTaskName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -571,7 +1100,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String storageTaskName,
Context context) {
- return this.beginDeleteAsync(resourceGroupName, storageTaskName, context).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, storageTaskName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -591,24 +1121,6 @@ private Mono deleteAsync(String resourceGroupName, String storageTaskName)
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Delete the storage task resource.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException 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 storageTaskName, Context context) {
- return beginDeleteAsync(resourceGroupName, storageTaskName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Delete the storage task resource.
*
@@ -621,7 +1133,7 @@ private Mono deleteAsync(String resourceGroupName, String storageTaskName,
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String storageTaskName) {
- deleteAsync(resourceGroupName, storageTaskName).block();
+ beginDelete(resourceGroupName, storageTaskName).getFinalResult();
}
/**
@@ -637,415 +1149,503 @@ public void delete(String resourceGroupName, String storageTaskName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String storageTaskName, Context context) {
- deleteAsync(resourceGroupName, storageTaskName, context).block();
+ beginDelete(resourceGroupName, storageTaskName, context).getFinalResult();
}
/**
- * Get the storage task properties.
+ * Lists all the storage tasks available under the given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the storage task properties along with {@link Response} on successful completion of {@link Mono}.
+ * @return the response from the List Storage Task operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String storageTaskName) {
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
- }
if (this.client.getSubscriptionId() == null) {
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName,
- storageTaskName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context))
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Get the storage task properties.
+ * Lists all the storage tasks available under the given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the storage task properties along with {@link Response} on successful completion of {@link Mono}.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the storage tasks available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from the List Storage Task operation along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String storageTaskName, Context context) {
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Get the storage task properties.
+ * Lists all the storage tasks available under the given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the storage task properties on successful completion of {@link Mono}.
+ * @return the response from the List Storage Task operation along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String storageTaskName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, storageTaskName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Get the storage task properties.
+ * Lists all the storage tasks available under the given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the storage task properties along with {@link Response}.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(String resourceGroupName, String storageTaskName,
- Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, storageTaskName, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
}
/**
- * Get the storage task properties.
+ * Lists all the storage tasks available under the given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the storage task properties.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public StorageTaskInner getByResourceGroup(String resourceGroupName, String storageTaskName) {
- return getByResourceGroupWithResponse(resourceGroupName, storageTaskName, Context.NONE).getValue();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
}
/**
- * Update storage task properties.
+ * Lists all the storage tasks available under the subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task along with {@link Response} on successful completion of {@link Mono}.
+ * @return the response from the List Storage Task operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String storageTaskName,
- StorageTaskUpdateParameters parameters) {
+ private Mono> listBySubscriptionSinglePageAsync() {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
- }
if (this.client.getSubscriptionId() == null) {
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context))
+ .withContext(context -> service.listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Update storage task properties.
+ * Lists all the storage tasks available under the subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task along with {@link Response} on successful completion of {@link Mono}.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionAsync() {
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the storage tasks available under the subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from the List Storage Task operation along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String storageTaskName,
- StorageTaskUpdateParameters parameters, Context context) {
+ private PagedResponse listBySubscriptionSinglePage() {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (storageTaskName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ final String accept = "application/json";
+ Response res = service.listBySubscriptionSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all the storage tasks available under the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from the List Storage Task operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionSinglePage(Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), resourceGroupName, storageTaskName,
- this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context);
+ Response res = service.listBySubscriptionSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Update storage task properties.
+ * Lists all the storage tasks available under the subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of represents Storage Task.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, StorageTaskInner> beginUpdateAsync(String resourceGroupName,
- String storageTaskName, StorageTaskUpdateParameters parameters) {
- Mono>> mono = updateWithResponseAsync(resourceGroupName, storageTaskName, parameters);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- StorageTaskInner.class, StorageTaskInner.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription() {
+ return new PagedIterable<>(() -> listBySubscriptionSinglePage(),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink));
}
/**
- * Update storage task properties.
+ * Lists all the storage tasks available under the subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
- * be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of represents Storage Task.
+ * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, StorageTaskInner> beginUpdateAsync(String resourceGroupName,
- String storageTaskName, StorageTaskUpdateParameters parameters, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = updateWithResponseAsync(resourceGroupName, storageTaskName, parameters, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- StorageTaskInner.class, StorageTaskInner.class, context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription(Context context) {
+ return new PagedIterable<>(() -> listBySubscriptionSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink, context));
}
/**
- * Update storage task properties.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
+ * @param filter Optional. When specified, it can be used to query using reporting properties.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of represents Storage Task.
+ * @return fetch Storage Tasks Run Summary along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
- String storageTaskName, StorageTaskUpdateParameters parameters) {
- return this.beginUpdateAsync(resourceGroupName, storageTaskName, parameters).getSyncPoller();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String storageTaskName, Integer maxpagesize, String filter) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, maxpagesize, filter, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Update storage task properties.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
- * @param context The context to associate with this operation.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
+ * @param filter Optional. When specified, it can be used to query using reporting properties.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of represents Storage Task.
+ * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, StorageTaskInner> beginUpdate(String resourceGroupName,
- String storageTaskName, StorageTaskUpdateParameters parameters, Context context) {
- return this.beginUpdateAsync(resourceGroupName, storageTaskName, parameters, context).getSyncPoller();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String storageTaskName,
+ Integer maxpagesize, String filter) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, storageTaskName, maxpagesize, filter),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Update storage task properties.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task on successful completion of {@link Mono}.
+ * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String storageTaskName,
- StorageTaskUpdateParameters parameters) {
- return beginUpdateAsync(resourceGroupName, storageTaskName, parameters).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String storageTaskName) {
+ final Integer maxpagesize = null;
+ final String filter = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, storageTaskName, maxpagesize, filter),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Update storage task properties.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
- * @param context The context to associate with this operation.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
+ * @param filter Optional. When specified, it can be used to query using reporting properties.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task on successful completion of {@link Mono}.
+ * @return fetch Storage Tasks Run Summary along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String storageTaskName,
- StorageTaskUpdateParameters parameters, Context context) {
- return beginUpdateAsync(resourceGroupName, storageTaskName, parameters, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String storageTaskName, Integer maxpagesize, String filter) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, storageTaskName, maxpagesize, filter, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Update storage task properties.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
+ * @param filter Optional. When specified, it can be used to query using reporting properties.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task.
+ * @return fetch Storage Tasks Run Summary along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public StorageTaskInner update(String resourceGroupName, String storageTaskName,
- StorageTaskUpdateParameters parameters) {
- return updateAsync(resourceGroupName, storageTaskName, parameters).block();
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String storageTaskName, Integer maxpagesize, String filter, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, storageTaskName, maxpagesize, filter, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Update storage task properties.
+ * Fetch the storage tasks run report summary for each assignment.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
* be between 3 and 18 characters in length and use numbers and lower-case letters only.
- * @param parameters The parameters to provide to update the storage task resource.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents Storage Task.
+ * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public StorageTaskInner update(String resourceGroupName, String storageTaskName,
- StorageTaskUpdateParameters parameters, Context context) {
- return updateAsync(resourceGroupName, storageTaskName, parameters, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String storageTaskName) {
+ final Integer maxpagesize = null;
+ final String filter = null;
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, storageTaskName, maxpagesize, filter),
+ nextLink -> listNextSinglePage(nextLink));
}
/**
- * Lists all the storage tasks available under the subscription.
+ * Fetch the storage tasks run report summary for each assignment.
*
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Task operation along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync() {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
+ * @param filter Optional. When specified, it can be used to query using reporting properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return fetch Storage Tasks Run Summary as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String storageTaskName,
+ Integer maxpagesize, String filter, Context context) {
+ return new PagedIterable<>(
+ () -> listSinglePage(resourceGroupName, storageTaskName, maxpagesize, filter, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
- * Lists all the storage tasks available under the subscription.
+ * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
*
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Task operation along with {@link PagedResponse} on successful
+ * @return the response from the List Storage Tasks operation along with {@link PagedResponse} on successful
* completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
+ private Mono> storageTaskAssignmentListSinglePageAsync(
+ String resourceGroupName, String storageTaskName, Integer maxpagesize) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -1054,315 +1654,382 @@ private Mono> listSinglePageAsync(Context contex
return Mono.error(new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageTaskName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageTaskName is required and cannot be null."));
+ }
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
- context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Lists all the storage tasks available under the subscription.
- *
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Task operation as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ return FluxUtil
+ .withContext(
+ context -> service.storageTaskAssignmentList(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, storageTaskName, maxpagesize, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Lists all the storage tasks available under the subscription.
+ * Lists Resource IDs of the Storage Task Assignments associated with this Storage Task.
*
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageTaskName The name of the storage task within the specified resource group. Storage task names must
+ * be between 3 and 18 characters in length and use numbers and lower-case letters only.
+ * @param maxpagesize Optional, specifies the maximum number of Storage Task Assignment Resource IDs to be included
+ * in the list response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Task operation as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists all the storage tasks available under the subscription.
- *
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response from the List Storage Task operation as paginated response with {@link PagedIterable}.
+ * @return the response from the List Storage Tasks operation as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable