diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md b/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md
index 19c77d3cb9e0..44cff0ba043a 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.6 (Unreleased)
+## 1.0.0-beta.1 (2022-06-08)
+
+- Azure Resource Manager StorageCache client library for Java. This package contains Microsoft Azure SDK for StorageCache Management SDK. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/README.md b/sdk/storagecache/azure-resourcemanager-storagecache/README.md
index c96127f7a44e..5b97788c2070 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/README.md
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager StorageCache client library for Java.
-This package contains Microsoft Azure SDK for StorageCache Management SDK. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-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 StorageCache Management SDK. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-05. 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.resourcemanagerazure-resourcemanager-storagecache
- 1.0.0-beta.5
+ 1.0.0-beta.6
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md
index d43b2107700e..a5b6f67a7993 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md
@@ -18,8 +18,13 @@
- [GetByResourceGroup](#caches_getbyresourcegroup)
- [List](#caches_list)
- [ListByResourceGroup](#caches_listbyresourcegroup)
+- [PausePrimingJob](#caches_pauseprimingjob)
+- [ResumePrimingJob](#caches_resumeprimingjob)
+- [SpaceAllocation](#caches_spaceallocation)
- [Start](#caches_start)
+- [StartPrimingJob](#caches_startprimingjob)
- [Stop](#caches_stop)
+- [StopPrimingJob](#caches_stopprimingjob)
- [Update](#caches_update)
- [UpgradeFirmware](#caches_upgradefirmware)
@@ -57,7 +62,7 @@ import com.azure.core.util.Context;
/** Samples for AscOperations Get. */
public final class AscOperationsGetSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/AscOperations_Get.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscOperations_Get.json
*/
/**
* Sample code: AscOperations_Get.
@@ -78,7 +83,7 @@ import com.azure.core.util.Context;
/** Samples for AscUsages List. */
public final class AscUsagesListSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/AscResourceUsages_Get.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscResourceUsages_Get.json
*/
/**
* Sample code: AscUsages_List.
@@ -102,6 +107,7 @@ import com.azure.resourcemanager.storagecache.models.CacheIdentity;
import com.azure.resourcemanager.storagecache.models.CacheIdentityType;
import com.azure.resourcemanager.storagecache.models.CacheSecuritySettings;
import com.azure.resourcemanager.storagecache.models.CacheSku;
+import com.azure.resourcemanager.storagecache.models.CacheUpgradeSettings;
import com.azure.resourcemanager.storagecache.models.CacheUsernameDownloadSettings;
import com.azure.resourcemanager.storagecache.models.CacheUsernameDownloadSettingsCredentials;
import com.azure.resourcemanager.storagecache.models.KeyVaultKeyReference;
@@ -112,6 +118,7 @@ import com.azure.resourcemanager.storagecache.models.NfsAccessRuleAccess;
import com.azure.resourcemanager.storagecache.models.NfsAccessRuleScope;
import com.azure.resourcemanager.storagecache.models.UserAssignedIdentitiesValue;
import com.azure.resourcemanager.storagecache.models.UsernameSource;
+import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -119,7 +126,7 @@ import java.util.Map;
/** Samples for Caches CreateOrUpdate. */
public final class CachesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_CreateOrUpdate_ldap_only.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_CreateOrUpdate_ldap_only.json
*/
/**
* Sample code: Caches_CreateOrUpdate_ldap_only.
@@ -138,6 +145,10 @@ public final class CachesCreateOrUpdateSamples {
.withCacheSizeGB(3072)
.withSubnet(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1")
+ .withUpgradeSettings(
+ new CacheUpgradeSettings()
+ .withUpgradeScheduleEnabled(true)
+ .withScheduledTime(OffsetDateTime.parse("2022-04-26T18:25:43.511Z")))
.withEncryptionSettings(
new CacheEncryptionSettings()
.withKeyEncryptionKey(
@@ -179,7 +190,7 @@ public final class CachesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_CreateOrUpdate.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_CreateOrUpdate.json
*/
/**
* Sample code: Caches_CreateOrUpdate.
@@ -204,6 +215,10 @@ public final class CachesCreateOrUpdateSamples {
.withCacheSizeGB(3072)
.withSubnet(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1")
+ .withUpgradeSettings(
+ new CacheUpgradeSettings()
+ .withUpgradeScheduleEnabled(true)
+ .withScheduledTime(OffsetDateTime.parse("2022-04-26T18:25:43.511Z")))
.withEncryptionSettings(
new CacheEncryptionSettings()
.withKeyEncryptionKey(
@@ -276,7 +291,7 @@ import com.azure.core.util.Context;
/** Samples for Caches DebugInfo. */
public final class CachesDebugInfoSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_DebugInfo.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_DebugInfo.json
*/
/**
* Sample code: Caches_DebugInfo.
@@ -297,7 +312,7 @@ import com.azure.core.util.Context;
/** Samples for Caches Delete. */
public final class CachesDeleteSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Delete.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Delete.json
*/
/**
* Sample code: Caches_Delete.
@@ -318,7 +333,7 @@ import com.azure.core.util.Context;
/** Samples for Caches Flush. */
public final class CachesFlushSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Flush.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Flush.json
*/
/**
* Sample code: Caches_Flush.
@@ -339,7 +354,7 @@ import com.azure.core.util.Context;
/** Samples for Caches GetByResourceGroup. */
public final class CachesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Get.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Get.json
*/
/**
* Sample code: Caches_Get.
@@ -360,7 +375,7 @@ import com.azure.core.util.Context;
/** Samples for Caches List. */
public final class CachesListSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_List.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_List.json
*/
/**
* Sample code: Caches_List.
@@ -381,7 +396,7 @@ import com.azure.core.util.Context;
/** Samples for Caches ListByResourceGroup. */
public final class CachesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_ListByResourceGroup.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_ListByResourceGroup.json
*/
/**
* Sample code: Caches_ListByResourceGroup.
@@ -394,6 +409,89 @@ public final class CachesListByResourceGroupSamples {
}
```
+### Caches_PausePrimingJob
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter;
+
+/** Samples for Caches PausePrimingJob. */
+public final class CachesPausePrimingJobSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/PausePrimingJob.json
+ */
+ /**
+ * Sample code: PausePrimingJob.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void pausePrimingJob(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .caches()
+ .pausePrimingJob(
+ "scgroup", "sc1", new PrimingJobIdParameter().withPrimingJobId("00000000000_0000000000"), Context.NONE);
+ }
+}
+```
+
+### Caches_ResumePrimingJob
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter;
+
+/** Samples for Caches ResumePrimingJob. */
+public final class CachesResumePrimingJobSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/ResumePrimingJob.json
+ */
+ /**
+ * Sample code: ResumePrimingJob.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void resumePrimingJob(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .caches()
+ .resumePrimingJob(
+ "scgroup", "sc1", new PrimingJobIdParameter().withPrimingJobId("00000000000_0000000000"), Context.NONE);
+ }
+}
+```
+
+### Caches_SpaceAllocation
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagecache.models.StorageTargetSpaceAllocation;
+import java.util.Arrays;
+
+/** Samples for Caches SpaceAllocation. */
+public final class CachesSpaceAllocationSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/SpaceAllocation_Post.json
+ */
+ /**
+ * Sample code: SpaceAllocation_Post.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void spaceAllocationPost(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .caches()
+ .spaceAllocation(
+ "scgroup",
+ "sc1",
+ Arrays
+ .asList(
+ new StorageTargetSpaceAllocation().withName("st1").withAllocationPercentage(25),
+ new StorageTargetSpaceAllocation().withName("st2").withAllocationPercentage(50),
+ new StorageTargetSpaceAllocation().withName("st3").withAllocationPercentage(25)),
+ Context.NONE);
+ }
+}
+```
+
### Caches_Start
```java
@@ -402,7 +500,7 @@ import com.azure.core.util.Context;
/** Samples for Caches Start. */
public final class CachesStartSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Start.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Start.json
*/
/**
* Sample code: Caches_Start.
@@ -415,6 +513,37 @@ public final class CachesStartSamples {
}
```
+### Caches_StartPrimingJob
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagecache.models.PrimingJob;
+
+/** Samples for Caches StartPrimingJob. */
+public final class CachesStartPrimingJobSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StartPrimingJob.json
+ */
+ /**
+ * Sample code: StartPrimingJob.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void startPrimingJob(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .caches()
+ .startPrimingJob(
+ "scgroup",
+ "sc1",
+ new PrimingJob()
+ .withPrimingJobName("contosoJob")
+ .withPrimingManifestUrl(
+ "https://contosostorage.blob.core.windows.net/contosoblob/00000000_00000000000000000000000000000000.00000000000.FFFFFFFF.00000000?sp=r&st=2021-08-11T19:33:35Z&se=2021-08-12T03:33:35Z&spr=https&sv=2020-08-04&sr=b&sig="),
+ Context.NONE);
+ }
+}
+```
+
### Caches_Stop
```java
@@ -423,7 +552,7 @@ import com.azure.core.util.Context;
/** Samples for Caches Stop. */
public final class CachesStopSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Stop.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Stop.json
*/
/**
* Sample code: Caches_Stop.
@@ -436,6 +565,31 @@ public final class CachesStopSamples {
}
```
+### Caches_StopPrimingJob
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter;
+
+/** Samples for Caches StopPrimingJob. */
+public final class CachesStopPrimingJobSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StopPrimingJob.json
+ */
+ /**
+ * Sample code: StopPrimingJob.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void stopPrimingJob(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .caches()
+ .stopPrimingJob(
+ "scgroup", "sc1", new PrimingJobIdParameter().withPrimingJobId("00000000000_0000000000"), Context.NONE);
+ }
+}
+```
+
### Caches_Update
```java
@@ -445,6 +599,7 @@ import com.azure.resourcemanager.storagecache.models.CacheActiveDirectorySetting
import com.azure.resourcemanager.storagecache.models.CacheDirectorySettings;
import com.azure.resourcemanager.storagecache.models.CacheNetworkSettings;
import com.azure.resourcemanager.storagecache.models.CacheSecuritySettings;
+import com.azure.resourcemanager.storagecache.models.CacheUpgradeSettings;
import com.azure.resourcemanager.storagecache.models.CacheUsernameDownloadSettings;
import com.azure.resourcemanager.storagecache.models.CacheUsernameDownloadSettingsCredentials;
import com.azure.resourcemanager.storagecache.models.NfsAccessPolicy;
@@ -452,6 +607,7 @@ import com.azure.resourcemanager.storagecache.models.NfsAccessRule;
import com.azure.resourcemanager.storagecache.models.NfsAccessRuleAccess;
import com.azure.resourcemanager.storagecache.models.NfsAccessRuleScope;
import com.azure.resourcemanager.storagecache.models.UsernameSource;
+import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -459,7 +615,7 @@ import java.util.Map;
/** Samples for Caches Update. */
public final class CachesUpdateSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Update_ldap_only.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Update_ldap_only.json
*/
/**
* Sample code: Caches_Update_ldap_only.
@@ -471,6 +627,10 @@ public final class CachesUpdateSamples {
resource
.update()
.withTags(mapOf("Dept", "Contoso"))
+ .withUpgradeSettings(
+ new CacheUpgradeSettings()
+ .withUpgradeScheduleEnabled(true)
+ .withScheduledTime(OffsetDateTime.parse("2022-04-26T18:25:43.511Z")))
.withNetworkSettings(
new CacheNetworkSettings()
.withMtu(1500)
@@ -536,7 +696,7 @@ public final class CachesUpdateSamples {
}
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Update.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Update.json
*/
/**
* Sample code: Caches_Update.
@@ -548,6 +708,10 @@ public final class CachesUpdateSamples {
resource
.update()
.withTags(mapOf("Dept", "Contoso"))
+ .withUpgradeSettings(
+ new CacheUpgradeSettings()
+ .withUpgradeScheduleEnabled(true)
+ .withScheduledTime(OffsetDateTime.parse("2022-04-26T18:25:43.511Z")))
.withNetworkSettings(
new CacheNetworkSettings()
.withMtu(1500)
@@ -634,7 +798,7 @@ import com.azure.core.util.Context;
/** Samples for Caches UpgradeFirmware. */
public final class CachesUpgradeFirmwareSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_UpgradeFirmware.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_UpgradeFirmware.json
*/
/**
* Sample code: Caches_UpgradeFirmware.
@@ -655,7 +819,7 @@ import com.azure.core.util.Context;
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Operations_List.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
@@ -676,7 +840,7 @@ import com.azure.core.util.Context;
/** Samples for Skus List. */
public final class SkusListSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Skus_List.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Skus_List.json
*/
/**
* Sample code: Skus_List.
@@ -697,7 +861,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargetOperation Flush. */
public final class StorageTargetOperationFlushSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Flush.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Flush.json
*/
/**
* Sample code: StorageTargets_Flush.
@@ -718,7 +882,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargetOperation Invalidate. */
public final class StorageTargetOperationInvalidateSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Invalidate.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Invalidate.json
*/
/**
* Sample code: StorageTargets_Invalidate.
@@ -739,7 +903,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargetOperation Resume. */
public final class StorageTargetOperationResumeSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Resume.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Resume.json
*/
/**
* Sample code: StorageTargets_Resume.
@@ -760,7 +924,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargetOperation Suspend. */
public final class StorageTargetOperationSuspendSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Suspend.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Suspend.json
*/
/**
* Sample code: StorageTargets_Suspend.
@@ -785,7 +949,7 @@ import java.util.Arrays;
/** Samples for StorageTargets CreateOrUpdate. */
public final class StorageTargetsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate.json
*/
/**
* Sample code: StorageTargets_CreateOrUpdate.
@@ -817,7 +981,7 @@ public final class StorageTargetsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json
*/
/**
* Sample code: StorageTargets_CreateOrUpdate_BlobNfs.
@@ -841,7 +1005,7 @@ public final class StorageTargetsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json
*/
/**
* Sample code: StorageTargets_CreateOrUpdate_NoJunctions.
@@ -869,7 +1033,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargets Delete. */
public final class StorageTargetsDeleteSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Delete.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Delete.json
*/
/**
* Sample code: StorageTargets_Delete.
@@ -890,7 +1054,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargets DnsRefresh. */
public final class StorageTargetsDnsRefreshSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_DnsRefresh.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_DnsRefresh.json
*/
/**
* Sample code: Caches_DnsRefresh.
@@ -911,7 +1075,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargets Get. */
public final class StorageTargetsGetSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Get.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Get.json
*/
/**
* Sample code: StorageTargets_Get.
@@ -932,7 +1096,7 @@ import com.azure.core.util.Context;
/** Samples for StorageTargets ListByCache. */
public final class StorageTargetsListByCacheSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_ListByCache.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_ListByCache.json
*/
/**
* Sample code: StorageTargets_List.
@@ -953,7 +1117,7 @@ import com.azure.core.util.Context;
/** Samples for UsageModels List. */
public final class UsageModelsListSamples {
/*
- * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/UsageModels_List.json
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/UsageModels_List.json
*/
/**
* Sample code: UsageModels_List.
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml
index ebe694c344fb..2114f72f6996 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml
@@ -13,7 +13,7 @@
jarMicrosoft Azure SDK for StorageCache Management
- This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-01.
+ This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-05.https://github.com/Azure/azure-sdk-for-java
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/StorageCacheManager.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/StorageCacheManager.java
index 119a7f70a0df..98ed5b5b394a 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/StorageCacheManager.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/StorageCacheManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -95,6 +97,19 @@ public static StorageCacheManager authenticate(TokenCredential credential, Azure
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of StorageCache service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the StorageCache service API instance.
+ */
+ public static StorageCacheManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new StorageCacheManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create StorageCacheManager with optional configuration.
*
@@ -113,6 +128,7 @@ public static final class Configurable {
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -173,6 +189,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -206,7 +235,7 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.storagecache")
.append("/")
- .append("1.0.0-beta.5");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -224,10 +253,15 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -258,7 +292,11 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile
}
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -266,7 +304,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of Skus. */
+ /**
+ * Gets the resource collection API of Skus.
+ *
+ * @return Resource collection API of Skus.
+ */
public Skus skus() {
if (this.skus == null) {
this.skus = new SkusImpl(clientObject.getSkus(), this);
@@ -274,7 +316,11 @@ public Skus skus() {
return skus;
}
- /** @return Resource collection API of UsageModels. */
+ /**
+ * Gets the resource collection API of UsageModels.
+ *
+ * @return Resource collection API of UsageModels.
+ */
public UsageModels usageModels() {
if (this.usageModels == null) {
this.usageModels = new UsageModelsImpl(clientObject.getUsageModels(), this);
@@ -282,7 +328,11 @@ public UsageModels usageModels() {
return usageModels;
}
- /** @return Resource collection API of AscOperations. */
+ /**
+ * Gets the resource collection API of AscOperations.
+ *
+ * @return Resource collection API of AscOperations.
+ */
public AscOperations ascOperations() {
if (this.ascOperations == null) {
this.ascOperations = new AscOperationsImpl(clientObject.getAscOperations(), this);
@@ -290,7 +340,11 @@ public AscOperations ascOperations() {
return ascOperations;
}
- /** @return Resource collection API of AscUsages. */
+ /**
+ * Gets the resource collection API of AscUsages.
+ *
+ * @return Resource collection API of AscUsages.
+ */
public AscUsages ascUsages() {
if (this.ascUsages == null) {
this.ascUsages = new AscUsagesImpl(clientObject.getAscUsages(), this);
@@ -298,7 +352,11 @@ public AscUsages ascUsages() {
return ascUsages;
}
- /** @return Resource collection API of Caches. */
+ /**
+ * Gets the resource collection API of Caches. It manages Cache.
+ *
+ * @return Resource collection API of Caches.
+ */
public Caches caches() {
if (this.caches == null) {
this.caches = new CachesImpl(clientObject.getCaches(), this);
@@ -306,7 +364,11 @@ public Caches caches() {
return caches;
}
- /** @return Resource collection API of StorageTargets. */
+ /**
+ * Gets the resource collection API of StorageTargets. It manages StorageTarget.
+ *
+ * @return Resource collection API of StorageTargets.
+ */
public StorageTargets storageTargets() {
if (this.storageTargets == null) {
this.storageTargets = new StorageTargetsImpl(clientObject.getStorageTargets(), this);
@@ -314,7 +376,11 @@ public StorageTargets storageTargets() {
return storageTargets;
}
- /** @return Resource collection API of StorageTargetOperations. */
+ /**
+ * Gets the resource collection API of StorageTargetOperations.
+ *
+ * @return Resource collection API of StorageTargetOperations.
+ */
public StorageTargetOperations storageTargetOperations() {
if (this.storageTargetOperations == null) {
this.storageTargetOperations =
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/CachesClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/CachesClient.java
index 6d8139311058..8a5056f54bbd 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/CachesClient.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/CachesClient.java
@@ -12,6 +12,10 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.storagecache.fluent.models.CacheInner;
+import com.azure.resourcemanager.storagecache.models.PrimingJob;
+import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter;
+import com.azure.resourcemanager.storagecache.models.StorageTargetSpaceAllocation;
+import java.util.List;
/** An instance of this class provides access to all the operations defined in CachesClient. */
public interface CachesClient {
@@ -489,6 +493,309 @@ Response updateWithResponse(
@ServiceMethod(returns = ReturnType.SINGLE)
void stop(String resourceGroupName, String cacheName, Context context);
+ /**
+ * Create a priming job. This operation is only allowed when the cache is healthy.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJob primingjob);
+
+ /**
+ * Create a priming job. This operation is only allowed when the cache is healthy.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJob primingjob, Context context);
+
+ /**
+ * Create a priming job. This operation is only allowed when the cache is healthy.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob);
+
+ /**
+ * Create a priming job. This operation is only allowed when the cache is healthy.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startPrimingJob(String resourceGroupName, String cacheName);
+
+ /**
+ * Create a priming job. This operation is only allowed when the cache is healthy.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob, Context context);
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStopPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId);
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStopPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context);
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stopPrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId);
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stopPrimingJob(String resourceGroupName, String cacheName);
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stopPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context);
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginPausePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId);
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginPausePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context);
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void pausePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId);
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void pausePrimingJob(String resourceGroupName, String cacheName);
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void pausePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context);
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginResumePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId);
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginResumePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context);
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void resumePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId);
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void resumePrimingJob(String resourceGroupName, String cacheName);
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void resumePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context);
+
/**
* Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
*
@@ -545,4 +852,87 @@ SyncPoller, Void> beginUpgradeFirmware(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void upgradeFirmware(String resourceGroupName, String cacheName, Context context);
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginSpaceAllocation(
+ String resourceGroupName, String cacheName, List spaceAllocation);
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginSpaceAllocation(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ Context context);
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void spaceAllocation(
+ String resourceGroupName, String cacheName, List spaceAllocation);
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void spaceAllocation(String resourceGroupName, String cacheName);
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void spaceAllocation(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ Context context);
}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java
index e86db299e5ec..8ec27d6e206c 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java
@@ -14,8 +14,11 @@
import com.azure.resourcemanager.storagecache.models.CacheNetworkSettings;
import com.azure.resourcemanager.storagecache.models.CacheSecuritySettings;
import com.azure.resourcemanager.storagecache.models.CacheSku;
+import com.azure.resourcemanager.storagecache.models.CacheUpgradeSettings;
import com.azure.resourcemanager.storagecache.models.CacheUpgradeStatus;
+import com.azure.resourcemanager.storagecache.models.PrimingJob;
import com.azure.resourcemanager.storagecache.models.ProvisioningStateType;
+import com.azure.resourcemanager.storagecache.models.StorageTargetSpaceAllocation;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
@@ -205,6 +208,29 @@ public CacheUpgradeStatus upgradeStatus() {
return this.innerProperties() == null ? null : this.innerProperties().upgradeStatus();
}
+ /**
+ * Get the upgradeSettings property: Upgrade settings of the Cache.
+ *
+ * @return the upgradeSettings value.
+ */
+ public CacheUpgradeSettings upgradeSettings() {
+ return this.innerProperties() == null ? null : this.innerProperties().upgradeSettings();
+ }
+
+ /**
+ * Set the upgradeSettings property: Upgrade settings of the Cache.
+ *
+ * @param upgradeSettings the upgradeSettings value to set.
+ * @return the CacheInner object itself.
+ */
+ public CacheInner withUpgradeSettings(CacheUpgradeSettings upgradeSettings) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CacheProperties();
+ }
+ this.innerProperties().withUpgradeSettings(upgradeSettings);
+ return this;
+ }
+
/**
* Get the networkSettings property: Specifies network settings of the cache.
*
@@ -322,6 +348,24 @@ public CacheInner withZones(List zones) {
return this;
}
+ /**
+ * Get the primingJobs property: Specifies the priming jobs defined in the cache.
+ *
+ * @return the primingJobs value.
+ */
+ public List primingJobs() {
+ return this.innerProperties() == null ? null : this.innerProperties().primingJobs();
+ }
+
+ /**
+ * Get the spaceAllocation property: Specifies the space allocation percentage for each storage target in the cache.
+ *
+ * @return the spaceAllocation value.
+ */
+ public List spaceAllocation() {
+ return this.innerProperties() == null ? null : this.innerProperties().spaceAllocation();
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java
index 87e53c61cb26..2f76fa8e435a 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java
@@ -10,8 +10,11 @@
import com.azure.resourcemanager.storagecache.models.CacheHealth;
import com.azure.resourcemanager.storagecache.models.CacheNetworkSettings;
import com.azure.resourcemanager.storagecache.models.CacheSecuritySettings;
+import com.azure.resourcemanager.storagecache.models.CacheUpgradeSettings;
import com.azure.resourcemanager.storagecache.models.CacheUpgradeStatus;
+import com.azure.resourcemanager.storagecache.models.PrimingJob;
import com.azure.resourcemanager.storagecache.models.ProvisioningStateType;
+import com.azure.resourcemanager.storagecache.models.StorageTargetSpaceAllocation;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -55,6 +58,12 @@ public final class CacheProperties {
@JsonProperty(value = "upgradeStatus", access = JsonProperty.Access.WRITE_ONLY)
private CacheUpgradeStatus upgradeStatus;
+ /*
+ * Upgrade settings of the Cache.
+ */
+ @JsonProperty(value = "upgradeSettings")
+ private CacheUpgradeSettings upgradeSettings;
+
/*
* Specifies network settings of the cache.
*/
@@ -86,6 +95,19 @@ public final class CacheProperties {
@JsonProperty(value = "zones")
private List zones;
+ /*
+ * Specifies the priming jobs defined in the cache.
+ */
+ @JsonProperty(value = "primingJobs", access = JsonProperty.Access.WRITE_ONLY)
+ private List primingJobs;
+
+ /*
+ * Specifies the space allocation percentage for each storage target in the
+ * cache.
+ */
+ @JsonProperty(value = "spaceAllocation", access = JsonProperty.Access.WRITE_ONLY)
+ private List spaceAllocation;
+
/**
* Get the cacheSizeGB property: The size of this Cache, in GB.
*
@@ -163,6 +185,26 @@ public CacheUpgradeStatus upgradeStatus() {
return this.upgradeStatus;
}
+ /**
+ * Get the upgradeSettings property: Upgrade settings of the Cache.
+ *
+ * @return the upgradeSettings value.
+ */
+ public CacheUpgradeSettings upgradeSettings() {
+ return this.upgradeSettings;
+ }
+
+ /**
+ * Set the upgradeSettings property: Upgrade settings of the Cache.
+ *
+ * @param upgradeSettings the upgradeSettings value to set.
+ * @return the CacheProperties object itself.
+ */
+ public CacheProperties withUpgradeSettings(CacheUpgradeSettings upgradeSettings) {
+ this.upgradeSettings = upgradeSettings;
+ return this;
+ }
+
/**
* Get the networkSettings property: Specifies network settings of the cache.
*
@@ -265,6 +307,24 @@ public CacheProperties withZones(List zones) {
return this;
}
+ /**
+ * Get the primingJobs property: Specifies the priming jobs defined in the cache.
+ *
+ * @return the primingJobs value.
+ */
+ public List primingJobs() {
+ return this.primingJobs;
+ }
+
+ /**
+ * Get the spaceAllocation property: Specifies the space allocation percentage for each storage target in the cache.
+ *
+ * @return the spaceAllocation value.
+ */
+ public List spaceAllocation() {
+ return this.spaceAllocation;
+ }
+
/**
* Validates the instance.
*
@@ -277,6 +337,9 @@ public void validate() {
if (upgradeStatus() != null) {
upgradeStatus().validate();
}
+ if (upgradeSettings() != null) {
+ upgradeSettings().validate();
+ }
if (networkSettings() != null) {
networkSettings().validate();
}
@@ -289,5 +352,11 @@ public void validate() {
if (directoryServicesSettings() != null) {
directoryServicesSettings().validate();
}
+ if (primingJobs() != null) {
+ primingJobs().forEach(e -> e.validate());
+ }
+ if (spaceAllocation() != null) {
+ spaceAllocation().forEach(e -> e.validate());
+ }
}
}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetInner.java
index dc09afc7e1ba..6ff75911a949 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetInner.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetInner.java
@@ -206,6 +206,15 @@ public StorageTargetInner withBlobNfs(BlobNfsTarget blobNfs) {
return this;
}
+ /**
+ * Get the allocationPercentage property: The percentage of cache space allocated for this storage target.
+ *
+ * @return the allocationPercentage value.
+ */
+ public Integer allocationPercentage() {
+ return this.innerProperties() == null ? null : this.innerProperties().allocationPercentage();
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetProperties.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetProperties.java
index 88b99b9ac77e..f40f23bd69b4 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetProperties.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetProperties.java
@@ -69,6 +69,12 @@ public final class StorageTargetProperties {
@JsonProperty(value = "blobNfs")
private BlobNfsTarget blobNfs;
+ /*
+ * The percentage of cache space allocated for this storage target
+ */
+ @JsonProperty(value = "allocationPercentage", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer allocationPercentage;
+
/**
* Get the junctions property: List of Cache namespace junctions to target for namespace associations.
*
@@ -219,6 +225,15 @@ public StorageTargetProperties withBlobNfs(BlobNfsTarget blobNfs) {
return this;
}
+ /**
+ * Get the allocationPercentage property: The percentage of cache space allocated for this storage target.
+ *
+ * @return the allocationPercentage value.
+ */
+ public Integer allocationPercentage() {
+ return this.allocationPercentage;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java
index f65612b0184d..b00c2eb9ff34 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java
@@ -172,15 +172,7 @@ private Mono> getWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String location, String operationId) {
- return getWithResponseAsync(location, operationId)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return getWithResponseAsync(location, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java
index 2f216aedf7b9..223fb1eba2a1 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java
@@ -16,8 +16,12 @@
import com.azure.resourcemanager.storagecache.models.CacheNetworkSettings;
import com.azure.resourcemanager.storagecache.models.CacheSecuritySettings;
import com.azure.resourcemanager.storagecache.models.CacheSku;
+import com.azure.resourcemanager.storagecache.models.CacheUpgradeSettings;
import com.azure.resourcemanager.storagecache.models.CacheUpgradeStatus;
+import com.azure.resourcemanager.storagecache.models.PrimingJob;
+import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter;
import com.azure.resourcemanager.storagecache.models.ProvisioningStateType;
+import com.azure.resourcemanager.storagecache.models.StorageTargetSpaceAllocation;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -93,6 +97,10 @@ public CacheUpgradeStatus upgradeStatus() {
return this.innerModel().upgradeStatus();
}
+ public CacheUpgradeSettings upgradeSettings() {
+ return this.innerModel().upgradeSettings();
+ }
+
public CacheNetworkSettings networkSettings() {
return this.innerModel().networkSettings();
}
@@ -118,6 +126,24 @@ public List zones() {
}
}
+ public List primingJobs() {
+ List inner = this.innerModel().primingJobs();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List spaceAllocation() {
+ List inner = this.innerModel().spaceAllocation();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -126,6 +152,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public CacheInner innerModel() {
return this.innerObject;
}
@@ -250,6 +280,54 @@ public void stop(Context context) {
serviceManager.caches().stop(resourceGroupName, cacheName, context);
}
+ public void startPrimingJob(PrimingJob primingjob) {
+ serviceManager.caches().startPrimingJob(resourceGroupName, cacheName, primingjob);
+ }
+
+ public void startPrimingJob() {
+ serviceManager.caches().startPrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void startPrimingJob(PrimingJob primingjob, Context context) {
+ serviceManager.caches().startPrimingJob(resourceGroupName, cacheName, primingjob, context);
+ }
+
+ public void stopPrimingJob(PrimingJobIdParameter primingJobId) {
+ serviceManager.caches().stopPrimingJob(resourceGroupName, cacheName, primingJobId);
+ }
+
+ public void stopPrimingJob() {
+ serviceManager.caches().stopPrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void stopPrimingJob(PrimingJobIdParameter primingJobId, Context context) {
+ serviceManager.caches().stopPrimingJob(resourceGroupName, cacheName, primingJobId, context);
+ }
+
+ public void pausePrimingJob(PrimingJobIdParameter primingJobId) {
+ serviceManager.caches().pausePrimingJob(resourceGroupName, cacheName, primingJobId);
+ }
+
+ public void pausePrimingJob() {
+ serviceManager.caches().pausePrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void pausePrimingJob(PrimingJobIdParameter primingJobId, Context context) {
+ serviceManager.caches().pausePrimingJob(resourceGroupName, cacheName, primingJobId, context);
+ }
+
+ public void resumePrimingJob(PrimingJobIdParameter primingJobId) {
+ serviceManager.caches().resumePrimingJob(resourceGroupName, cacheName, primingJobId);
+ }
+
+ public void resumePrimingJob() {
+ serviceManager.caches().resumePrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void resumePrimingJob(PrimingJobIdParameter primingJobId, Context context) {
+ serviceManager.caches().resumePrimingJob(resourceGroupName, cacheName, primingJobId, context);
+ }
+
public void upgradeFirmware() {
serviceManager.caches().upgradeFirmware(resourceGroupName, cacheName);
}
@@ -293,6 +371,11 @@ public CacheImpl withSubnet(String subnet) {
return this;
}
+ public CacheImpl withUpgradeSettings(CacheUpgradeSettings upgradeSettings) {
+ this.innerModel().withUpgradeSettings(upgradeSettings);
+ return this;
+ }
+
public CacheImpl withNetworkSettings(CacheNetworkSettings networkSettings) {
this.innerModel().withNetworkSettings(networkSettings);
return this;
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesClientImpl.java
index 650d7d373073..2c561d4f6352 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesClientImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesClientImpl.java
@@ -36,7 +36,11 @@
import com.azure.resourcemanager.storagecache.fluent.CachesClient;
import com.azure.resourcemanager.storagecache.fluent.models.CacheInner;
import com.azure.resourcemanager.storagecache.models.CachesListResult;
+import com.azure.resourcemanager.storagecache.models.PrimingJob;
+import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter;
+import com.azure.resourcemanager.storagecache.models.StorageTargetSpaceAllocation;
import java.nio.ByteBuffer;
+import java.util.List;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -212,6 +216,70 @@ Mono>> stop(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches"
+ + "/{cacheName}/startPrimingJob")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> startPrimingJob(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("cacheName") String cacheName,
+ @BodyParam("application/json") PrimingJob primingjob,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches"
+ + "/{cacheName}/stopPrimingJob")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> stopPrimingJob(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") PrimingJobIdParameter primingJobId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches"
+ + "/{cacheName}/pausePrimingJob")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> pausePrimingJob(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") PrimingJobIdParameter primingJobId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches"
+ + "/{cacheName}/resumePrimingJob")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> resumePrimingJob(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("cacheName") String cacheName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") PrimingJobIdParameter primingJobId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Post(
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches"
@@ -227,6 +295,22 @@ Mono>> upgradeFirmware(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches"
+ + "/{cacheName}/spaceAllocation")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> spaceAllocation(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("cacheName") String cacheName,
+ @BodyParam("application/json") List spaceAllocation,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -900,14 +984,7 @@ private Mono> getByResourceGroupWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String cacheName) {
return getByResourceGroupWithResponseAsync(resourceGroupName, cacheName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -1379,14 +1456,7 @@ private Mono> updateWithResponseAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(String resourceGroupName, String cacheName, CacheInner cache) {
return updateWithResponseAsync(resourceGroupName, cacheName, cache)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -1404,14 +1474,7 @@ private Mono updateAsync(String resourceGroupName, String cacheName,
private Mono updateAsync(String resourceGroupName, String cacheName) {
final CacheInner cache = null;
return updateWithResponseAsync(resourceGroupName, cacheName, cache)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -2407,19 +2470,20 @@ public void stop(String resourceGroupName, String cacheName, Context context) {
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> upgradeFirmwareWithResponseAsync(
- String resourceGroupName, String cacheName) {
+ private Mono>> startPrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJob primingjob) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -2439,28 +2503,33 @@ private Mono>> upgradeFirmwareWithResponseAsync(
if (cacheName == null) {
return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
}
+ if (primingjob != null) {
+ primingjob.validate();
+ }
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .upgradeFirmware(
+ .startPrimingJob(
this.client.getEndpoint(),
resourceGroupName,
this.client.getApiVersion(),
this.client.getSubscriptionId(),
cacheName,
+ primingjob,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2468,8 +2537,8 @@ private Mono>> upgradeFirmwareWithResponseAsync(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> upgradeFirmwareWithResponseAsync(
- String resourceGroupName, String cacheName, Context context) {
+ private Mono>> startPrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJob primingjob, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -2489,33 +2558,40 @@ private Mono>> upgradeFirmwareWithResponseAsync(
if (cacheName == null) {
return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
}
+ if (primingjob != null) {
+ primingjob.validate();
+ }
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .upgradeFirmware(
+ .startPrimingJob(
this.client.getEndpoint(),
resourceGroupName,
this.client.getApiVersion(),
this.client.getSubscriptionId(),
cacheName,
+ primingjob,
accept,
context);
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is 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> beginUpgradeFirmwareAsync(String resourceGroupName, String cacheName) {
- Mono>> mono = upgradeFirmwareWithResponseAsync(resourceGroupName, cacheName);
+ private PollerFlux, Void> beginStartPrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJob primingjob) {
+ Mono>> mono =
+ startPrimingJobWithResponseAsync(resourceGroupName, cacheName, primingjob);
return this
.client
.getLroResult(
@@ -2523,11 +2599,12 @@ private PollerFlux, Void> beginUpgradeFirmwareAsync(String reso
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2535,37 +2612,41 @@ private PollerFlux, Void> beginUpgradeFirmwareAsync(String reso
* @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginUpgradeFirmwareAsync(
- String resourceGroupName, String cacheName, Context context) {
+ private PollerFlux, Void> beginStartPrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJob primingjob, Context context) {
context = this.client.mergeContext(context);
- Mono>> mono = upgradeFirmwareWithResponseAsync(resourceGroupName, cacheName, context);
+ Mono>> mono =
+ startPrimingJobWithResponseAsync(resourceGroupName, cacheName, primingjob, context);
return this
.client
.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginUpgradeFirmware(String resourceGroupName, String cacheName) {
- return beginUpgradeFirmwareAsync(resourceGroupName, cacheName).getSyncPoller();
+ public SyncPoller, Void> beginStartPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJob primingjob) {
+ return beginStartPrimingJobAsync(resourceGroupName, cacheName, primingjob).getSyncPoller();
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2573,35 +2654,56 @@ public SyncPoller, Void> beginUpgradeFirmware(String resourceGr
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginUpgradeFirmware(
- String resourceGroupName, String cacheName, Context context) {
- return beginUpgradeFirmwareAsync(resourceGroupName, cacheName, context).getSyncPoller();
+ public SyncPoller, Void> beginStartPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJob primingjob, Context context) {
+ return beginStartPrimingJobAsync(resourceGroupName, cacheName, primingjob, context).getSyncPoller();
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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 upgradeFirmwareAsync(String resourceGroupName, String cacheName) {
- return beginUpgradeFirmwareAsync(resourceGroupName, cacheName)
+ private Mono startPrimingJobAsync(String resourceGroupName, String cacheName, PrimingJob primingjob) {
+ return beginStartPrimingJobAsync(resourceGroupName, cacheName, primingjob)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 startPrimingJobAsync(String resourceGroupName, String cacheName) {
+ final PrimingJob primingjob = null;
+ return beginStartPrimingJobAsync(resourceGroupName, cacheName, primingjob)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
@@ -2609,41 +2711,1516 @@ private Mono upgradeFirmwareAsync(String resourceGroupName, String cacheNa
* @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono upgradeFirmwareAsync(String resourceGroupName, String cacheName, Context context) {
- return beginUpgradeFirmwareAsync(resourceGroupName, cacheName, context)
+ private Mono startPrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJob primingjob, Context context) {
+ return beginStartPrimingJobAsync(resourceGroupName, cacheName, primingjob, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void upgradeFirmware(String resourceGroupName, String cacheName) {
- upgradeFirmwareAsync(resourceGroupName, cacheName).block();
+ public void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob) {
+ startPrimingJobAsync(resourceGroupName, cacheName, primingjob).block();
}
/**
- * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ * Create a priming job. This operation is only allowed when the cache is healthy.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void startPrimingJob(String resourceGroupName, String cacheName) {
+ final PrimingJob primingjob = null;
+ startPrimingJobAsync(resourceGroupName, cacheName, primingjob).block();
+ }
+
+ /**
+ * Create a priming job. This operation is only allowed when the cache is healthy.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
+ * @param primingjob Object containing the definition of a priming job.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void upgradeFirmware(String resourceGroupName, String cacheName, Context context) {
- upgradeFirmwareAsync(resourceGroupName, cacheName, context).block();
+ public void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob, Context context) {
+ startPrimingJobAsync(resourceGroupName, cacheName, primingjob, context).block();
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> stopPrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (primingJobId != null) {
+ primingJobId.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .stopPrimingJob(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ primingJobId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> stopPrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (primingJobId != null) {
+ primingJobId.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .stopPrimingJob(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ primingJobId,
+ accept,
+ context);
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStopPrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ Mono>> mono =
+ stopPrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStopPrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ stopPrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStopPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ return beginStopPrimingJobAsync(resourceGroupName, cacheName, primingJobId).getSyncPoller();
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStopPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ return beginStopPrimingJobAsync(resourceGroupName, cacheName, primingJobId, context).getSyncPoller();
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono stopPrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ return beginStopPrimingJobAsync(resourceGroupName, cacheName, primingJobId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 stopPrimingJobAsync(String resourceGroupName, String cacheName) {
+ final PrimingJobIdParameter primingJobId = null;
+ return beginStopPrimingJobAsync(resourceGroupName, cacheName, primingJobId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono stopPrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ return beginStopPrimingJobAsync(resourceGroupName, cacheName, primingJobId, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void stopPrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ stopPrimingJobAsync(resourceGroupName, cacheName, primingJobId).block();
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void stopPrimingJob(String resourceGroupName, String cacheName) {
+ final PrimingJobIdParameter primingJobId = null;
+ stopPrimingJobAsync(resourceGroupName, cacheName, primingJobId).block();
+ }
+
+ /**
+ * Schedule a priming job for deletion.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void stopPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ stopPrimingJobAsync(resourceGroupName, cacheName, primingJobId, context).block();
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> pausePrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (primingJobId != null) {
+ primingJobId.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .pausePrimingJob(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ primingJobId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> pausePrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (primingJobId != null) {
+ primingJobId.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .pausePrimingJob(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ primingJobId,
+ accept,
+ context);
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginPausePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ Mono>> mono =
+ pausePrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginPausePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ pausePrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginPausePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ return beginPausePrimingJobAsync(resourceGroupName, cacheName, primingJobId).getSyncPoller();
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginPausePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ return beginPausePrimingJobAsync(resourceGroupName, cacheName, primingJobId, context).getSyncPoller();
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono pausePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ return beginPausePrimingJobAsync(resourceGroupName, cacheName, primingJobId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 pausePrimingJobAsync(String resourceGroupName, String cacheName) {
+ final PrimingJobIdParameter primingJobId = null;
+ return beginPausePrimingJobAsync(resourceGroupName, cacheName, primingJobId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono pausePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ return beginPausePrimingJobAsync(resourceGroupName, cacheName, primingJobId, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void pausePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ pausePrimingJobAsync(resourceGroupName, cacheName, primingJobId).block();
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void pausePrimingJob(String resourceGroupName, String cacheName) {
+ final PrimingJobIdParameter primingJobId = null;
+ pausePrimingJobAsync(resourceGroupName, cacheName, primingJobId).block();
+ }
+
+ /**
+ * Schedule a priming job to be paused.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void pausePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ pausePrimingJobAsync(resourceGroupName, cacheName, primingJobId, context).block();
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> resumePrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (primingJobId != null) {
+ primingJobId.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .resumePrimingJob(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ primingJobId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> resumePrimingJobWithResponseAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, 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 (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (primingJobId != null) {
+ primingJobId.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .resumePrimingJob(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ cacheName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ primingJobId,
+ accept,
+ context);
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginResumePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ Mono>> mono =
+ resumePrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginResumePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ resumePrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginResumePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ return beginResumePrimingJobAsync(resourceGroupName, cacheName, primingJobId).getSyncPoller();
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginResumePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ return beginResumePrimingJobAsync(resourceGroupName, cacheName, primingJobId, context).getSyncPoller();
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono resumePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ return beginResumePrimingJobAsync(resourceGroupName, cacheName, primingJobId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 resumePrimingJobAsync(String resourceGroupName, String cacheName) {
+ final PrimingJobIdParameter primingJobId = null;
+ return beginResumePrimingJobAsync(resourceGroupName, cacheName, primingJobId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono resumePrimingJobAsync(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ return beginResumePrimingJobAsync(resourceGroupName, cacheName, primingJobId, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void resumePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ resumePrimingJobAsync(resourceGroupName, cacheName, primingJobId).block();
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void resumePrimingJob(String resourceGroupName, String cacheName) {
+ final PrimingJobIdParameter primingJobId = null;
+ resumePrimingJobAsync(resourceGroupName, cacheName, primingJobId).block();
+ }
+
+ /**
+ * Resumes a paused priming job.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param primingJobId Object containing the priming job ID.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void resumePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ resumePrimingJobAsync(resourceGroupName, cacheName, primingJobId, context).block();
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> upgradeFirmwareWithResponseAsync(
+ String resourceGroupName, String cacheName) {
+ 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 (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .upgradeFirmware(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ cacheName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> upgradeFirmwareWithResponseAsync(
+ String resourceGroupName, String cacheName, 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 (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .upgradeFirmware(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ cacheName,
+ accept,
+ context);
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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> beginUpgradeFirmwareAsync(String resourceGroupName, String cacheName) {
+ Mono>> mono = upgradeFirmwareWithResponseAsync(resourceGroupName, cacheName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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> beginUpgradeFirmwareAsync(
+ String resourceGroupName, String cacheName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = upgradeFirmwareWithResponseAsync(resourceGroupName, cacheName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginUpgradeFirmware(String resourceGroupName, String cacheName) {
+ return beginUpgradeFirmwareAsync(resourceGroupName, cacheName).getSyncPoller();
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginUpgradeFirmware(
+ String resourceGroupName, String cacheName, Context context) {
+ return beginUpgradeFirmwareAsync(resourceGroupName, cacheName, context).getSyncPoller();
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 upgradeFirmwareAsync(String resourceGroupName, String cacheName) {
+ return beginUpgradeFirmwareAsync(resourceGroupName, cacheName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 upgradeFirmwareAsync(String resourceGroupName, String cacheName, Context context) {
+ return beginUpgradeFirmwareAsync(resourceGroupName, cacheName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void upgradeFirmware(String resourceGroupName, String cacheName) {
+ upgradeFirmwareAsync(resourceGroupName, cacheName).block();
+ }
+
+ /**
+ * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no effect.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void upgradeFirmware(String resourceGroupName, String cacheName, Context context) {
+ upgradeFirmwareAsync(resourceGroupName, cacheName, context).block();
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> spaceAllocationWithResponseAsync(
+ String resourceGroupName, String cacheName, List spaceAllocation) {
+ 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 (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (spaceAllocation != null) {
+ spaceAllocation.forEach(e -> e.validate());
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .spaceAllocation(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ cacheName,
+ spaceAllocation,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> spaceAllocationWithResponseAsync(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ 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 (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (cacheName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null."));
+ }
+ if (spaceAllocation != null) {
+ spaceAllocation.forEach(e -> e.validate());
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .spaceAllocation(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ cacheName,
+ spaceAllocation,
+ accept,
+ context);
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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> beginSpaceAllocationAsync(
+ String resourceGroupName, String cacheName, List spaceAllocation) {
+ Mono>> mono =
+ spaceAllocationWithResponseAsync(resourceGroupName, cacheName, spaceAllocation);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is 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> beginSpaceAllocationAsync(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ spaceAllocationWithResponseAsync(resourceGroupName, cacheName, spaceAllocation, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginSpaceAllocation(
+ String resourceGroupName, String cacheName, List spaceAllocation) {
+ return beginSpaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation).getSyncPoller();
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginSpaceAllocation(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ Context context) {
+ return beginSpaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation, context).getSyncPoller();
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 spaceAllocationAsync(
+ String resourceGroupName, String cacheName, List spaceAllocation) {
+ return beginSpaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 spaceAllocationAsync(String resourceGroupName, String cacheName) {
+ final List spaceAllocation = null;
+ return beginSpaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 spaceAllocationAsync(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ Context context) {
+ return beginSpaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void spaceAllocation(
+ String resourceGroupName, String cacheName, List spaceAllocation) {
+ spaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation).block();
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void spaceAllocation(String resourceGroupName, String cacheName) {
+ final List spaceAllocation = null;
+ spaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation).block();
+ }
+
+ /**
+ * Update cache space allocation.
+ *
+ * @param resourceGroupName Target resource group.
+ * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
+ * [-0-9a-zA-Z_] char class.
+ * @param spaceAllocation List containing storage target cache space percentage allocations.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void spaceAllocation(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ Context context) {
+ spaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation, context).block();
}
/**
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java
index ebc07255bde2..f51b02e289ad 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java
@@ -13,6 +13,10 @@
import com.azure.resourcemanager.storagecache.fluent.models.CacheInner;
import com.azure.resourcemanager.storagecache.models.Cache;
import com.azure.resourcemanager.storagecache.models.Caches;
+import com.azure.resourcemanager.storagecache.models.PrimingJob;
+import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter;
+import com.azure.resourcemanager.storagecache.models.StorageTargetSpaceAllocation;
+import java.util.List;
public final class CachesImpl implements Caches {
private static final ClientLogger LOGGER = new ClientLogger(CachesImpl.class);
@@ -110,6 +114,57 @@ public void stop(String resourceGroupName, String cacheName, Context context) {
this.serviceClient().stop(resourceGroupName, cacheName, context);
}
+ public void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob) {
+ this.serviceClient().startPrimingJob(resourceGroupName, cacheName, primingjob);
+ }
+
+ public void startPrimingJob(String resourceGroupName, String cacheName) {
+ this.serviceClient().startPrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob, Context context) {
+ this.serviceClient().startPrimingJob(resourceGroupName, cacheName, primingjob, context);
+ }
+
+ public void stopPrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ this.serviceClient().stopPrimingJob(resourceGroupName, cacheName, primingJobId);
+ }
+
+ public void stopPrimingJob(String resourceGroupName, String cacheName) {
+ this.serviceClient().stopPrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void stopPrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ this.serviceClient().stopPrimingJob(resourceGroupName, cacheName, primingJobId, context);
+ }
+
+ public void pausePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ this.serviceClient().pausePrimingJob(resourceGroupName, cacheName, primingJobId);
+ }
+
+ public void pausePrimingJob(String resourceGroupName, String cacheName) {
+ this.serviceClient().pausePrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void pausePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ this.serviceClient().pausePrimingJob(resourceGroupName, cacheName, primingJobId, context);
+ }
+
+ public void resumePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) {
+ this.serviceClient().resumePrimingJob(resourceGroupName, cacheName, primingJobId);
+ }
+
+ public void resumePrimingJob(String resourceGroupName, String cacheName) {
+ this.serviceClient().resumePrimingJob(resourceGroupName, cacheName);
+ }
+
+ public void resumePrimingJob(
+ String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context) {
+ this.serviceClient().resumePrimingJob(resourceGroupName, cacheName, primingJobId, context);
+ }
+
public void upgradeFirmware(String resourceGroupName, String cacheName) {
this.serviceClient().upgradeFirmware(resourceGroupName, cacheName);
}
@@ -118,6 +173,23 @@ public void upgradeFirmware(String resourceGroupName, String cacheName, Context
this.serviceClient().upgradeFirmware(resourceGroupName, cacheName, context);
}
+ public void spaceAllocation(
+ String resourceGroupName, String cacheName, List spaceAllocation) {
+ this.serviceClient().spaceAllocation(resourceGroupName, cacheName, spaceAllocation);
+ }
+
+ public void spaceAllocation(String resourceGroupName, String cacheName) {
+ this.serviceClient().spaceAllocation(resourceGroupName, cacheName);
+ }
+
+ public void spaceAllocation(
+ String resourceGroupName,
+ String cacheName,
+ List spaceAllocation,
+ Context context) {
+ this.serviceClient().spaceAllocation(resourceGroupName, cacheName, spaceAllocation, context);
+ }
+
public Cache getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
if (resourceGroupName == null) {
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java
index 3561de6543d4..7d18ba757d6e 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -70,34 +69,34 @@ public StorageCacheManagementClientBuilder environment(AzureEnvironment environm
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the StorageCacheManagementClientBuilder.
*/
- public StorageCacheManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public StorageCacheManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the StorageCacheManagementClientBuilder.
*/
- public StorageCacheManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public StorageCacheManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -129,15 +128,12 @@ public StorageCacheManagementClientImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientImpl.java
index 79c075fd0e02..2c49066ef961 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
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;
@@ -36,7 +37,6 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -238,7 +238,7 @@ public StorageTargetOperationsClient getStorageTargetOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2022-01-01";
+ this.apiVersion = "2022-05-01";
this.operations = new OperationsClientImpl(this);
this.skus = new SkusClientImpl(this);
this.usageModels = new UsageModelsClientImpl(this);
@@ -265,10 +265,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry