diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md b/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md
index 4d5dea63dcc9b..99d95af3c6fd5 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md
@@ -1,7 +1,24 @@
# Release History
-## 1.0.0-beta.4 (Unreleased)
+## 1.0.0-beta.4 (2021-10-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-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+### Features Added
+
+* `models.OperationalStateType` was added
+
+#### `models.StorageTarget` was modified
+
+* `state()` was added
+
+#### `models.StorageTarget$Update` was modified
+
+* `withState(models.OperationalStateType)` was added
+
+#### `models.StorageTarget$Definition` was modified
+
+* `withState(models.OperationalStateType)` was added
## 1.0.0-beta.3 (2021-08-03)
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/README.md b/sdk/storagecache/azure-resourcemanager-storagecache/README.md
index c733339043bd2..2daea77ebac09 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-2021-05. 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-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-storagecache
- 1.0.0-beta.3
+ 1.0.0-beta.4
```
[//]: # ({x-version-update-end})
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md
index d4409d7ac93a0..feb20901928db 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md
@@ -1,46 +1,921 @@
# Code snippets and samples
-### AscOperations
+## AscOperations
-- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/AscOperationsGetSamples.java)
+- [Get](#ascoperations_get)
-### Caches
+## Caches
-- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesCreateOrUpdateSamples.java)
-- [DebugInfo](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDebugInfoSamples.java)
-- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDeleteSamples.java)
-- [Flush](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesFlushSamples.java)
-- [GetByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesGetByResourceGroupSamples.java)
-- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListSamples.java)
-- [ListByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListByResourceGroupSamples.java)
-- [Start](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStartSamples.java)
-- [Stop](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStopSamples.java)
-- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpdateSamples.java)
-- [UpgradeFirmware](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpgradeFirmwareSamples.java)
+- [CreateOrUpdate](#caches_createorupdate)
+- [DebugInfo](#caches_debuginfo)
+- [Delete](#caches_delete)
+- [Flush](#caches_flush)
+- [GetByResourceGroup](#caches_getbyresourcegroup)
+- [List](#caches_list)
+- [ListByResourceGroup](#caches_listbyresourcegroup)
+- [Start](#caches_start)
+- [Stop](#caches_stop)
+- [Update](#caches_update)
+- [UpgradeFirmware](#caches_upgradefirmware)
-### Operations
+## Operations
-- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/OperationsListSamples.java)
+- [List](#operations_list)
-### Skus
+## Skus
-- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/SkusListSamples.java)
+- [List](#skus_list)
-### StorageTargetOperation
+## StorageTargetOperation
-- [Flush](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationFlushSamples.java)
-- [Resume](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationResumeSamples.java)
-- [Suspend](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationSuspendSamples.java)
+- [Flush](#storagetargetoperation_flush)
+- [Resume](#storagetargetoperation_resume)
+- [Suspend](#storagetargetoperation_suspend)
-### StorageTargets
+## StorageTargets
-- [CreateOrUpdate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsCreateOrUpdateSamples.java)
-- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDeleteSamples.java)
-- [DnsRefresh](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDnsRefreshSamples.java)
-- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsGetSamples.java)
-- [ListByCache](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsListByCacheSamples.java)
+- [CreateOrUpdate](#storagetargets_createorupdate)
+- [Delete](#storagetargets_delete)
+- [DnsRefresh](#storagetargets_dnsrefresh)
+- [Get](#storagetargets_get)
+- [ListByCache](#storagetargets_listbycache)
-### UsageModels
+## UsageModels
+
+- [List](#usagemodels_list)
+### AscOperations_Get
+
+```java
+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/2021-09-01/examples/AscOperations_Get.json
+ */
+ /**
+ * Sample code: AscOperations_Get.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void ascOperationsGet(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.ascOperations().getWithResponse("westus", "testoperationid", Context.NONE);
+ }
+}
+```
+
+### Caches_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.storagecache.models.CacheActiveDirectorySettings;
+import com.azure.resourcemanager.storagecache.models.CacheActiveDirectorySettingsCredentials;
+import com.azure.resourcemanager.storagecache.models.CacheDirectorySettings;
+import com.azure.resourcemanager.storagecache.models.CacheEncryptionSettings;
+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.CacheUsernameDownloadSettings;
+import com.azure.resourcemanager.storagecache.models.CacheUsernameDownloadSettingsCredentials;
+import com.azure.resourcemanager.storagecache.models.KeyVaultKeyReference;
+import com.azure.resourcemanager.storagecache.models.KeyVaultKeyReferenceSourceVault;
+import com.azure.resourcemanager.storagecache.models.NfsAccessPolicy;
+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.UserAssignedIdentitiesValue;
+import com.azure.resourcemanager.storagecache.models.UsernameSource;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Caches CreateOrUpdate. */
+public final class CachesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate_ldap_only.json
+ */
+ /**
+ * Sample code: Caches_CreateOrUpdate_ldap_only.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesCreateOrUpdateLdapOnly(
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .caches()
+ .define("sc1")
+ .withRegion("westus")
+ .withExistingResourceGroup("scgroup")
+ .withTags(mapOf("Dept", "Contoso"))
+ .withSku(new CacheSku().withName("Standard_2G"))
+ .withCacheSizeGB(3072)
+ .withSubnet(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1")
+ .withEncryptionSettings(
+ new CacheEncryptionSettings()
+ .withKeyEncryptionKey(
+ new KeyVaultKeyReference()
+ .withKeyUrl("https://keyvault-cmk.vault.azure.net/keys/key2048/test")
+ .withSourceVault(
+ new KeyVaultKeyReferenceSourceVault()
+ .withId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"))))
+ .withSecuritySettings(
+ new CacheSecuritySettings()
+ .withAccessPolicies(
+ Arrays
+ .asList(
+ new NfsAccessPolicy()
+ .withName("default")
+ .withAccessRules(
+ Arrays
+ .asList(
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.DEFAULT)
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(false)
+ .withSubmountAccess(true)
+ .withRootSquash(false))))))
+ .withDirectoryServicesSettings(
+ new CacheDirectorySettings()
+ .withUsernameDownload(
+ new CacheUsernameDownloadSettings()
+ .withExtendedGroups(true)
+ .withUsernameSource(UsernameSource.LDAP)
+ .withLdapServer("192.0.2.12")
+ .withLdapBaseDN("dc=contosoad,dc=contoso,dc=local")
+ .withCredentials(
+ new CacheUsernameDownloadSettingsCredentials()
+ .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local")
+ .withBindPassword(""))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Caches_CreateOrUpdate.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesCreateOrUpdate(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .caches()
+ .define("sc1")
+ .withRegion("westus")
+ .withExistingResourceGroup("scgroup")
+ .withTags(mapOf("Dept", "Contoso"))
+ .withIdentity(
+ new CacheIdentity()
+ .withType(CacheIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1",
+ new UserAssignedIdentitiesValue())))
+ .withSku(new CacheSku().withName("Standard_2G"))
+ .withCacheSizeGB(3072)
+ .withSubnet(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1")
+ .withEncryptionSettings(
+ new CacheEncryptionSettings()
+ .withKeyEncryptionKey(
+ new KeyVaultKeyReference()
+ .withKeyUrl("https://keyvault-cmk.vault.azure.net/keys/key2047/test")
+ .withSourceVault(
+ new KeyVaultKeyReferenceSourceVault()
+ .withId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"))))
+ .withSecuritySettings(
+ new CacheSecuritySettings()
+ .withAccessPolicies(
+ Arrays
+ .asList(
+ new NfsAccessPolicy()
+ .withName("default")
+ .withAccessRules(
+ Arrays
+ .asList(
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.DEFAULT)
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(false)
+ .withSubmountAccess(true)
+ .withRootSquash(false))))))
+ .withDirectoryServicesSettings(
+ new CacheDirectorySettings()
+ .withActiveDirectory(
+ new CacheActiveDirectorySettings()
+ .withPrimaryDnsIpAddress("192.0.2.10")
+ .withSecondaryDnsIpAddress("192.0.2.11")
+ .withDomainName("contosoAd.contoso.local")
+ .withDomainNetBiosName("contosoAd")
+ .withCacheNetBiosName("contosoSmb")
+ .withCredentials(
+ new CacheActiveDirectorySettingsCredentials()
+ .withUsername("consotoAdmin")
+ .withPassword("")))
+ .withUsernameDownload(
+ new CacheUsernameDownloadSettings()
+ .withExtendedGroups(true)
+ .withUsernameSource(UsernameSource.LDAP)
+ .withLdapServer("192.0.2.12")
+ .withLdapBaseDN("dc=contosoad,dc=contoso,dc=local")
+ .withCredentials(
+ new CacheUsernameDownloadSettingsCredentials()
+ .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local")
+ .withBindPassword(""))))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Caches_DebugInfo
+
+```java
+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/2021-09-01/examples/Caches_DebugInfo.json
+ */
+ /**
+ * Sample code: Caches_DebugInfo.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesDebugInfo(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().debugInfo("scgroup", "sc", Context.NONE);
+ }
+}
+```
+
+### Caches_Delete
+
+```java
+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/2021-09-01/examples/Caches_Delete.json
+ */
+ /**
+ * Sample code: Caches_Delete.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesDelete(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().delete("scgroup", "sc", Context.NONE);
+ }
+}
+```
+
+### Caches_Flush
+
+```java
+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/2021-09-01/examples/Caches_Flush.json
+ */
+ /**
+ * Sample code: Caches_Flush.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesFlush(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().flush("scgroup", "sc", Context.NONE);
+ }
+}
+```
+
+### Caches_GetByResourceGroup
+
+```java
+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/2021-09-01/examples/Caches_Get.json
+ */
+ /**
+ * Sample code: Caches_Get.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesGet(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE);
+ }
+}
+```
+
+### Caches_List
+
+```java
+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/2021-09-01/examples/Caches_List.json
+ */
+ /**
+ * Sample code: Caches_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().list(Context.NONE);
+ }
+}
+```
+
+### Caches_ListByResourceGroup
+
+```java
+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/2021-09-01/examples/Caches_ListByResourceGroup.json
+ */
+ /**
+ * Sample code: Caches_ListByResourceGroup.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesListByResourceGroup(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().listByResourceGroup("scgroup", Context.NONE);
+ }
+}
+```
+
+### Caches_Start
+
+```java
+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/2021-09-01/examples/Caches_Start.json
+ */
+ /**
+ * Sample code: Caches_Start.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesStart(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().start("scgroup", "sc", Context.NONE);
+ }
+}
+```
+
+### Caches_Stop
+
+```java
+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/2021-09-01/examples/Caches_Stop.json
+ */
+ /**
+ * Sample code: Caches_Stop.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesStop(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().stop("scgroup", "sc", Context.NONE);
+ }
+}
+```
+
+### Caches_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagecache.models.Cache;
+import com.azure.resourcemanager.storagecache.models.CacheActiveDirectorySettings;
+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.CacheUsernameDownloadSettings;
+import com.azure.resourcemanager.storagecache.models.CacheUsernameDownloadSettingsCredentials;
+import com.azure.resourcemanager.storagecache.models.NfsAccessPolicy;
+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.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Caches Update. */
+public final class CachesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update_ldap_only.json
+ */
+ /**
+ * Sample code: Caches_Update_ldap_only.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesUpdateLdapOnly(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ Cache resource = manager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("Dept", "Contoso"))
+ .withNetworkSettings(
+ new CacheNetworkSettings()
+ .withMtu(1500)
+ .withDnsServers(Arrays.asList("10.1.22.33", "10.1.12.33"))
+ .withDnsSearchDomain("contoso.com")
+ .withNtpServer("time.contoso.com"))
+ .withSecuritySettings(
+ new CacheSecuritySettings()
+ .withAccessPolicies(
+ Arrays
+ .asList(
+ new NfsAccessPolicy()
+ .withName("default")
+ .withAccessRules(
+ Arrays
+ .asList(
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.DEFAULT)
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(false)
+ .withSubmountAccess(true)
+ .withRootSquash(false))),
+ new NfsAccessPolicy()
+ .withName("restrictive")
+ .withAccessRules(
+ Arrays
+ .asList(
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.HOST)
+ .withFilter("10.99.3.145")
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(true)
+ .withSubmountAccess(true)
+ .withRootSquash(false),
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.NETWORK)
+ .withFilter("10.99.1.0/24")
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(true)
+ .withSubmountAccess(true)
+ .withRootSquash(false),
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.DEFAULT)
+ .withAccess(NfsAccessRuleAccess.NO)
+ .withSuid(false)
+ .withSubmountAccess(true)
+ .withRootSquash(true)
+ .withAnonymousUid("65534")
+ .withAnonymousGid("65534"))))))
+ .withDirectoryServicesSettings(
+ new CacheDirectorySettings()
+ .withUsernameDownload(
+ new CacheUsernameDownloadSettings()
+ .withExtendedGroups(true)
+ .withUsernameSource(UsernameSource.LDAP)
+ .withLdapServer("192.0.2.12")
+ .withLdapBaseDN("dc=contosoad,dc=contoso,dc=local")
+ .withCredentials(
+ new CacheUsernameDownloadSettingsCredentials()
+ .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local")
+ .withBindPassword(""))))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update.json
+ */
+ /**
+ * Sample code: Caches_Update.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesUpdate(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ Cache resource = manager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("Dept", "Contoso"))
+ .withNetworkSettings(
+ new CacheNetworkSettings()
+ .withMtu(1500)
+ .withDnsServers(Arrays.asList("10.1.22.33", "10.1.12.33"))
+ .withDnsSearchDomain("contoso.com")
+ .withNtpServer("time.contoso.com"))
+ .withSecuritySettings(
+ new CacheSecuritySettings()
+ .withAccessPolicies(
+ Arrays
+ .asList(
+ new NfsAccessPolicy()
+ .withName("default")
+ .withAccessRules(
+ Arrays
+ .asList(
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.DEFAULT)
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(false)
+ .withSubmountAccess(true)
+ .withRootSquash(false))),
+ new NfsAccessPolicy()
+ .withName("restrictive")
+ .withAccessRules(
+ Arrays
+ .asList(
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.HOST)
+ .withFilter("10.99.3.145")
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(true)
+ .withSubmountAccess(true)
+ .withRootSquash(false),
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.NETWORK)
+ .withFilter("10.99.1.0/24")
+ .withAccess(NfsAccessRuleAccess.RW)
+ .withSuid(true)
+ .withSubmountAccess(true)
+ .withRootSquash(false),
+ new NfsAccessRule()
+ .withScope(NfsAccessRuleScope.DEFAULT)
+ .withAccess(NfsAccessRuleAccess.NO)
+ .withSuid(false)
+ .withSubmountAccess(true)
+ .withRootSquash(true)
+ .withAnonymousUid("65534")
+ .withAnonymousGid("65534"))))))
+ .withDirectoryServicesSettings(
+ new CacheDirectorySettings()
+ .withActiveDirectory(
+ new CacheActiveDirectorySettings()
+ .withPrimaryDnsIpAddress("192.0.2.10")
+ .withSecondaryDnsIpAddress("192.0.2.11")
+ .withDomainName("contosoAd.contoso.local")
+ .withDomainNetBiosName("contosoAd")
+ .withCacheNetBiosName("contosoSmb"))
+ .withUsernameDownload(
+ new CacheUsernameDownloadSettings()
+ .withExtendedGroups(true)
+ .withUsernameSource(UsernameSource.AD)))
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Caches_UpgradeFirmware
+
+```java
+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/2021-09-01/examples/Caches_UpgradeFirmware.json
+ */
+ /**
+ * Sample code: Caches_UpgradeFirmware.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesUpgradeFirmware(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().upgradeFirmware("scgroup", "sc1", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+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/2021-09-01/examples/Operations_List.json
+ */
+ /**
+ * Sample code: StorageTargets_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### Skus_List
+
+```java
+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/2021-09-01/examples/Skus_List.json
+ */
+ /**
+ * Sample code: Skus_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void skusList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.skus().list(Context.NONE);
+ }
+}
+```
+
+### StorageTargetOperation_Flush
+
+```java
+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/2021-09-01/examples/StorageTargets_Flush.json
+ */
+ /**
+ * Sample code: StorageTargets_Flush.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsFlush(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargetOperations().flush("scgroup", "sc", "st1", Context.NONE);
+ }
+}
+```
+
+### StorageTargetOperation_Resume
+
+```java
+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/2021-09-01/examples/StorageTargets_Resume.json
+ */
+ /**
+ * Sample code: StorageTargets_Resume.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsResume(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargetOperations().resume("scgroup", "sc", "st1", Context.NONE);
+ }
+}
+```
+
+### StorageTargetOperation_Suspend
+
+```java
+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/2021-09-01/examples/StorageTargets_Suspend.json
+ */
+ /**
+ * Sample code: StorageTargets_Suspend.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsSuspend(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargetOperations().suspend("scgroup", "sc", "st1", Context.NONE);
+ }
+}
+```
+
+### StorageTargets_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.storagecache.models.BlobNfsTarget;
+import com.azure.resourcemanager.storagecache.models.NamespaceJunction;
+import com.azure.resourcemanager.storagecache.models.Nfs3Target;
+import com.azure.resourcemanager.storagecache.models.StorageTargetType;
+import java.util.Arrays;
+
+/** Samples for StorageTargets CreateOrUpdate. */
+public final class StorageTargetsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: StorageTargets_CreateOrUpdate.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsCreateOrUpdate(
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .storageTargets()
+ .define("st1")
+ .withExistingCache("scgroup", "sc1")
+ .withJunctions(
+ Arrays
+ .asList(
+ new NamespaceJunction()
+ .withNamespacePath("/path/on/cache")
+ .withTargetPath("/path/on/exp1")
+ .withNfsExport("exp1")
+ .withNfsAccessPolicy("default"),
+ new NamespaceJunction()
+ .withNamespacePath("/path2/on/cache")
+ .withTargetPath("/path2/on/exp2")
+ .withNfsExport("exp2")
+ .withNfsAccessPolicy("rootSquash")))
+ .withTargetType(StorageTargetType.NFS3)
+ .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_HEAVY_INFREQ"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json
+ */
+ /**
+ * Sample code: StorageTargets_CreateOrUpdate_BlobNfs.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsCreateOrUpdateBlobNfs(
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .storageTargets()
+ .define("st1")
+ .withExistingCache("scgroup", "sc1")
+ .withJunctions(Arrays.asList(new NamespaceJunction().withNamespacePath("/blobnfs")))
+ .withTargetType(StorageTargetType.BLOB_NFS)
+ .withBlobNfs(
+ new BlobNfsTarget()
+ .withTarget(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/blofnfs/blobServices/default/containers/blobnfs")
+ .withUsageModel("WRITE_WORKLOAD_15"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json
+ */
+ /**
+ * Sample code: StorageTargets_CreateOrUpdate_NoJunctions.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsCreateOrUpdateNoJunctions(
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
+ .storageTargets()
+ .define("st1")
+ .withExistingCache("scgroup", "sc1")
+ .withTargetType(StorageTargetType.NFS3)
+ .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_HEAVY_INFREQ"))
+ .create();
+ }
+}
+```
+
+### StorageTargets_Delete
+
+```java
+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/2021-09-01/examples/StorageTargets_Delete.json
+ */
+ /**
+ * Sample code: StorageTargets_Delete.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsDelete(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().delete("scgroup", "sc1", "st1", null, Context.NONE);
+ }
+}
+```
+
+### StorageTargets_DnsRefresh
+
+```java
+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/2021-09-01/examples/StorageTargets_DnsRefresh.json
+ */
+ /**
+ * Sample code: Caches_DnsRefresh.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesDnsRefresh(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().dnsRefresh("scgroup", "sc", "st1", Context.NONE);
+ }
+}
+```
+
+### StorageTargets_Get
+
+```java
+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/2021-09-01/examples/StorageTargets_Get.json
+ */
+ /**
+ * Sample code: StorageTargets_Get.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsGet(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().getWithResponse("scgroup", "sc1", "st1", Context.NONE);
+ }
+}
+```
+
+### StorageTargets_ListByCache
+
+```java
+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/2021-09-01/examples/StorageTargets_ListByCache.json
+ */
+ /**
+ * Sample code: StorageTargets_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().listByCache("scgroup", "sc1", Context.NONE);
+ }
+}
+```
+
+### UsageModels_List
+
+```java
+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/2021-09-01/examples/UsageModels_List.json
+ */
+ /**
+ * Sample code: UsageModels_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void usageModelsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.usageModels().list(Context.NONE);
+ }
+}
+```
-- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/UsageModelsListSamples.java)
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml
index bc65ebacc29f1..13deb351bfa9b 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml
@@ -13,7 +13,7 @@
jar
Microsoft 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-2021-05.
+ 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-2021-09.
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 463b1880df29e..412124d0f457a 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
@@ -198,7 +198,7 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.storagecache")
.append("/")
- .append("1.0.0-beta.3");
+ .append("1.0.0-beta.4");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
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 93962e12ca282..b720175d97f87 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
@@ -73,7 +73,7 @@ public interface CachesClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName);
/**
@@ -88,7 +88,7 @@ public interface CachesClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName, Context context);
/**
@@ -160,7 +160,7 @@ public interface CachesClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Cache instance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CacheInner> beginCreateOrUpdate(
String resourceGroupName, String cacheName, CacheInner cache);
@@ -178,7 +178,7 @@ SyncPoller, CacheInner> beginCreateOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Cache instance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, CacheInner> beginCreateOrUpdate(
String resourceGroupName, String cacheName, CacheInner cache, Context context);
@@ -272,7 +272,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDebugInfo(String resourceGroupName, String cacheName);
/**
@@ -287,7 +287,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDebugInfo(String resourceGroupName, String cacheName, Context context);
/**
@@ -329,7 +329,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName);
/**
@@ -345,7 +345,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName, Context context);
/**
@@ -388,7 +388,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStart(String resourceGroupName, String cacheName);
/**
@@ -403,7 +403,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStart(String resourceGroupName, String cacheName, Context context);
/**
@@ -444,7 +444,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStop(String resourceGroupName, String cacheName);
/**
@@ -459,7 +459,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStop(String resourceGroupName, String cacheName, Context context);
/**
@@ -500,7 +500,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginUpgradeFirmware(String resourceGroupName, String cacheName);
/**
@@ -515,7 +515,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginUpgradeFirmware(
String resourceGroupName, String cacheName, Context context);
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java
index c328f4b11293b..2f6ee7fd4aa37 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java
@@ -17,7 +17,7 @@ public interface SkusClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface SkusClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java
index fad3bd2864097..7094ce4f6f213 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java
@@ -25,7 +25,7 @@ public interface StorageTargetOperationsClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName, String storageTargetName);
/**
@@ -42,7 +42,7 @@ public interface StorageTargetOperationsClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginFlush(
String resourceGroupName, String cacheName, String storageTargetName, Context context);
@@ -89,7 +89,7 @@ SyncPoller, Void> beginFlush(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginSuspend(
String resourceGroupName, String cacheName, String storageTargetName);
@@ -106,7 +106,7 @@ SyncPoller, Void> beginSuspend(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginSuspend(
String resourceGroupName, String cacheName, String storageTargetName, Context context);
@@ -151,7 +151,7 @@ SyncPoller, Void> beginSuspend(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginResume(
String resourceGroupName, String cacheName, String storageTargetName);
@@ -168,7 +168,7 @@ SyncPoller, Void> beginResume(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginResume(
String resourceGroupName, String cacheName, String storageTargetName, Context context);
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetsClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetsClient.java
index 7c5354d6a1b66..39e0e164d8f66 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetsClient.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetsClient.java
@@ -27,7 +27,7 @@ public interface StorageTargetsClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDnsRefresh(
String resourceGroupName, String cacheName, String storageTargetName);
@@ -44,7 +44,7 @@ SyncPoller, Void> beginDnsRefresh(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDnsRefresh(
String resourceGroupName, String cacheName, String storageTargetName, Context context);
@@ -123,7 +123,7 @@ SyncPoller, Void> beginDnsRefresh(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String cacheName, String storageTargetName, String force);
@@ -145,7 +145,7 @@ SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String cacheName, String storageTargetName, String force, Context context);
@@ -251,7 +251,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return type of the Storage Target.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, StorageTargetInner> beginCreateOrUpdate(
String resourceGroupName, String cacheName, String storageTargetName, StorageTargetInner storagetarget);
@@ -270,7 +270,7 @@ SyncPoller, StorageTargetInner> beginCreateOrUpda
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return type of the Storage Target.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, StorageTargetInner> beginCreateOrUpdate(
String resourceGroupName,
String cacheName,
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 80819c5118d29..c45630fc6acd6 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
@@ -10,6 +10,7 @@
import com.azure.resourcemanager.storagecache.models.ClfsTarget;
import com.azure.resourcemanager.storagecache.models.NamespaceJunction;
import com.azure.resourcemanager.storagecache.models.Nfs3Target;
+import com.azure.resourcemanager.storagecache.models.OperationalStateType;
import com.azure.resourcemanager.storagecache.models.ProvisioningStateType;
import com.azure.resourcemanager.storagecache.models.StorageTargetResource;
import com.azure.resourcemanager.storagecache.models.StorageTargetType;
@@ -94,6 +95,29 @@ public ProvisioningStateType provisioningState() {
return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
+ /**
+ * Get the state property: Storage target operational state.
+ *
+ * @return the state value.
+ */
+ public OperationalStateType state() {
+ return this.innerProperties() == null ? null : this.innerProperties().state();
+ }
+
+ /**
+ * Set the state property: Storage target operational state.
+ *
+ * @param state the state value to set.
+ * @return the StorageTargetInner object itself.
+ */
+ public StorageTargetInner withState(OperationalStateType state) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageTargetProperties();
+ }
+ this.innerProperties().withState(state);
+ return this;
+ }
+
/**
* Get the nfs3 property: Properties when targetType is nfs3.
*
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 7911afa098617..6fe1735958b50 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
@@ -10,6 +10,7 @@
import com.azure.resourcemanager.storagecache.models.ClfsTarget;
import com.azure.resourcemanager.storagecache.models.NamespaceJunction;
import com.azure.resourcemanager.storagecache.models.Nfs3Target;
+import com.azure.resourcemanager.storagecache.models.OperationalStateType;
import com.azure.resourcemanager.storagecache.models.ProvisioningStateType;
import com.azure.resourcemanager.storagecache.models.StorageTargetType;
import com.azure.resourcemanager.storagecache.models.UnknownTarget;
@@ -41,6 +42,12 @@ public final class StorageTargetProperties {
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningStateType provisioningState;
+ /*
+ * Storage target operational state.
+ */
+ @JsonProperty(value = "state")
+ private OperationalStateType state;
+
/*
* Properties when targetType is nfs3.
*/
@@ -115,6 +122,26 @@ public ProvisioningStateType provisioningState() {
return this.provisioningState;
}
+ /**
+ * Get the state property: Storage target operational state.
+ *
+ * @return the state value.
+ */
+ public OperationalStateType state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Storage target operational state.
+ *
+ * @param state the state value to set.
+ * @return the StorageTargetProperties object itself.
+ */
+ public StorageTargetProperties withState(OperationalStateType state) {
+ this.state = state;
+ return this;
+ }
+
/**
* Get the nfs3 property: Properties when targetType is nfs3.
*
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 c2196266594a3..598dbbb20c389 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
@@ -660,7 +660,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cacheName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, cacheName);
return this
@@ -680,7 +680,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String cacheName, Context context) {
context = this.client.mergeContext(context);
@@ -701,7 +701,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName) {
return beginDeleteAsync(resourceGroupName, cacheName).getSyncPoller();
}
@@ -718,7 +718,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName, Context context) {
return beginDeleteAsync(resourceGroupName, cacheName, context).getSyncPoller();
}
@@ -1063,7 +1063,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Cache instance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CacheInner> beginCreateOrUpdateAsync(
String resourceGroupName, String cacheName, CacheInner cache) {
Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, cacheName, cache);
@@ -1087,7 +1087,7 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Cache instance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, CacheInner> beginCreateOrUpdateAsync(
String resourceGroupName, String cacheName, CacheInner cache, Context context) {
context = this.client.mergeContext(context);
@@ -1112,7 +1112,7 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Cache instance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CacheInner> beginCreateOrUpdate(
String resourceGroupName, String cacheName, CacheInner cache) {
return beginCreateOrUpdateAsync(resourceGroupName, cacheName, cache).getSyncPoller();
@@ -1132,7 +1132,7 @@ public SyncPoller, CacheInner> beginCreateOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a Cache instance.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, CacheInner> beginCreateOrUpdate(
String resourceGroupName, String cacheName, CacheInner cache, Context context) {
return beginCreateOrUpdateAsync(resourceGroupName, cacheName, cache, context).getSyncPoller();
@@ -1555,7 +1555,7 @@ private Mono>> debugInfoWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDebugInfoAsync(String resourceGroupName, String cacheName) {
Mono>> mono = debugInfoWithResponseAsync(resourceGroupName, cacheName);
return this
@@ -1575,7 +1575,7 @@ private PollerFlux, Void> beginDebugInfoAsync(String resourceGr
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDebugInfoAsync(
String resourceGroupName, String cacheName, Context context) {
context = this.client.mergeContext(context);
@@ -1596,7 +1596,7 @@ private PollerFlux, Void> beginDebugInfoAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDebugInfo(String resourceGroupName, String cacheName) {
return beginDebugInfoAsync(resourceGroupName, cacheName).getSyncPoller();
}
@@ -1613,7 +1613,7 @@ public SyncPoller, Void> beginDebugInfo(String resourceGroupNam
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDebugInfo(
String resourceGroupName, String cacheName, Context context) {
return beginDebugInfoAsync(resourceGroupName, cacheName, context).getSyncPoller();
@@ -1794,7 +1794,7 @@ private Mono>> flushWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginFlushAsync(String resourceGroupName, String cacheName) {
Mono>> mono = flushWithResponseAsync(resourceGroupName, cacheName);
return this
@@ -1815,7 +1815,7 @@ private PollerFlux, Void> beginFlushAsync(String resourceGroupN
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginFlushAsync(
String resourceGroupName, String cacheName, Context context) {
context = this.client.mergeContext(context);
@@ -1837,7 +1837,7 @@ private PollerFlux, Void> beginFlushAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName) {
return beginFlushAsync(resourceGroupName, cacheName).getSyncPoller();
}
@@ -1855,7 +1855,7 @@ public SyncPoller, Void> beginFlush(String resourceGroupName, S
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName, Context context) {
return beginFlushAsync(resourceGroupName, cacheName, context).getSyncPoller();
}
@@ -2036,7 +2036,7 @@ private Mono>> startWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginStartAsync(String resourceGroupName, String cacheName) {
Mono>> mono = startWithResponseAsync(resourceGroupName, cacheName);
return this
@@ -2056,7 +2056,7 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginStartAsync(
String resourceGroupName, String cacheName, Context context) {
context = this.client.mergeContext(context);
@@ -2077,7 +2077,7 @@ private PollerFlux, Void> beginStartAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginStart(String resourceGroupName, String cacheName) {
return beginStartAsync(resourceGroupName, cacheName).getSyncPoller();
}
@@ -2094,7 +2094,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginStart(String resourceGroupName, String cacheName, Context context) {
return beginStartAsync(resourceGroupName, cacheName, context).getSyncPoller();
}
@@ -2271,7 +2271,7 @@ private Mono>> stopWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginStopAsync(String resourceGroupName, String cacheName) {
Mono>> mono = stopWithResponseAsync(resourceGroupName, cacheName);
return this
@@ -2291,7 +2291,7 @@ private PollerFlux, Void> beginStopAsync(String resourceGroupNa
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginStopAsync(
String resourceGroupName, String cacheName, Context context) {
context = this.client.mergeContext(context);
@@ -2312,7 +2312,7 @@ private PollerFlux, Void> beginStopAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginStop(String resourceGroupName, String cacheName) {
return beginStopAsync(resourceGroupName, cacheName).getSyncPoller();
}
@@ -2329,7 +2329,7 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginStop(String resourceGroupName, String cacheName, Context context) {
return beginStopAsync(resourceGroupName, cacheName, context).getSyncPoller();
}
@@ -2507,7 +2507,7 @@ private Mono>> upgradeFirmwareWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginUpgradeFirmwareAsync(String resourceGroupName, String cacheName) {
Mono>> mono = upgradeFirmwareWithResponseAsync(resourceGroupName, cacheName);
return this
@@ -2527,7 +2527,7 @@ private PollerFlux, Void> beginUpgradeFirmwareAsync(String reso
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginUpgradeFirmwareAsync(
String resourceGroupName, String cacheName, Context context) {
context = this.client.mergeContext(context);
@@ -2548,7 +2548,7 @@ private PollerFlux, Void> beginUpgradeFirmwareAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginUpgradeFirmware(String resourceGroupName, String cacheName) {
return beginUpgradeFirmwareAsync(resourceGroupName, cacheName).getSyncPoller();
}
@@ -2565,7 +2565,7 @@ public SyncPoller, Void> beginUpgradeFirmware(String resourceGr
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginUpgradeFirmware(
String resourceGroupName, String cacheName, Context context) {
return beginUpgradeFirmwareAsync(resourceGroupName, cacheName, context).getSyncPoller();
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusClientImpl.java
index 0d2646ae7a898..468fdc7000df4 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusClientImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusClientImpl.java
@@ -85,7 +85,7 @@ Mono> listNext(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -131,7 +131,7 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -172,7 +172,7 @@ private Mono> listSinglePageAsync(Context contex
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -186,7 +186,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -199,7 +199,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -213,7 +213,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
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 030fc6aaef551..363b89e756849 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
@@ -227,7 +227,7 @@ public StorageTargetOperationsClient getStorageTargetOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-05-01";
+ this.apiVersion = "2021-09-01";
this.operations = new OperationsClientImpl(this);
this.skus = new SkusClientImpl(this);
this.usageModels = new UsageModelsClientImpl(this);
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetImpl.java
index 0474f4a67e00d..bd5b94c9fc9c2 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetImpl.java
@@ -12,6 +12,7 @@
import com.azure.resourcemanager.storagecache.models.ClfsTarget;
import com.azure.resourcemanager.storagecache.models.NamespaceJunction;
import com.azure.resourcemanager.storagecache.models.Nfs3Target;
+import com.azure.resourcemanager.storagecache.models.OperationalStateType;
import com.azure.resourcemanager.storagecache.models.ProvisioningStateType;
import com.azure.resourcemanager.storagecache.models.StorageTarget;
import com.azure.resourcemanager.storagecache.models.StorageTargetType;
@@ -61,6 +62,10 @@ public ProvisioningStateType provisioningState() {
return this.innerModel().provisioningState();
}
+ public OperationalStateType state() {
+ return this.innerModel().state();
+ }
+
public Nfs3Target nfs3() {
return this.innerModel().nfs3();
}
@@ -198,6 +203,11 @@ public StorageTargetImpl withTargetType(StorageTargetType targetType) {
return this;
}
+ public StorageTargetImpl withState(OperationalStateType state) {
+ this.innerModel().withState(state);
+ return this;
+ }
+
public StorageTargetImpl withNfs3(Nfs3Target nfs3) {
this.innerModel().withNfs3(nfs3);
return this;
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsClientImpl.java
index 150c973c17726..adda4ffb7e95c 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsClientImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsClientImpl.java
@@ -231,7 +231,7 @@ private Mono>> flushWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginFlushAsync(
String resourceGroupName, String cacheName, String storageTargetName) {
Mono>> mono = flushWithResponseAsync(resourceGroupName, cacheName, storageTargetName);
@@ -254,7 +254,7 @@ private PollerFlux, Void> beginFlushAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginFlushAsync(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
context = this.client.mergeContext(context);
@@ -278,7 +278,7 @@ private PollerFlux, Void> beginFlushAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginFlush(
String resourceGroupName, String cacheName, String storageTargetName) {
return beginFlushAsync(resourceGroupName, cacheName, storageTargetName).getSyncPoller();
@@ -298,7 +298,7 @@ public SyncPoller, Void> beginFlush(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginFlush(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
return beginFlushAsync(resourceGroupName, cacheName, storageTargetName, context).getSyncPoller();
@@ -501,7 +501,7 @@ private Mono>> suspendWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginSuspendAsync(
String resourceGroupName, String cacheName, String storageTargetName) {
Mono>> mono =
@@ -524,7 +524,7 @@ private PollerFlux, Void> beginSuspendAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginSuspendAsync(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
context = this.client.mergeContext(context);
@@ -547,7 +547,7 @@ private PollerFlux, Void> beginSuspendAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginSuspend(
String resourceGroupName, String cacheName, String storageTargetName) {
return beginSuspendAsync(resourceGroupName, cacheName, storageTargetName).getSyncPoller();
@@ -566,7 +566,7 @@ public SyncPoller, Void> beginSuspend(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginSuspend(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
return beginSuspendAsync(resourceGroupName, cacheName, storageTargetName, context).getSyncPoller();
@@ -765,7 +765,7 @@ private Mono>> resumeWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginResumeAsync(
String resourceGroupName, String cacheName, String storageTargetName) {
Mono>> mono =
@@ -788,7 +788,7 @@ private PollerFlux, Void> beginResumeAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginResumeAsync(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
context = this.client.mergeContext(context);
@@ -811,7 +811,7 @@ private PollerFlux, Void> beginResumeAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginResume(
String resourceGroupName, String cacheName, String storageTargetName) {
return beginResumeAsync(resourceGroupName, cacheName, storageTargetName).getSyncPoller();
@@ -830,7 +830,7 @@ public SyncPoller, Void> beginResume(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginResume(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
return beginResumeAsync(resourceGroupName, cacheName, storageTargetName, context).getSyncPoller();
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsClientImpl.java
index 82907f44ca052..4312c1df79675 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsClientImpl.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsClientImpl.java
@@ -280,7 +280,7 @@ private Mono>> dnsRefreshWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDnsRefreshAsync(
String resourceGroupName, String cacheName, String storageTargetName) {
Mono>> mono =
@@ -303,7 +303,7 @@ private PollerFlux, Void> beginDnsRefreshAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDnsRefreshAsync(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
context = this.client.mergeContext(context);
@@ -326,7 +326,7 @@ private PollerFlux, Void> beginDnsRefreshAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDnsRefresh(
String resourceGroupName, String cacheName, String storageTargetName) {
return beginDnsRefreshAsync(resourceGroupName, cacheName, storageTargetName).getSyncPoller();
@@ -345,7 +345,7 @@ public SyncPoller, Void> beginDnsRefresh(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDnsRefresh(
String resourceGroupName, String cacheName, String storageTargetName, Context context) {
return beginDnsRefreshAsync(resourceGroupName, cacheName, storageTargetName, context).getSyncPoller();
@@ -746,7 +746,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String cacheName, String storageTargetName, String force) {
Mono>> mono =
@@ -774,7 +774,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String cacheName, String storageTargetName, String force, Context context) {
context = this.client.mergeContext(context);
@@ -802,7 +802,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String cacheName, String storageTargetName, String force) {
return beginDeleteAsync(resourceGroupName, cacheName, storageTargetName, force).getSyncPoller();
@@ -826,7 +826,7 @@ public SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String cacheName, String storageTargetName, String force, Context context) {
return beginDeleteAsync(resourceGroupName, cacheName, storageTargetName, force, context).getSyncPoller();
@@ -1276,7 +1276,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return type of the Storage Target.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, StorageTargetInner> beginCreateOrUpdateAsync(
String resourceGroupName, String cacheName, String storageTargetName, StorageTargetInner storagetarget) {
Mono>> mono =
@@ -1302,7 +1302,7 @@ private PollerFlux, StorageTargetInner> beginCrea
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return type of the Storage Target.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, StorageTargetInner> beginCreateOrUpdateAsync(
String resourceGroupName,
String cacheName,
@@ -1332,7 +1332,7 @@ private PollerFlux, StorageTargetInner> beginCrea
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return type of the Storage Target.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, StorageTargetInner> beginCreateOrUpdate(
String resourceGroupName, String cacheName, String storageTargetName, StorageTargetInner storagetarget) {
return beginCreateOrUpdateAsync(resourceGroupName, cacheName, storageTargetName, storagetarget).getSyncPoller();
@@ -1353,7 +1353,7 @@ public SyncPoller, StorageTargetInner> beginCreat
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return type of the Storage Target.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, StorageTargetInner> beginCreateOrUpdate(
String resourceGroupName,
String cacheName,
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/OperationalStateType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/OperationalStateType.java
new file mode 100644
index 0000000000000..16875069a4422
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/OperationalStateType.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for OperationalStateType. */
+public final class OperationalStateType extends ExpandableStringEnum {
+ /** Static value Ready for OperationalStateType. */
+ public static final OperationalStateType READY = fromString("Ready");
+
+ /** Static value Busy for OperationalStateType. */
+ public static final OperationalStateType BUSY = fromString("Busy");
+
+ /** Static value Suspended for OperationalStateType. */
+ public static final OperationalStateType SUSPENDED = fromString("Suspended");
+
+ /** Static value Flushing for OperationalStateType. */
+ public static final OperationalStateType FLUSHING = fromString("Flushing");
+
+ /**
+ * Creates or finds a OperationalStateType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding OperationalStateType.
+ */
+ @JsonCreator
+ public static OperationalStateType fromString(String name) {
+ return fromString(name, OperationalStateType.class);
+ }
+
+ /** @return known OperationalStateType values. */
+ public static Collection values() {
+ return values(OperationalStateType.class);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Skus.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Skus.java
index b3fb376d9c75d..d4132db637919 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Skus.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Skus.java
@@ -14,7 +14,7 @@ public interface Skus {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
PagedIterable list();
@@ -25,7 +25,7 @@ public interface Skus {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of StorageCache.
+ * @return the list of StorageCache.Cache SKUs available to this subscription.
*/
PagedIterable list(Context context);
}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTarget.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTarget.java
index c65e11e1afc05..aeeef2830c19b 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTarget.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTarget.java
@@ -69,6 +69,13 @@ public interface StorageTarget {
*/
ProvisioningStateType provisioningState();
+ /**
+ * Gets the state property: Storage target operational state.
+ *
+ * @return the state value.
+ */
+ OperationalStateType state();
+
/**
* Gets the nfs3 property: Properties when targetType is nfs3.
*
@@ -146,6 +153,7 @@ interface WithParentResource {
interface WithCreate
extends DefinitionStages.WithJunctions,
DefinitionStages.WithTargetType,
+ DefinitionStages.WithState,
DefinitionStages.WithNfs3,
DefinitionStages.WithClfs,
DefinitionStages.WithUnknown,
@@ -186,6 +194,16 @@ interface WithTargetType {
*/
WithCreate withTargetType(StorageTargetType targetType);
}
+ /** The stage of the StorageTarget definition allowing to specify state. */
+ interface WithState {
+ /**
+ * Specifies the state property: Storage target operational state..
+ *
+ * @param state Storage target operational state.
+ * @return the next definition stage.
+ */
+ WithCreate withState(OperationalStateType state);
+ }
/** The stage of the StorageTarget definition allowing to specify nfs3. */
interface WithNfs3 {
/**
@@ -237,6 +255,7 @@ interface WithBlobNfs {
/** The template for StorageTarget update. */
interface Update
extends UpdateStages.WithJunctions,
+ UpdateStages.WithState,
UpdateStages.WithNfs3,
UpdateStages.WithClfs,
UpdateStages.WithUnknown,
@@ -269,6 +288,16 @@ interface WithJunctions {
*/
Update withJunctions(List junctions);
}
+ /** The stage of the StorageTarget update allowing to specify state. */
+ interface WithState {
+ /**
+ * Specifies the state property: Storage target operational state..
+ *
+ * @param state Storage target operational state.
+ * @return the next definition stage.
+ */
+ Update withState(OperationalStateType state);
+ }
/** The stage of the StorageTarget update allowing to specify nfs3. */
interface WithNfs3 {
/**
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/AscOperationsGetSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/AscOperationsGetSamples.java
deleted file mode 100644
index 14605b812bf97..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/AscOperationsGetSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for AscOperations Get. */
-public final class AscOperationsGetSamples {
- /**
- * Sample code: AscOperations_Get.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void ascOperationsGet(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.ascOperations().getWithResponse("westus", "testoperationid", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDebugInfoSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDebugInfoSamples.java
deleted file mode 100644
index bbc95b5a9f111..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDebugInfoSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches DebugInfo. */
-public final class CachesDebugInfoSamples {
- /**
- * Sample code: Caches_DebugInfo.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesDebugInfo(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().debugInfo("scgroup", "sc", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDeleteSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDeleteSamples.java
deleted file mode 100644
index 5ad84f119263f..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesDeleteSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches Delete. */
-public final class CachesDeleteSamples {
- /**
- * Sample code: Caches_Delete.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesDelete(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().delete("scgroup", "sc", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesFlushSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesFlushSamples.java
deleted file mode 100644
index dcc57319e6b10..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesFlushSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches Flush. */
-public final class CachesFlushSamples {
- /**
- * Sample code: Caches_Flush.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesFlush(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().flush("scgroup", "sc", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesGetByResourceGroupSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesGetByResourceGroupSamples.java
deleted file mode 100644
index e6c6205bf44bf..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesGetByResourceGroupSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches GetByResourceGroup. */
-public final class CachesGetByResourceGroupSamples {
- /**
- * Sample code: Caches_Get.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesGet(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListByResourceGroupSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListByResourceGroupSamples.java
deleted file mode 100644
index 9849853a7078b..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListByResourceGroupSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches ListByResourceGroup. */
-public final class CachesListByResourceGroupSamples {
- /**
- * Sample code: Caches_ListByResourceGroup.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesListByResourceGroup(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().listByResourceGroup("scgroup", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListSamples.java
deleted file mode 100644
index 1156d7d77d609..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesListSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches List. */
-public final class CachesListSamples {
- /**
- * Sample code: Caches_List.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesList(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().list(Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStartSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStartSamples.java
deleted file mode 100644
index ad7cb2d2c83c2..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStartSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches Start. */
-public final class CachesStartSamples {
- /**
- * Sample code: Caches_Start.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesStart(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().start("scgroup", "sc", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStopSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStopSamples.java
deleted file mode 100644
index 21f0a8bee09d0..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesStopSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches Stop. */
-public final class CachesStopSamples {
- /**
- * Sample code: Caches_Stop.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesStop(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().stop("scgroup", "sc", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpgradeFirmwareSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpgradeFirmwareSamples.java
deleted file mode 100644
index 029bbbc03b576..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpgradeFirmwareSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Caches UpgradeFirmware. */
-public final class CachesUpgradeFirmwareSamples {
- /**
- * Sample code: Caches_UpgradeFirmware.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesUpgradeFirmware(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.caches().upgradeFirmware("scgroup", "sc1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/OperationsListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/OperationsListSamples.java
deleted file mode 100644
index 1bfed7a822ff7..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/OperationsListSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Operations List. */
-public final class OperationsListSamples {
- /**
- * Sample code: StorageTargets_List.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void storageTargetsList(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.operations().list(Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/SkusListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/SkusListSamples.java
deleted file mode 100644
index 6d1caae99a15d..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/SkusListSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for Skus List. */
-public final class SkusListSamples {
- /**
- * Sample code: Skus_List.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void skusList(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.skus().list(Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationFlushSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationFlushSamples.java
deleted file mode 100644
index 71cdf452d5b0b..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationFlushSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for StorageTargetOperation Flush. */
-public final class StorageTargetOperationFlushSamples {
- /**
- * Sample code: StorageTargets_Flush.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void storageTargetsFlush(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.storageTargetOperations().flush("scgroup", "sc", "st1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationResumeSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationResumeSamples.java
deleted file mode 100644
index 02e4f8dec1cd2..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationResumeSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for StorageTargetOperation Resume. */
-public final class StorageTargetOperationResumeSamples {
- /**
- * Sample code: StorageTargets_Resume.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void storageTargetsResume(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.storageTargetOperations().resume("scgroup", "sc", "st1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationSuspendSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationSuspendSamples.java
deleted file mode 100644
index 44548edc1471c..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetOperationSuspendSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for StorageTargetOperation Suspend. */
-public final class StorageTargetOperationSuspendSamples {
- /**
- * Sample code: StorageTargets_Suspend.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void storageTargetsSuspend(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.storageTargetOperations().suspend("scgroup", "sc", "st1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDeleteSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDeleteSamples.java
deleted file mode 100644
index d6bb1aa86156c..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDeleteSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for StorageTargets Delete. */
-public final class StorageTargetsDeleteSamples {
- /**
- * Sample code: StorageTargets_Delete.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void storageTargetsDelete(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.storageTargets().delete("scgroup", "sc1", "st1", null, Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDnsRefreshSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDnsRefreshSamples.java
deleted file mode 100644
index e9b6736da439d..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsDnsRefreshSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for StorageTargets DnsRefresh. */
-public final class StorageTargetsDnsRefreshSamples {
- /**
- * Sample code: Caches_DnsRefresh.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void cachesDnsRefresh(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.storageTargets().dnsRefresh("scgroup", "sc", "st1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsGetSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsGetSamples.java
deleted file mode 100644
index 6fbe0672750db..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsGetSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for StorageTargets Get. */
-public final class StorageTargetsGetSamples {
- /**
- * Sample code: StorageTargets_Get.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void storageTargetsGet(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.storageTargets().getWithResponse("scgroup", "sc1", "st1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsListByCacheSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsListByCacheSamples.java
deleted file mode 100644
index 9e6627a85b1e9..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsListByCacheSamples.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for StorageTargets ListByCache. */
-public final class StorageTargetsListByCacheSamples {
- /**
- * Sample code: StorageTargets_List.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void storageTargetsList(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.storageTargets().listByCache("scgroup", "sc1", Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/UsageModelsListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/UsageModelsListSamples.java
deleted file mode 100644
index 18e4089b90947..0000000000000
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/UsageModelsListSamples.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.storagecache;
-
-import com.azure.core.util.Context;
-
-/** Samples for UsageModels List. */
-public final class UsageModelsListSamples {
- /**
- * Sample code: UsageModels_List.
- *
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
- */
- public static void usageModelsList(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager.usageModels().list(Context.NONE);
- }
-}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscOperationsGetSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscOperationsGetSamples.java
new file mode 100644
index 0000000000000..e4ef998f00016
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscOperationsGetSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/AscOperations_Get.json
+ */
+ /**
+ * Sample code: AscOperations_Get.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void ascOperationsGet(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.ascOperations().getWithResponse("westus", "testoperationid", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesCreateOrUpdateSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesCreateOrUpdateSamples.java
similarity index 91%
rename from sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesCreateOrUpdateSamples.java
rename to sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesCreateOrUpdateSamples.java
index 0c1d98ab8fc3c..95ea28da31405 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesCreateOrUpdateSamples.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesCreateOrUpdateSamples.java
@@ -2,7 +2,7 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.storagecache;
+package com.azure.resourcemanager.storagecache.generated;
import com.azure.resourcemanager.storagecache.models.CacheActiveDirectorySettings;
import com.azure.resourcemanager.storagecache.models.CacheActiveDirectorySettingsCredentials;
@@ -28,16 +28,17 @@
/** Samples for Caches CreateOrUpdate. */
public final class CachesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate_ldap_only.json
+ */
/**
* Sample code: Caches_CreateOrUpdate_ldap_only.
*
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
+ * @param manager Entry point to StorageCacheManager.
*/
public static void cachesCreateOrUpdateLdapOnly(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
.caches()
.define("sc1")
.withRegion("westus")
@@ -87,16 +88,16 @@ public static void cachesCreateOrUpdateLdapOnly(
.create();
}
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate.json
+ */
/**
* Sample code: Caches_CreateOrUpdate.
*
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
+ * @param manager Entry point to StorageCacheManager.
*/
- public static void cachesCreateOrUpdate(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager
+ public static void cachesCreateOrUpdate(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
.caches()
.define("sc1")
.withRegion("westus")
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesDebugInfoSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesDebugInfoSamples.java
new file mode 100644
index 0000000000000..3cd7d2cb482fc
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesDebugInfoSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_DebugInfo.json
+ */
+ /**
+ * Sample code: Caches_DebugInfo.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesDebugInfo(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().debugInfo("scgroup", "sc", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesDeleteSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesDeleteSamples.java
new file mode 100644
index 0000000000000..2db213d8c0efc
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_Delete.json
+ */
+ /**
+ * Sample code: Caches_Delete.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesDelete(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().delete("scgroup", "sc", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesFlushSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesFlushSamples.java
new file mode 100644
index 0000000000000..6baacd93aa9cc
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesFlushSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_Flush.json
+ */
+ /**
+ * Sample code: Caches_Flush.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesFlush(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().flush("scgroup", "sc", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesGetByResourceGroupSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..93384c05989ba
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesGetByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_Get.json
+ */
+ /**
+ * Sample code: Caches_Get.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesGet(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesListByResourceGroupSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..13f71bb57a2cb
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesListByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_ListByResourceGroup.json
+ */
+ /**
+ * Sample code: Caches_ListByResourceGroup.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesListByResourceGroup(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().listByResourceGroup("scgroup", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesListSamples.java
new file mode 100644
index 0000000000000..4e1f2d52c76f3
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_List.json
+ */
+ /**
+ * Sample code: Caches_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().list(Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartSamples.java
new file mode 100644
index 0000000000000..511eea6b4c79a
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_Start.json
+ */
+ /**
+ * Sample code: Caches_Start.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesStart(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().start("scgroup", "sc", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopSamples.java
new file mode 100644
index 0000000000000..74609712696f2
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_Stop.json
+ */
+ /**
+ * Sample code: Caches_Stop.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesStop(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().stop("scgroup", "sc", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpdateSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpdateSamples.java
similarity index 89%
rename from sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpdateSamples.java
rename to sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpdateSamples.java
index c21b67a622684..0396e25e32128 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/CachesUpdateSamples.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpdateSamples.java
@@ -2,7 +2,7 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.storagecache;
+package com.azure.resourcemanager.storagecache.generated;
import com.azure.core.util.Context;
import com.azure.resourcemanager.storagecache.models.Cache;
@@ -23,17 +23,16 @@
/** Samples for Caches Update. */
public final class CachesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update_ldap_only.json
+ */
/**
* Sample code: Caches_Update_ldap_only.
*
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
+ * @param manager Entry point to StorageCacheManager.
*/
- public static void cachesUpdateLdapOnly(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- Cache resource =
- storageCacheManager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE).getValue();
+ public static void cachesUpdateLdapOnly(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ Cache resource = manager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE).getValue();
resource
.update()
.withTags(mapOf("Dept", "Contoso"))
@@ -101,16 +100,16 @@ public static void cachesUpdateLdapOnly(
.apply();
}
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update.json
+ */
/**
* Sample code: Caches_Update.
*
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
+ * @param manager Entry point to StorageCacheManager.
*/
- public static void cachesUpdate(com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- Cache resource =
- storageCacheManager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE).getValue();
+ public static void cachesUpdate(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ Cache resource = manager.caches().getByResourceGroupWithResponse("scgroup", "sc1", Context.NONE).getValue();
resource
.update()
.withTags(mapOf("Dept", "Contoso"))
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpgradeFirmwareSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpgradeFirmwareSamples.java
new file mode 100644
index 0000000000000..221b638145026
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpgradeFirmwareSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Caches_UpgradeFirmware.json
+ */
+ /**
+ * Sample code: Caches_UpgradeFirmware.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesUpgradeFirmware(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.caches().upgradeFirmware("scgroup", "sc1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/OperationsListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/OperationsListSamples.java
new file mode 100644
index 0000000000000..1ced474b2d0db
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/OperationsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Operations_List.json
+ */
+ /**
+ * Sample code: StorageTargets_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/SkusListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/SkusListSamples.java
new file mode 100644
index 0000000000000..84caff265ea58
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/SkusListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/Skus_List.json
+ */
+ /**
+ * Sample code: Skus_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void skusList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.skus().list(Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationFlushSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationFlushSamples.java
new file mode 100644
index 0000000000000..6194821d44c43
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationFlushSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/StorageTargets_Flush.json
+ */
+ /**
+ * Sample code: StorageTargets_Flush.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsFlush(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargetOperations().flush("scgroup", "sc", "st1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationResumeSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationResumeSamples.java
new file mode 100644
index 0000000000000..d60b0831fe117
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationResumeSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/StorageTargets_Resume.json
+ */
+ /**
+ * Sample code: StorageTargets_Resume.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsResume(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargetOperations().resume("scgroup", "sc", "st1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationSuspendSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationSuspendSamples.java
new file mode 100644
index 0000000000000..1e328570a55ff
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationSuspendSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/StorageTargets_Suspend.json
+ */
+ /**
+ * Sample code: StorageTargets_Suspend.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsSuspend(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargetOperations().suspend("scgroup", "sc", "st1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsCreateOrUpdateSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsCreateOrUpdateSamples.java
similarity index 73%
rename from sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsCreateOrUpdateSamples.java
rename to sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsCreateOrUpdateSamples.java
index d72dbca31ab9d..eb1ca0a83c5c7 100644
--- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/StorageTargetsCreateOrUpdateSamples.java
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsCreateOrUpdateSamples.java
@@ -2,7 +2,7 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.storagecache;
+package com.azure.resourcemanager.storagecache.generated;
import com.azure.resourcemanager.storagecache.models.BlobNfsTarget;
import com.azure.resourcemanager.storagecache.models.NamespaceJunction;
@@ -12,16 +12,17 @@
/** Samples for StorageTargets CreateOrUpdate. */
public final class StorageTargetsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate.json
+ */
/**
* Sample code: StorageTargets_CreateOrUpdate.
*
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
+ * @param manager Entry point to StorageCacheManager.
*/
public static void storageTargetsCreateOrUpdate(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
.storageTargets()
.define("st1")
.withExistingCache("scgroup", "sc1")
@@ -43,16 +44,17 @@ public static void storageTargetsCreateOrUpdate(
.create();
}
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json
+ */
/**
* Sample code: StorageTargets_CreateOrUpdate_BlobNfs.
*
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
+ * @param manager Entry point to StorageCacheManager.
*/
public static void storageTargetsCreateOrUpdateBlobNfs(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
.storageTargets()
.define("st1")
.withExistingCache("scgroup", "sc1")
@@ -66,16 +68,17 @@ public static void storageTargetsCreateOrUpdateBlobNfs(
.create();
}
+ /*
+ * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json
+ */
/**
* Sample code: StorageTargets_CreateOrUpdate_NoJunctions.
*
- * @param storageCacheManager Entry point to StorageCacheManager. 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.
+ * @param manager Entry point to StorageCacheManager.
*/
public static void storageTargetsCreateOrUpdateNoJunctions(
- com.azure.resourcemanager.storagecache.StorageCacheManager storageCacheManager) {
- storageCacheManager
+ com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager
.storageTargets()
.define("st1")
.withExistingCache("scgroup", "sc1")
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsDeleteSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsDeleteSamples.java
new file mode 100644
index 0000000000000..ed18c18702fc0
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/StorageTargets_Delete.json
+ */
+ /**
+ * Sample code: StorageTargets_Delete.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsDelete(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().delete("scgroup", "sc1", "st1", null, Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsDnsRefreshSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsDnsRefreshSamples.java
new file mode 100644
index 0000000000000..8ac93ad3262c4
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsDnsRefreshSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/StorageTargets_DnsRefresh.json
+ */
+ /**
+ * Sample code: Caches_DnsRefresh.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void cachesDnsRefresh(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().dnsRefresh("scgroup", "sc", "st1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsGetSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsGetSamples.java
new file mode 100644
index 0000000000000..bf8bc38da2281
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsGetSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/StorageTargets_Get.json
+ */
+ /**
+ * Sample code: StorageTargets_Get.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsGet(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().getWithResponse("scgroup", "sc1", "st1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsListByCacheSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsListByCacheSamples.java
new file mode 100644
index 0000000000000..e7f346ded2b58
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsListByCacheSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/StorageTargets_ListByCache.json
+ */
+ /**
+ * Sample code: StorageTargets_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void storageTargetsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.storageTargets().listByCache("scgroup", "sc1", Context.NONE);
+ }
+}
diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/UsageModelsListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/UsageModelsListSamples.java
new file mode 100644
index 0000000000000..cb418eee19d3c
--- /dev/null
+++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/UsageModelsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagecache.generated;
+
+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/2021-09-01/examples/UsageModels_List.json
+ */
+ /**
+ * Sample code: UsageModels_List.
+ *
+ * @param manager Entry point to StorageCacheManager.
+ */
+ public static void usageModelsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) {
+ manager.usageModels().list(Context.NONE);
+ }
+}