diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md b/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md index 530e82e161eb..dcdcbe9b84aa 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md +++ b/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.7 (Unreleased) +## 1.0.0-beta.1 (2023-01-04) + +- 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-2023-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/README.md b/sdk/storagecache/azure-resourcemanager-storagecache/README.md index 5b97788c2070..62ee65f116a3 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/README.md +++ b/sdk/storagecache/azure-resourcemanager-storagecache/README.md @@ -2,7 +2,7 @@ Azure Resource Manager StorageCache client library for Java. -This package contains Microsoft Azure SDK for StorageCache Management SDK. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-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-2023-01. 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.6 + 1.0.0-beta.7 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md index a5b6f67a7993..eb287b49c6a0 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md +++ b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md @@ -50,6 +50,7 @@ - [DnsRefresh](#storagetargets_dnsrefresh) - [Get](#storagetargets_get) - [ListByCache](#storagetargets_listbycache) +- [RestoreDefaults](#storagetargets_restoredefaults) ## UsageModels @@ -62,7 +63,7 @@ import com.azure.core.util.Context; /** Samples for AscOperations Get. */ public final class AscOperationsGetSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscOperations_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/AscOperations_Get.json */ /** * Sample code: AscOperations_Get. @@ -83,7 +84,7 @@ import com.azure.core.util.Context; /** Samples for AscUsages List. */ public final class AscUsagesListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscResourceUsages_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/AscResourceUsages_Get.json */ /** * Sample code: AscUsages_List. @@ -126,7 +127,7 @@ import java.util.Map; /** Samples for Caches CreateOrUpdate. */ public final class CachesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_CreateOrUpdate_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_CreateOrUpdate_ldap_only.json */ /** * Sample code: Caches_CreateOrUpdate_ldap_only. @@ -153,7 +154,7 @@ public final class CachesCreateOrUpdateSamples { new CacheEncryptionSettings() .withKeyEncryptionKey( new KeyVaultKeyReference() - .withKeyUrl("https://keyvault-cmk.vault.azure.net/keys/key2048/test") + .withKeyUrl("fakeTokenPlaceholder") .withSourceVault( new KeyVaultKeyReferenceSourceVault() .withId( @@ -185,12 +186,12 @@ public final class CachesCreateOrUpdateSamples { .withCredentials( new CacheUsernameDownloadSettingsCredentials() .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local") - .withBindPassword("")))) + .withBindPassword("fakeTokenPlaceholder")))) .create(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_CreateOrUpdate.json */ /** * Sample code: Caches_CreateOrUpdate. @@ -223,7 +224,7 @@ public final class CachesCreateOrUpdateSamples { new CacheEncryptionSettings() .withKeyEncryptionKey( new KeyVaultKeyReference() - .withKeyUrl("https://keyvault-cmk.vault.azure.net/keys/key2047/test") + .withKeyUrl("fakeTokenPlaceholder") .withSourceVault( new KeyVaultKeyReferenceSourceVault() .withId( @@ -256,7 +257,7 @@ public final class CachesCreateOrUpdateSamples { .withCredentials( new CacheActiveDirectorySettingsCredentials() .withUsername("consotoAdmin") - .withPassword(""))) + .withPassword("fakeTokenPlaceholder"))) .withUsernameDownload( new CacheUsernameDownloadSettings() .withExtendedGroups(true) @@ -266,7 +267,7 @@ public final class CachesCreateOrUpdateSamples { .withCredentials( new CacheUsernameDownloadSettingsCredentials() .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local") - .withBindPassword("")))) + .withBindPassword("fakeTokenPlaceholder")))) .create(); } @@ -291,7 +292,7 @@ import com.azure.core.util.Context; /** Samples for Caches DebugInfo. */ public final class CachesDebugInfoSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_DebugInfo.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_DebugInfo.json */ /** * Sample code: Caches_DebugInfo. @@ -312,7 +313,7 @@ import com.azure.core.util.Context; /** Samples for Caches Delete. */ public final class CachesDeleteSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Delete.json */ /** * Sample code: Caches_Delete. @@ -333,7 +334,7 @@ import com.azure.core.util.Context; /** Samples for Caches Flush. */ public final class CachesFlushSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Flush.json */ /** * Sample code: Caches_Flush. @@ -354,7 +355,7 @@ import com.azure.core.util.Context; /** Samples for Caches GetByResourceGroup. */ public final class CachesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Get.json */ /** * Sample code: Caches_Get. @@ -375,7 +376,7 @@ import com.azure.core.util.Context; /** Samples for Caches List. */ public final class CachesListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_List.json */ /** * Sample code: Caches_List. @@ -396,7 +397,7 @@ import com.azure.core.util.Context; /** Samples for Caches ListByResourceGroup. */ public final class CachesListByResourceGroupSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_ListByResourceGroup.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_ListByResourceGroup.json */ /** * Sample code: Caches_ListByResourceGroup. @@ -418,7 +419,7 @@ import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter; /** Samples for Caches PausePrimingJob. */ public final class CachesPausePrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/PausePrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/PausePrimingJob.json */ /** * Sample code: PausePrimingJob. @@ -443,7 +444,7 @@ import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter; /** Samples for Caches ResumePrimingJob. */ public final class CachesResumePrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/ResumePrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/ResumePrimingJob.json */ /** * Sample code: ResumePrimingJob. @@ -469,7 +470,7 @@ import java.util.Arrays; /** Samples for Caches SpaceAllocation. */ public final class CachesSpaceAllocationSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/SpaceAllocation_Post.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/SpaceAllocation_Post.json */ /** * Sample code: SpaceAllocation_Post. @@ -500,7 +501,7 @@ import com.azure.core.util.Context; /** Samples for Caches Start. */ public final class CachesStartSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Start.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Start.json */ /** * Sample code: Caches_Start. @@ -522,7 +523,7 @@ import com.azure.resourcemanager.storagecache.models.PrimingJob; /** Samples for Caches StartPrimingJob. */ public final class CachesStartPrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StartPrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StartPrimingJob.json */ /** * Sample code: StartPrimingJob. @@ -552,7 +553,7 @@ import com.azure.core.util.Context; /** Samples for Caches Stop. */ public final class CachesStopSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Stop.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Stop.json */ /** * Sample code: Caches_Stop. @@ -574,7 +575,7 @@ import com.azure.resourcemanager.storagecache.models.PrimingJobIdParameter; /** Samples for Caches StopPrimingJob. */ public final class CachesStopPrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StopPrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StopPrimingJob.json */ /** * Sample code: StopPrimingJob. @@ -615,7 +616,7 @@ import java.util.Map; /** Samples for Caches Update. */ public final class CachesUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Update_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Update_ldap_only.json */ /** * Sample code: Caches_Update_ldap_only. @@ -691,12 +692,12 @@ public final class CachesUpdateSamples { .withCredentials( new CacheUsernameDownloadSettingsCredentials() .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local") - .withBindPassword("")))) + .withBindPassword("fakeTokenPlaceholder")))) .apply(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Update.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Update.json */ /** * Sample code: Caches_Update. @@ -798,7 +799,7 @@ import com.azure.core.util.Context; /** Samples for Caches UpgradeFirmware. */ public final class CachesUpgradeFirmwareSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_UpgradeFirmware.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_UpgradeFirmware.json */ /** * Sample code: Caches_UpgradeFirmware. @@ -819,7 +820,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Operations_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -840,7 +841,7 @@ import com.azure.core.util.Context; /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Skus_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Skus_List.json */ /** * Sample code: Skus_List. @@ -861,7 +862,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargetOperation Flush. */ public final class StorageTargetOperationFlushSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Flush.json */ /** * Sample code: StorageTargets_Flush. @@ -882,7 +883,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargetOperation Invalidate. */ public final class StorageTargetOperationInvalidateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Invalidate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Invalidate.json */ /** * Sample code: StorageTargets_Invalidate. @@ -903,7 +904,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargetOperation Resume. */ public final class StorageTargetOperationResumeSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Resume.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Resume.json */ /** * Sample code: StorageTargets_Resume. @@ -924,7 +925,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargetOperation Suspend. */ public final class StorageTargetOperationSuspendSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Suspend.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Suspend.json */ /** * Sample code: StorageTargets_Suspend. @@ -949,7 +950,7 @@ import java.util.Arrays; /** Samples for StorageTargets CreateOrUpdate. */ public final class StorageTargetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate.json */ /** * Sample code: StorageTargets_CreateOrUpdate. @@ -976,12 +977,12 @@ public final class StorageTargetsCreateOrUpdateSamples { .withNfsExport("exp2") .withNfsAccessPolicy("rootSquash"))) .withTargetType(StorageTargetType.NFS3) - .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_HEAVY_INFREQ")) + .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_ONLY").withVerificationTimer(30)) .create(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json */ /** * Sample code: StorageTargets_CreateOrUpdate_BlobNfs. @@ -1000,12 +1001,14 @@ public final class StorageTargetsCreateOrUpdateSamples { new BlobNfsTarget() .withTarget( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/blofnfs/blobServices/default/containers/blobnfs") - .withUsageModel("WRITE_WORKLOAD_15")) + .withUsageModel("READ_WRITE") + .withVerificationTimer(28800) + .withWriteBackTimer(3600)) .create(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json */ /** * Sample code: StorageTargets_CreateOrUpdate_NoJunctions. @@ -1019,7 +1022,7 @@ public final class StorageTargetsCreateOrUpdateSamples { .define("st1") .withExistingCache("scgroup", "sc1") .withTargetType(StorageTargetType.NFS3) - .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_HEAVY_INFREQ")) + .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_ONLY").withVerificationTimer(30)) .create(); } } @@ -1033,7 +1036,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargets Delete. */ public final class StorageTargetsDeleteSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Delete.json */ /** * Sample code: StorageTargets_Delete. @@ -1054,7 +1057,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargets DnsRefresh. */ public final class StorageTargetsDnsRefreshSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_DnsRefresh.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_DnsRefresh.json */ /** * Sample code: Caches_DnsRefresh. @@ -1075,7 +1078,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargets Get. */ public final class StorageTargetsGetSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Get.json */ /** * Sample code: StorageTargets_Get. @@ -1096,7 +1099,7 @@ import com.azure.core.util.Context; /** Samples for StorageTargets ListByCache. */ public final class StorageTargetsListByCacheSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_ListByCache.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_ListByCache.json */ /** * Sample code: StorageTargets_List. @@ -1109,6 +1112,28 @@ public final class StorageTargetsListByCacheSamples { } ``` +### StorageTargets_RestoreDefaults + +```java +import com.azure.core.util.Context; + +/** Samples for StorageTargets RestoreDefaults. */ +public final class StorageTargetsRestoreDefaultsSamples { + /* + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_RestoreDefaults.json + */ + /** + * Sample code: StorageTargets_RestoreDefaults. + * + * @param manager Entry point to StorageCacheManager. + */ + public static void storageTargetsRestoreDefaults( + com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + manager.storageTargets().restoreDefaults("scgroup", "sc", "st1", Context.NONE); + } +} +``` + ### UsageModels_List ```java @@ -1117,7 +1142,7 @@ import com.azure.core.util.Context; /** Samples for UsageModels List. */ public final class UsageModelsListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/UsageModels_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/UsageModels_List.json */ /** * Sample code: UsageModels_List. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml index b2d96112eab3..45073dca8b89 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-2022-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-2023-01. 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 ae7455b1f83c..98ed5b5b394a 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/StorageCacheManager.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/StorageCacheManager.java @@ -235,7 +235,7 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.storagecache") .append("/") - .append("1.0.0-beta.6"); + .append("1.0.0-beta.1"); 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/AscOperationsClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/AscOperationsClient.java index 7cc4ad1c1a6d..5c5dbc49bbba 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/AscOperationsClient.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/AscOperationsClient.java @@ -17,25 +17,25 @@ public interface AscOperationsClient { * * @param location The name of the region used to look up the operation. * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of an asynchronous operation for the Azure HPC Cache. + * @return the status of an asynchronous operation for the Azure HPC Cache along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - AscOperationInner get(String location, String operationId); + Response getWithResponse(String location, String operationId, Context context); /** * Gets the status of an asynchronous operation for the Azure HPC Cache. * * @param location The name of the region used to look up the operation. * @param operationId The operation id which uniquely identifies the asynchronous operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of an asynchronous operation for the Azure HPC Cache along with {@link Response}. + * @return the status of an asynchronous operation for the Azure HPC Cache. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String operationId, Context context); + AscOperationInner get(String location, String operationId); } 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 8a5056f54bbd..742df7668a07 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 @@ -128,13 +128,14 @@ public interface CachesClient { * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance. + * @return a Cache instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CacheInner getByResourceGroup(String resourceGroupName, String cacheName); + Response getByResourceGroupWithResponse(String resourceGroupName, String cacheName, Context context); /** * Returns a Cache. @@ -142,14 +143,13 @@ public interface CachesClient { * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance along with {@link Response}. + * @return a Cache instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String cacheName, Context context); + CacheInner getByResourceGroup(String resourceGroupName, String cacheName); /** * Create or update a Cache. @@ -157,16 +157,13 @@ public interface CachesClient { * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param cache Object containing the user-selectable properties of the new Cache. If read-only properties are - * included, they must match the existing values of those properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of a Cache instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CacheInner> beginCreateOrUpdate( - String resourceGroupName, String cacheName, CacheInner cache); + SyncPoller, CacheInner> beginCreateOrUpdate(String resourceGroupName, String cacheName); /** * Create or update a Cache. @@ -192,15 +189,13 @@ SyncPoller, CacheInner> beginCreateOrUpdate( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param cache Object containing the user-selectable properties of the new Cache. If read-only properties are - * included, they must match the existing values of those properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Cache instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - CacheInner createOrUpdate(String resourceGroupName, String cacheName, CacheInner cache); + CacheInner createOrUpdate(String resourceGroupName, String cacheName); /** * Create or update a Cache. @@ -208,30 +203,48 @@ SyncPoller, CacheInner> beginCreateOrUpdate( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. + * @param cache Object containing the user-selectable properties of the new Cache. If read-only properties are + * included, they must match the existing values of those properties. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Cache instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - CacheInner createOrUpdate(String resourceGroupName, String cacheName); + CacheInner createOrUpdate(String resourceGroupName, String cacheName, CacheInner cache, Context context); /** - * Create or update a Cache. + * Update a Cache instance. * * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param cache Object containing the user-selectable properties of the new Cache. If read-only properties are - * included, they must match the existing values of those properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Cache instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginUpdate(String resourceGroupName, String cacheName); + + /** + * Update a Cache instance. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param cache Object containing the user-selectable properties of the Cache. If read-only properties are included, + * they must match the existing values of those properties. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance. + * @return the {@link SyncPoller} for polling of a Cache instance. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CacheInner createOrUpdate(String resourceGroupName, String cacheName, CacheInner cache, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginUpdate( + String resourceGroupName, String cacheName, CacheInner cache, Context context); /** * Update a Cache instance. @@ -259,11 +272,10 @@ SyncPoller, CacheInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance along with {@link Response}. + * @return a Cache instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String cacheName, CacheInner cache, Context context); + CacheInner update(String resourceGroupName, String cacheName, CacheInner cache, Context context); /** * Tells a Cache to write generate debug info for support to process. @@ -499,15 +511,13 @@ Response updateWithResponse( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingjob Object containing the definition of a priming job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStartPrimingJob( - String resourceGroupName, String cacheName, PrimingJob primingjob); + SyncPoller, Void> beginStartPrimingJob(String resourceGroupName, String cacheName); /** * Create a priming job. This operation is only allowed when the cache is healthy. @@ -526,20 +536,6 @@ SyncPoller, Void> beginStartPrimingJob( SyncPoller, Void> beginStartPrimingJob( String resourceGroupName, String cacheName, PrimingJob primingjob, Context context); - /** - * Create a priming job. This operation is only allowed when the cache is healthy. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingjob Object containing the definition of a priming job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob); - /** * Create a priming job. This operation is only allowed when the cache is healthy. * @@ -574,15 +570,13 @@ SyncPoller, Void> beginStartPrimingJob( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStopPrimingJob( - String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); + SyncPoller, Void> beginStopPrimingJob(String resourceGroupName, String cacheName); /** * Schedule a priming job for deletion. @@ -601,20 +595,6 @@ SyncPoller, Void> beginStopPrimingJob( SyncPoller, Void> beginStopPrimingJob( String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context); - /** - * Schedule a priming job for deletion. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stopPrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); - /** * Schedule a priming job for deletion. * @@ -650,15 +630,13 @@ void stopPrimingJob( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginPausePrimingJob( - String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); + SyncPoller, Void> beginPausePrimingJob(String resourceGroupName, String cacheName); /** * Schedule a priming job to be paused. @@ -677,20 +655,6 @@ SyncPoller, Void> beginPausePrimingJob( SyncPoller, Void> beginPausePrimingJob( String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context); - /** - * Schedule a priming job to be paused. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void pausePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); - /** * Schedule a priming job to be paused. * @@ -726,15 +690,13 @@ void pausePrimingJob( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResumePrimingJob( - String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); + SyncPoller, Void> beginResumePrimingJob(String resourceGroupName, String cacheName); /** * Resumes a paused priming job. @@ -753,20 +715,6 @@ SyncPoller, Void> beginResumePrimingJob( SyncPoller, Void> beginResumePrimingJob( String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context); - /** - * Resumes a paused priming job. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resumePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); - /** * Resumes a paused priming job. * @@ -859,15 +807,13 @@ SyncPoller, Void> beginUpgradeFirmware( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param spaceAllocation List containing storage target cache space percentage allocations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginSpaceAllocation( - String resourceGroupName, String cacheName, List spaceAllocation); + SyncPoller, Void> beginSpaceAllocation(String resourceGroupName, String cacheName); /** * Update cache space allocation. @@ -889,21 +835,6 @@ SyncPoller, Void> beginSpaceAllocation( List spaceAllocation, Context context); - /** - * Update cache space allocation. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param spaceAllocation List containing storage target cache space percentage allocations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void spaceAllocation( - String resourceGroupName, String cacheName, List spaceAllocation); - /** * Update cache space allocation. * 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 8f8befb76ca1..28cb79c00b7f 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 @@ -116,8 +116,6 @@ SyncPoller, Void> beginDnsRefresh( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param force Boolean value requesting the force delete operation for a storage target. Force delete discards - * unwritten-data in the cache instead of flushing it to back-end storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -125,7 +123,7 @@ SyncPoller, Void> beginDnsRefresh( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( - String resourceGroupName, String cacheName, String storageTargetName, String force); + String resourceGroupName, String cacheName, String storageTargetName); /** * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or @@ -149,25 +147,6 @@ SyncPoller, Void> beginDelete( SyncPoller, Void> beginDelete( String resourceGroupName, String cacheName, String storageTargetName, String force, Context context); - /** - * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or - * unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if - * the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be - * deleted. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of Storage Target. - * @param force Boolean value requesting the force delete operation for a storage target. Force delete discards - * unwritten-data in the cache instead of flushing it to back-end storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String cacheName, String storageTargetName, String force); - /** * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or * unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if @@ -212,13 +191,15 @@ SyncPoller, Void> beginDelete( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return type of the Storage Target. + * @return type of the Storage Target along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageTargetInner get(String resourceGroupName, String cacheName, String storageTargetName); + Response getWithResponse( + String resourceGroupName, String cacheName, String storageTargetName, Context context); /** * Returns a Storage Target from a Cache. @@ -227,15 +208,13 @@ SyncPoller, Void> beginDelete( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return type of the Storage Target along with {@link Response}. + * @return type of the Storage Target. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String cacheName, String storageTargetName, Context context); + StorageTargetInner get(String resourceGroupName, String cacheName, String storageTargetName); /** * Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, @@ -245,7 +224,6 @@ Response getWithResponse( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param storagetarget Object containing the definition of a Storage Target. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -253,7 +231,7 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageTargetInner> beginCreateOrUpdate( - String resourceGroupName, String cacheName, String storageTargetName, StorageTargetInner storagetarget); + String resourceGroupName, String cacheName, String storageTargetName); /** * Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, @@ -286,15 +264,13 @@ SyncPoller, StorageTargetInner> beginCreateOrUpda * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param storagetarget Object containing the definition of a Storage Target. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return type of the Storage Target. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageTargetInner createOrUpdate( - String resourceGroupName, String cacheName, String storageTargetName, StorageTargetInner storagetarget); + StorageTargetInner createOrUpdate(String resourceGroupName, String cacheName, String storageTargetName); /** * Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, @@ -304,34 +280,80 @@ StorageTargetInner createOrUpdate( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. + * @param storagetarget Object containing the definition of a Storage Target. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return type of the Storage Target. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageTargetInner createOrUpdate(String resourceGroupName, String cacheName, String storageTargetName); + StorageTargetInner createOrUpdate( + String resourceGroupName, + String cacheName, + String storageTargetName, + StorageTargetInner storagetarget, + Context context); /** - * Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, - * the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again. + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreDefaults( + String resourceGroupName, String cacheName, String storageTargetName); + + /** + * Tells a storage target to restore its settings to their default values. * * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param storagetarget Object containing the definition of a Storage Target. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return type of the Storage Target. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreDefaults( + String resourceGroupName, String cacheName, String storageTargetName, Context context); + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageTargetInner createOrUpdate( - String resourceGroupName, - String cacheName, - String storageTargetName, - StorageTargetInner storagetarget, - Context context); + void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName); + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName, Context context); } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationInner.java index 981ce58e68fc..f61212ab28da 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationInner.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationInner.java @@ -45,6 +45,10 @@ public final class ApiOperationInner { @JsonProperty(value = "properties") private ApiOperationProperties innerProperties; + /** Creates an instance of ApiOperationInner class. */ + public ApiOperationInner() { + } + /** * Get the display property: The object that represents the operation. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationProperties.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationProperties.java index 741c85bff4d9..217bc48d227e 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationProperties.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ApiOperationProperties.java @@ -17,6 +17,10 @@ public final class ApiOperationProperties { @JsonProperty(value = "serviceSpecification") private ApiOperationPropertiesServiceSpecification serviceSpecification; + /** Creates an instance of ApiOperationProperties class. */ + public ApiOperationProperties() { + } + /** * Get the serviceSpecification property: Specification of the all the metrics provided for a resource type. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationInner.java index 7d7f4f829501..c4cc03236fa1 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationInner.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationInner.java @@ -54,6 +54,10 @@ public final class AscOperationInner { @JsonProperty(value = "properties") private AscOperationProperties innerProperties; + /** Creates an instance of AscOperationInner class. */ + public AscOperationInner() { + } + /** * Get the id property: The operation Id. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationProperties.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationProperties.java index 7ea2de0a7be0..1c522cc2de44 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationProperties.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/AscOperationProperties.java @@ -19,6 +19,10 @@ public final class AscOperationProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map output; + /** Creates an instance of AscOperationProperties class. */ + public AscOperationProperties() { + } + /** * Get the output property: Additional operation-specific output. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java index 8ec27d6e206c..320edd066c06 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheInner.java @@ -53,6 +53,10 @@ public final class CacheInner extends Resource { @JsonProperty(value = "sku") private CacheSku sku; + /** Creates an instance of CacheInner class. */ + public CacheInner() { + } + /** * Get the identity property: The identity of the cache, if configured. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java index 2f76fa8e435a..8f6c381e5a07 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java @@ -89,8 +89,7 @@ public final class CacheProperties { private CacheDirectorySettings directoryServicesSettings; /* - * Availability zones for resources. This field should only contain a - * single element in the array. + * Availability zones for resources. This field should only contain a single element in the array. */ @JsonProperty(value = "zones") private List zones; @@ -102,12 +101,15 @@ public final class CacheProperties { private List primingJobs; /* - * Specifies the space allocation percentage for each storage target in the - * cache. + * Specifies the space allocation percentage for each storage target in the cache. */ @JsonProperty(value = "spaceAllocation", access = JsonProperty.Access.WRITE_ONLY) private List spaceAllocation; + /** Creates an instance of CacheProperties class. */ + public CacheProperties() { + } + /** * Get the cacheSizeGB property: The size of this Cache, in GB. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceSkuInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceSkuInner.java index 455f3b6b9e7a..fa855b7ce6bf 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceSkuInner.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceSkuInner.java @@ -27,9 +27,8 @@ public final class ResourceSkuInner { private List capabilities; /* - * The set of locations where the SKU is available. This is the supported - * and registered Azure Geo Regions (e.g., West US, East US, Southeast - * Asia, etc.). + * The set of locations where the SKU is available. This is the supported and registered Azure Geo Regions (e.g., + * West US, East US, Southeast Asia, etc.). */ @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY) private List locations; @@ -47,12 +46,15 @@ public final class ResourceSkuInner { private String name; /* - * The restrictions preventing this SKU from being used. This is empty if - * there are no restrictions. + * The restrictions preventing this SKU from being used. This is empty if there are no restrictions. */ @JsonProperty(value = "restrictions") private List restrictions; + /** Creates an instance of ResourceSkuInner class. */ + public ResourceSkuInner() { + } + /** * Get the resourceType property: The type of resource the SKU applies to. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceUsageInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceUsageInner.java index 575995032b26..398bc14d63b9 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceUsageInner.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceUsageInner.java @@ -35,6 +35,10 @@ public final class ResourceUsageInner { @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private ResourceUsageName name; + /** Creates an instance of ResourceUsageInner class. */ + public ResourceUsageInner() { + } + /** * Get the limit property: The limit (quota) for this resource. * 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 6ff75911a949..d0fe6c191f7f 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 @@ -26,6 +26,10 @@ public final class StorageTargetInner extends StorageTargetResource { @JsonProperty(value = "properties") private StorageTargetProperties innerProperties; + /** Creates an instance of StorageTargetInner class. */ + public StorageTargetInner() { + } + /** * Get the innerProperties property: StorageTarget properties. * 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 f40f23bd69b4..2d64a86e7e12 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 @@ -75,6 +75,10 @@ public final class StorageTargetProperties { @JsonProperty(value = "allocationPercentage", access = JsonProperty.Access.WRITE_ONLY) private Integer allocationPercentage; + /** Creates an instance of StorageTargetProperties class. */ + public StorageTargetProperties() { + } + /** * Get the junctions property: List of Cache namespace junctions to target for namespace associations. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/UsageModelInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/UsageModelInner.java index ec8e58489c28..27fc24744b8c 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/UsageModelInner.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/UsageModelInner.java @@ -24,12 +24,15 @@ public final class UsageModelInner { private String modelName; /* - * The type of Storage Target to which this model is applicable (only nfs3 - * as of this version). + * The type of Storage Target to which this model is applicable (only nfs3 as of this version). */ @JsonProperty(value = "targetType") private String targetType; + /** Creates an instance of UsageModelInner class. */ + public UsageModelInner() { + } + /** * Get the display property: Localized information describing this usage model. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java index b00c2eb9ff34..8ca0207216fa 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsClientImpl.java @@ -50,7 +50,7 @@ public final class AscOperationsClientImpl implements AscOperationsClient { */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface AscOperationsService { + public interface AscOperationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations" @@ -180,14 +180,15 @@ private Mono getAsync(String location, String operationId) { * * @param location The name of the region used to look up the operation. * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of an asynchronous operation for the Azure HPC Cache. + * @return the status of an asynchronous operation for the Azure HPC Cache along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AscOperationInner get(String location, String operationId) { - return getAsync(location, operationId).block(); + public Response getWithResponse(String location, String operationId, Context context) { + return getWithResponseAsync(location, operationId, context).block(); } /** @@ -195,14 +196,13 @@ public AscOperationInner get(String location, String operationId) { * * @param location The name of the region used to look up the operation. * @param operationId The operation id which uniquely identifies the asynchronous operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of an asynchronous operation for the Azure HPC Cache along with {@link Response}. + * @return the status of an asynchronous operation for the Azure HPC Cache. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String operationId, Context context) { - return getWithResponseAsync(location, operationId, context).block(); + public AscOperationInner get(String location, String operationId) { + return getWithResponse(location, operationId, Context.NONE).getValue(); } } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsImpl.java index 2f45dc8c0e73..d2ef4c1bcf8a 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscOperationsImpl.java @@ -26,15 +26,6 @@ public AscOperationsImpl( this.serviceManager = serviceManager; } - public AscOperation get(String location, String operationId) { - AscOperationInner inner = this.serviceClient().get(location, operationId); - if (inner != null) { - return new AscOperationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String location, String operationId, Context context) { Response inner = this.serviceClient().getWithResponse(location, operationId, context); if (inner != null) { @@ -48,6 +39,15 @@ public Response getWithResponse(String location, String operationI } } + public AscOperation get(String location, String operationId) { + AscOperationInner inner = this.serviceClient().get(location, operationId); + if (inner != null) { + return new AscOperationImpl(inner, this.manager()); + } else { + return null; + } + } + private AscOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesClientImpl.java index 09d74d525de9..4f90c2b0041e 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesClientImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesClientImpl.java @@ -55,7 +55,7 @@ public final class AscUsagesClientImpl implements AscUsagesClient { */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface AscUsagesService { + public interface AscUsagesService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/usages") @ExpectedResponses({200}) @@ -241,7 +241,8 @@ public PagedIterable list(String location, Context context) /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -277,7 +278,8 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java index 223fb1eba2a1..e277e16b6683 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CacheImpl.java @@ -206,18 +206,13 @@ public Cache apply() { serviceManager .serviceClient() .getCaches() - .updateWithResponse(resourceGroupName, cacheName, this.innerModel(), Context.NONE) - .getValue(); + .update(resourceGroupName, cacheName, this.innerModel(), Context.NONE); return this; } public Cache apply(Context context) { this.innerObject = - serviceManager - .serviceClient() - .getCaches() - .updateWithResponse(resourceGroupName, cacheName, this.innerModel(), context) - .getValue(); + serviceManager.serviceClient().getCaches().update(resourceGroupName, cacheName, this.innerModel(), context); return this; } @@ -280,10 +275,6 @@ public void stop(Context context) { serviceManager.caches().stop(resourceGroupName, cacheName, context); } - public void startPrimingJob(PrimingJob primingjob) { - serviceManager.caches().startPrimingJob(resourceGroupName, cacheName, primingjob); - } - public void startPrimingJob() { serviceManager.caches().startPrimingJob(resourceGroupName, cacheName); } @@ -292,10 +283,6 @@ public void startPrimingJob(PrimingJob primingjob, Context context) { serviceManager.caches().startPrimingJob(resourceGroupName, cacheName, primingjob, context); } - public void stopPrimingJob(PrimingJobIdParameter primingJobId) { - serviceManager.caches().stopPrimingJob(resourceGroupName, cacheName, primingJobId); - } - public void stopPrimingJob() { serviceManager.caches().stopPrimingJob(resourceGroupName, cacheName); } @@ -304,10 +291,6 @@ public void stopPrimingJob(PrimingJobIdParameter primingJobId, Context context) serviceManager.caches().stopPrimingJob(resourceGroupName, cacheName, primingJobId, context); } - public void pausePrimingJob(PrimingJobIdParameter primingJobId) { - serviceManager.caches().pausePrimingJob(resourceGroupName, cacheName, primingJobId); - } - public void pausePrimingJob() { serviceManager.caches().pausePrimingJob(resourceGroupName, cacheName); } @@ -316,10 +299,6 @@ public void pausePrimingJob(PrimingJobIdParameter primingJobId, Context context) serviceManager.caches().pausePrimingJob(resourceGroupName, cacheName, primingJobId, context); } - public void resumePrimingJob(PrimingJobIdParameter primingJobId) { - serviceManager.caches().resumePrimingJob(resourceGroupName, cacheName, primingJobId); - } - public void resumePrimingJob() { serviceManager.caches().resumePrimingJob(resourceGroupName, cacheName); } 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 2c561d4f6352..b642204d62d4 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 @@ -68,7 +68,7 @@ public final class CachesClientImpl implements CachesClient { */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface CachesService { + public interface CachesService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/caches") @ExpectedResponses({200}) @@ -144,9 +144,9 @@ Mono>> createOrUpdate( @Patch( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches" + "/{cacheName}") - @ExpectedResponses({200}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( + Mono>> update( @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @@ -993,14 +993,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Strin * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance. + * @return a Cache instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CacheInner getByResourceGroup(String resourceGroupName, String cacheName) { - return getByResourceGroupAsync(resourceGroupName, cacheName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String cacheName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cacheName, context).block(); } /** @@ -1009,16 +1011,14 @@ public CacheInner getByResourceGroup(String resourceGroupName, String cacheName) * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance along with {@link Response}. + * @return a Cache instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String cacheName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, cacheName, context).block(); + public CacheInner getByResourceGroup(String resourceGroupName, String cacheName) { + return getByResourceGroupWithResponse(resourceGroupName, cacheName, Context.NONE).getValue(); } /** @@ -1152,6 +1152,28 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync( mono, this.client.getHttpPipeline(), CacheInner.class, CacheInner.class, this.client.getContext()); } + /** + * Create or update a Cache. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a Cache instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheInner> beginCreateOrUpdateAsync( + String resourceGroupName, String cacheName) { + final CacheInner cache = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, cacheName, cache); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CacheInner.class, CacheInner.class, this.client.getContext()); + } + /** * Create or update a Cache. * @@ -1184,8 +1206,6 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param cache Object containing the user-selectable properties of the new Cache. If read-only properties are - * included, they must match the existing values of those properties. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1193,7 +1213,8 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CacheInner> beginCreateOrUpdate( - String resourceGroupName, String cacheName, CacheInner cache) { + String resourceGroupName, String cacheName) { + final CacheInner cache = null; return beginCreateOrUpdateAsync(resourceGroupName, cacheName, cache).getSyncPoller(); } @@ -1278,24 +1299,6 @@ private Mono createOrUpdateAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update a Cache. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param cache Object containing the user-selectable properties of the new Cache. If read-only properties are - * included, they must match the existing values of those properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CacheInner createOrUpdate(String resourceGroupName, String cacheName, CacheInner cache) { - return createOrUpdateAsync(resourceGroupName, cacheName, cache).block(); - } - /** * Create or update a Cache. * @@ -1346,7 +1349,7 @@ public CacheInner createOrUpdate(String resourceGroupName, String cacheName, Cac * @return a Cache instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String cacheName, CacheInner cache) { if (this.client.getEndpoint() == null) { return Mono @@ -1402,7 +1405,7 @@ private Mono> updateWithResponseAsync( * @return a Cache instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono>> updateWithResponseAsync( String resourceGroupName, String cacheName, CacheInner cache, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1440,6 +1443,113 @@ private Mono> updateWithResponseAsync( context); } + /** + * Update a Cache instance. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param cache Object containing the user-selectable properties of the Cache. If read-only properties are included, + * they must match the existing values of those properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a Cache instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheInner> beginUpdateAsync( + String resourceGroupName, String cacheName, CacheInner cache) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, cacheName, cache); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CacheInner.class, CacheInner.class, this.client.getContext()); + } + + /** + * Update a Cache instance. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a Cache instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheInner> beginUpdateAsync( + String resourceGroupName, String cacheName) { + final CacheInner cache = null; + Mono>> mono = updateWithResponseAsync(resourceGroupName, cacheName, cache); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CacheInner.class, CacheInner.class, this.client.getContext()); + } + + /** + * Update a Cache instance. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param cache Object containing the user-selectable properties of the Cache. If read-only properties are included, + * they must match the existing values of those properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a Cache instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheInner> beginUpdateAsync( + String resourceGroupName, String cacheName, CacheInner cache, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, cacheName, cache, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), CacheInner.class, CacheInner.class, context); + } + + /** + * Update a Cache instance. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Cache instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginUpdate(String resourceGroupName, String cacheName) { + final CacheInner cache = null; + return beginUpdateAsync(resourceGroupName, cacheName, cache).getSyncPoller(); + } + + /** + * Update a Cache instance. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param cache Object containing the user-selectable properties of the Cache. If read-only properties are included, + * they must match the existing values of those properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a Cache instance. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginUpdate( + String resourceGroupName, String cacheName, CacheInner cache, Context context) { + return beginUpdateAsync(resourceGroupName, cacheName, cache, context).getSyncPoller(); + } + /** * Update a Cache instance. * @@ -1455,8 +1565,9 @@ private Mono> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String cacheName, CacheInner cache) { - return updateWithResponseAsync(resourceGroupName, cacheName, cache) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, cacheName, cache) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1473,8 +1584,31 @@ private Mono updateAsync(String resourceGroupName, String cacheName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String cacheName) { final CacheInner cache = null; - return updateWithResponseAsync(resourceGroupName, cacheName, cache) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return beginUpdateAsync(resourceGroupName, cacheName, cache) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a Cache instance. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param cache Object containing the user-selectable properties of the Cache. If read-only properties are included, + * they must match the existing values of those properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Cache instance on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String cacheName, CacheInner cache, Context context) { + return beginUpdateAsync(resourceGroupName, cacheName, cache, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1506,12 +1640,11 @@ public CacheInner update(String resourceGroupName, String cacheName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance along with {@link Response}. + * @return a Cache instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String cacheName, CacheInner cache, Context context) { - return updateWithResponseAsync(resourceGroupName, cacheName, cache, context).block(); + public CacheInner update(String resourceGroupName, String cacheName, CacheInner cache, Context context) { + return updateAsync(resourceGroupName, cacheName, cache, context).block(); } /** @@ -2598,6 +2731,28 @@ private PollerFlux, Void> beginStartPrimingJobAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Create a priming job. This operation is only allowed when the cache is healthy. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStartPrimingJobAsync(String resourceGroupName, String cacheName) { + final PrimingJob primingjob = null; + Mono>> mono = + startPrimingJobWithResponseAsync(resourceGroupName, cacheName, primingjob); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Create a priming job. This operation is only allowed when the cache is healthy. * @@ -2628,15 +2783,14 @@ private PollerFlux, Void> beginStartPrimingJobAsync( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingjob Object containing the definition of a priming job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStartPrimingJob( - String resourceGroupName, String cacheName, PrimingJob primingjob) { + public SyncPoller, Void> beginStartPrimingJob(String resourceGroupName, String cacheName) { + final PrimingJob primingjob = null; return beginStartPrimingJobAsync(resourceGroupName, cacheName, primingjob).getSyncPoller(); } @@ -2718,22 +2872,6 @@ private Mono startPrimingJobAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a priming job. This operation is only allowed when the cache is healthy. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingjob Object containing the definition of a priming job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob) { - startPrimingJobAsync(resourceGroupName, cacheName, primingjob).block(); - } - /** * Create a priming job. This operation is only allowed when the cache is healthy. * @@ -2896,6 +3034,28 @@ private PollerFlux, Void> beginStopPrimingJobAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Schedule a priming job for deletion. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopPrimingJobAsync(String resourceGroupName, String cacheName) { + final PrimingJobIdParameter primingJobId = null; + Mono>> mono = + stopPrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Schedule a priming job for deletion. * @@ -2926,15 +3086,14 @@ private PollerFlux, Void> beginStopPrimingJobAsync( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStopPrimingJob( - String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { + public SyncPoller, Void> beginStopPrimingJob(String resourceGroupName, String cacheName) { + final PrimingJobIdParameter primingJobId = null; return beginStopPrimingJobAsync(resourceGroupName, cacheName, primingJobId).getSyncPoller(); } @@ -3017,22 +3176,6 @@ private Mono stopPrimingJobAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Schedule a priming job for deletion. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stopPrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { - stopPrimingJobAsync(resourceGroupName, cacheName, primingJobId).block(); - } - /** * Schedule a priming job for deletion. * @@ -3196,6 +3339,28 @@ private PollerFlux, Void> beginPausePrimingJobAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Schedule a priming job to be paused. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginPausePrimingJobAsync(String resourceGroupName, String cacheName) { + final PrimingJobIdParameter primingJobId = null; + Mono>> mono = + pausePrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Schedule a priming job to be paused. * @@ -3226,15 +3391,14 @@ private PollerFlux, Void> beginPausePrimingJobAsync( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginPausePrimingJob( - String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { + public SyncPoller, Void> beginPausePrimingJob(String resourceGroupName, String cacheName) { + final PrimingJobIdParameter primingJobId = null; return beginPausePrimingJobAsync(resourceGroupName, cacheName, primingJobId).getSyncPoller(); } @@ -3317,22 +3481,6 @@ private Mono pausePrimingJobAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Schedule a priming job to be paused. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void pausePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { - pausePrimingJobAsync(resourceGroupName, cacheName, primingJobId).block(); - } - /** * Schedule a priming job to be paused. * @@ -3496,6 +3644,28 @@ private PollerFlux, Void> beginResumePrimingJobAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Resumes a paused priming job. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResumePrimingJobAsync(String resourceGroupName, String cacheName) { + final PrimingJobIdParameter primingJobId = null; + Mono>> mono = + resumePrimingJobWithResponseAsync(resourceGroupName, cacheName, primingJobId); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Resumes a paused priming job. * @@ -3526,15 +3696,14 @@ private PollerFlux, Void> beginResumePrimingJobAsync( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResumePrimingJob( - String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { + public SyncPoller, Void> beginResumePrimingJob(String resourceGroupName, String cacheName) { + final PrimingJobIdParameter primingJobId = null; return beginResumePrimingJobAsync(resourceGroupName, cacheName, primingJobId).getSyncPoller(); } @@ -3617,22 +3786,6 @@ private Mono resumePrimingJobAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Resumes a paused priming job. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resumePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { - resumePrimingJobAsync(resourceGroupName, cacheName, primingJobId).block(); - } - /** * Resumes a paused priming job. * @@ -4039,6 +4192,28 @@ private PollerFlux, Void> beginSpaceAllocationAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Update cache space allocation. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSpaceAllocationAsync(String resourceGroupName, String cacheName) { + final List spaceAllocation = null; + Mono>> mono = + spaceAllocationWithResponseAsync(resourceGroupName, cacheName, spaceAllocation); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Update cache space allocation. * @@ -4072,15 +4247,14 @@ private PollerFlux, Void> beginSpaceAllocationAsync( * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param spaceAllocation List containing storage target cache space percentage allocations. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginSpaceAllocation( - String resourceGroupName, String cacheName, List spaceAllocation) { + public SyncPoller, Void> beginSpaceAllocation(String resourceGroupName, String cacheName) { + final List spaceAllocation = null; return beginSpaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation).getSyncPoller(); } @@ -4169,23 +4343,6 @@ private Mono spaceAllocationAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update cache space allocation. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param spaceAllocation List containing storage target cache space percentage allocations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void spaceAllocation( - String resourceGroupName, String cacheName, List spaceAllocation) { - spaceAllocationAsync(resourceGroupName, cacheName, spaceAllocation).block(); - } - /** * Update cache space allocation. * @@ -4226,7 +4383,8 @@ public void spaceAllocation( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4262,7 +4420,8 @@ private Mono> listNextSinglePageAsync(String nextLink) /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -4299,7 +4458,8 @@ private Mono> listNextSinglePageAsync(String nextLink, /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -4336,7 +4496,8 @@ private Mono> listByResourceGroupNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java index f51b02e289ad..0975bd0f9980 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java @@ -59,15 +59,6 @@ public void delete(String resourceGroupName, String cacheName, Context context) this.serviceClient().delete(resourceGroupName, cacheName, context); } - public Cache getByResourceGroup(String resourceGroupName, String cacheName) { - CacheInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, cacheName); - if (inner != null) { - return new CacheImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String cacheName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, cacheName, context); @@ -82,6 +73,15 @@ public Response getByResourceGroupWithResponse(String resourceGroupName, } } + public Cache getByResourceGroup(String resourceGroupName, String cacheName) { + CacheInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, cacheName); + if (inner != null) { + return new CacheImpl(inner, this.manager()); + } else { + return null; + } + } + public void debugInfo(String resourceGroupName, String cacheName) { this.serviceClient().debugInfo(resourceGroupName, cacheName); } @@ -114,10 +114,6 @@ public void stop(String resourceGroupName, String cacheName, Context context) { this.serviceClient().stop(resourceGroupName, cacheName, context); } - public void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob) { - this.serviceClient().startPrimingJob(resourceGroupName, cacheName, primingjob); - } - public void startPrimingJob(String resourceGroupName, String cacheName) { this.serviceClient().startPrimingJob(resourceGroupName, cacheName); } @@ -126,10 +122,6 @@ public void startPrimingJob(String resourceGroupName, String cacheName, PrimingJ this.serviceClient().startPrimingJob(resourceGroupName, cacheName, primingjob, context); } - public void stopPrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { - this.serviceClient().stopPrimingJob(resourceGroupName, cacheName, primingJobId); - } - public void stopPrimingJob(String resourceGroupName, String cacheName) { this.serviceClient().stopPrimingJob(resourceGroupName, cacheName); } @@ -139,10 +131,6 @@ public void stopPrimingJob( this.serviceClient().stopPrimingJob(resourceGroupName, cacheName, primingJobId, context); } - public void pausePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { - this.serviceClient().pausePrimingJob(resourceGroupName, cacheName, primingJobId); - } - public void pausePrimingJob(String resourceGroupName, String cacheName) { this.serviceClient().pausePrimingJob(resourceGroupName, cacheName); } @@ -152,10 +140,6 @@ public void pausePrimingJob( this.serviceClient().pausePrimingJob(resourceGroupName, cacheName, primingJobId, context); } - public void resumePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId) { - this.serviceClient().resumePrimingJob(resourceGroupName, cacheName, primingJobId); - } - public void resumePrimingJob(String resourceGroupName, String cacheName) { this.serviceClient().resumePrimingJob(resourceGroupName, cacheName); } @@ -173,11 +157,6 @@ public void upgradeFirmware(String resourceGroupName, String cacheName, Context this.serviceClient().upgradeFirmware(resourceGroupName, cacheName, context); } - public void spaceAllocation( - String resourceGroupName, String cacheName, List spaceAllocation) { - this.serviceClient().spaceAllocation(resourceGroupName, cacheName, spaceAllocation); - } - public void spaceAllocation(String resourceGroupName, String cacheName) { this.serviceClient().spaceAllocation(resourceGroupName, cacheName); } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsClientImpl.java index 5b5d530eb9ff..fff928a5d054 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsClientImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.StorageCache/operations") @ExpectedResponses({200}) @@ -200,7 +200,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -236,7 +237,8 @@ private Mono> listNextSinglePageAsync(String ne /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. 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 dc8202b80e0a..7821e2cb9837 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 @@ -54,7 +54,7 @@ public final class SkusClientImpl implements SkusClient { */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface SkusService { + public interface SkusService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/skus") @ExpectedResponses({200}) @@ -226,7 +226,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -262,7 +263,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java index 7d18ba757d6e..c20fe559c2b2 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageCacheManagementClientBuilder.java @@ -18,9 +18,8 @@ @ServiceClientBuilder(serviceClients = {StorageCacheManagementClientImpl.class}) public final class StorageCacheManagementClientBuilder { /* - * Subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every - * service call. + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of + * the URI for every service call. */ private String subscriptionId; @@ -122,24 +121,26 @@ public StorageCacheManagementClientBuilder serializerAdapter(SerializerAdapter s * @return an instance of StorageCacheManagementClientImpl. */ public StorageCacheManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); StorageCacheManagementClientImpl client = new StorageCacheManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } 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 2c49066ef961..f7aef45519d6 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 @@ -238,7 +238,7 @@ public StorageTargetOperationsClient getStorageTargetOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-05-01"; + this.apiVersion = "2023-01-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/StorageTargetOperationsClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsClientImpl.java index b5ed02194f8f..5fb1c9e095ed 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 @@ -55,7 +55,7 @@ public final class StorageTargetOperationsClientImpl implements StorageTargetOpe */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface StorageTargetOperationsService { + public interface StorageTargetOperationsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches" 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 f9db0085bed5..c1a2d5f318d7 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 @@ -64,7 +64,7 @@ public final class StorageTargetsClientImpl implements StorageTargetsClient { */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface StorageTargetsService { + public interface StorageTargetsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches" @@ -146,6 +146,22 @@ Mono>> createOrUpdate( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches" + + "/{cacheName}/storageTargets/{storageTargetName}/restoreDefaults") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restoreDefaults( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("cacheName") String cacheName, + @PathParam("storageTargetName") String storageTargetName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -755,6 +771,33 @@ private PollerFlux, Void> beginDeleteAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or + * unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if + * the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be + * deleted. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String cacheName, String storageTargetName) { + final String force = null; + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, cacheName, storageTargetName, force); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or * unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if @@ -794,8 +837,6 @@ private PollerFlux, Void> beginDeleteAsync( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param force Boolean value requesting the force delete operation for a storage target. Force delete discards - * unwritten-data in the cache instead of flushing it to back-end storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -803,7 +844,8 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( - String resourceGroupName, String cacheName, String storageTargetName, String force) { + String resourceGroupName, String cacheName, String storageTargetName) { + final String force = null; return beginDeleteAsync(resourceGroupName, cacheName, storageTargetName, force).getSyncPoller(); } @@ -904,27 +946,6 @@ private Mono deleteAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or - * unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if - * the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be - * deleted. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of Storage Target. - * @param force Boolean value requesting the force delete operation for a storage target. Force delete discards - * unwritten-data in the cache instead of flushing it to back-end storage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cacheName, String storageTargetName, String force) { - deleteAsync(resourceGroupName, cacheName, storageTargetName, force).block(); - } - /** * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or * unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if @@ -1101,14 +1122,16 @@ private Mono getAsync(String resourceGroupName, String cache * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return type of the Storage Target. + * @return type of the Storage Target along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageTargetInner get(String resourceGroupName, String cacheName, String storageTargetName) { - return getAsync(resourceGroupName, cacheName, storageTargetName).block(); + public Response getWithResponse( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + return getWithResponseAsync(resourceGroupName, cacheName, storageTargetName, context).block(); } /** @@ -1118,16 +1141,14 @@ public StorageTargetInner get(String resourceGroupName, String cacheName, String * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return type of the Storage Target along with {@link Response}. + * @return type of the Storage Target. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String cacheName, String storageTargetName, Context context) { - return getWithResponseAsync(resourceGroupName, cacheName, storageTargetName, context).block(); + public StorageTargetInner get(String resourceGroupName, String cacheName, String storageTargetName) { + return getWithResponse(resourceGroupName, cacheName, storageTargetName, Context.NONE).getValue(); } /** @@ -1283,6 +1304,35 @@ private PollerFlux, StorageTargetInner> beginCrea this.client.getContext()); } + /** + * Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, + * the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of type of the Storage Target. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StorageTargetInner> beginCreateOrUpdateAsync( + String resourceGroupName, String cacheName, String storageTargetName) { + final StorageTargetInner storagetarget = null; + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, cacheName, storageTargetName, storagetarget); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + StorageTargetInner.class, + StorageTargetInner.class, + this.client.getContext()); + } + /** * Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, * the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again. @@ -1322,7 +1372,6 @@ private PollerFlux, StorageTargetInner> beginCrea * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param storagetarget Object containing the definition of a Storage Target. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1330,7 +1379,8 @@ private PollerFlux, StorageTargetInner> beginCrea */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageTargetInner> beginCreateOrUpdate( - String resourceGroupName, String cacheName, String storageTargetName, StorageTargetInner storagetarget) { + String resourceGroupName, String cacheName, String storageTargetName) { + final StorageTargetInner storagetarget = null; return beginCreateOrUpdateAsync(resourceGroupName, cacheName, storageTargetName, storagetarget).getSyncPoller(); } @@ -1439,15 +1489,14 @@ private Mono createOrUpdateAsync( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param storagetarget Object containing the definition of a Storage Target. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return type of the Storage Target. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageTargetInner createOrUpdate( - String resourceGroupName, String cacheName, String storageTargetName, StorageTargetInner storagetarget) { + public StorageTargetInner createOrUpdate(String resourceGroupName, String cacheName, String storageTargetName) { + final StorageTargetInner storagetarget = null; return createOrUpdateAsync(resourceGroupName, cacheName, storageTargetName, storagetarget).block(); } @@ -1459,46 +1508,293 @@ public StorageTargetInner createOrUpdate( * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. + * @param storagetarget Object containing the definition of a Storage Target. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return type of the Storage Target. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageTargetInner createOrUpdate(String resourceGroupName, String cacheName, String storageTargetName) { - final StorageTargetInner storagetarget = null; - return createOrUpdateAsync(resourceGroupName, cacheName, storageTargetName, storagetarget).block(); + public StorageTargetInner createOrUpdate( + String resourceGroupName, + String cacheName, + String storageTargetName, + StorageTargetInner storagetarget, + Context context) { + return createOrUpdateAsync(resourceGroupName, cacheName, storageTargetName, storagetarget, context).block(); } /** - * Create or update a Storage Target. This operation is allowed at any time, but if the Cache is down or unhealthy, - * the actual creation/modification of the Storage Target may be delayed until the Cache is healthy again. + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreDefaultsWithResponseAsync( + String resourceGroupName, String cacheName, String storageTargetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (storageTargetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storageTargetName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreDefaults( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + cacheName, + storageTargetName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Tells a storage target to restore its settings to their default values. * * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param storagetarget Object containing the definition of a Storage Target. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return type of the Storage Target. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageTargetInner createOrUpdate( - String resourceGroupName, - String cacheName, - String storageTargetName, - StorageTargetInner storagetarget, - Context context) { - return createOrUpdateAsync(resourceGroupName, cacheName, storageTargetName, storagetarget, context).block(); + private Mono>> restoreDefaultsWithResponseAsync( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + if (storageTargetName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storageTargetName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreDefaults( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + cacheName, + storageTargetName, + accept, + context); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreDefaultsAsync( + String resourceGroupName, String cacheName, String storageTargetName) { + Mono>> mono = + restoreDefaultsWithResponseAsync(resourceGroupName, cacheName, storageTargetName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreDefaultsAsync( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreDefaultsWithResponseAsync(resourceGroupName, cacheName, storageTargetName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreDefaults( + String resourceGroupName, String cacheName, String storageTargetName) { + return beginRestoreDefaultsAsync(resourceGroupName, cacheName, storageTargetName).getSyncPoller(); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreDefaults( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + return beginRestoreDefaultsAsync(resourceGroupName, cacheName, storageTargetName, context).getSyncPoller(); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreDefaultsAsync(String resourceGroupName, String cacheName, String storageTargetName) { + return beginRestoreDefaultsAsync(resourceGroupName, cacheName, storageTargetName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreDefaultsAsync( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + return beginRestoreDefaultsAsync(resourceGroupName, cacheName, storageTargetName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName) { + restoreDefaultsAsync(resourceGroupName, cacheName, storageTargetName).block(); + } + + /** + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName, Context context) { + restoreDefaultsAsync(resourceGroupName, cacheName, storageTargetName, context).block(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1533,7 +1829,8 @@ private Mono> listByCacheNextSinglePageAsync(S /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsImpl.java index dd676b943684..d47262c9c7ae 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetsImpl.java @@ -46,10 +46,6 @@ public PagedIterable listByCache(String resourceGroupName, String return Utils.mapPage(inner, inner1 -> new StorageTargetImpl(inner1, this.manager())); } - public void delete(String resourceGroupName, String cacheName, String storageTargetName, String force) { - this.serviceClient().delete(resourceGroupName, cacheName, storageTargetName, force); - } - public void delete(String resourceGroupName, String cacheName, String storageTargetName) { this.serviceClient().delete(resourceGroupName, cacheName, storageTargetName); } @@ -59,15 +55,6 @@ public void delete( this.serviceClient().delete(resourceGroupName, cacheName, storageTargetName, force, context); } - public StorageTarget get(String resourceGroupName, String cacheName, String storageTargetName) { - StorageTargetInner inner = this.serviceClient().get(resourceGroupName, cacheName, storageTargetName); - if (inner != null) { - return new StorageTargetImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String cacheName, String storageTargetName, Context context) { Response inner = @@ -83,6 +70,23 @@ public Response getWithResponse( } } + public StorageTarget get(String resourceGroupName, String cacheName, String storageTargetName) { + StorageTargetInner inner = this.serviceClient().get(resourceGroupName, cacheName, storageTargetName); + if (inner != null) { + return new StorageTargetImpl(inner, this.manager()); + } else { + return null; + } + } + + public void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName) { + this.serviceClient().restoreDefaults(resourceGroupName, cacheName, storageTargetName); + } + + public void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName, Context context) { + this.serviceClient().restoreDefaults(resourceGroupName, cacheName, storageTargetName, context); + } + public StorageTarget getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsClientImpl.java index 0b42de7f335a..5b83bf780b67 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsClientImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsClientImpl.java @@ -55,7 +55,7 @@ public final class UsageModelsClientImpl implements UsageModelsClient { */ @Host("{$host}") @ServiceInterface(name = "StorageCacheManageme") - private interface UsageModelsService { + public interface UsageModelsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/usageModels") @ExpectedResponses({200}) @@ -227,7 +227,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -262,7 +263,8 @@ private Mono> listNextSinglePageAsync(String next /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationDisplay.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationDisplay.java index 195a842581c9..54c5cd4314d1 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationDisplay.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationDisplay.java @@ -34,6 +34,10 @@ public final class ApiOperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of ApiOperationDisplay class. */ + public ApiOperationDisplay() { + } + /** * Get the operation property: Operation type: Read, write, delete, etc. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationListResult.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationListResult.java index 0c5ce5b6e697..885f152e03fa 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationListResult.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationListResult.java @@ -22,12 +22,15 @@ public final class ApiOperationListResult { private String nextLink; /* - * List of Resource Provider operations supported by the - * Microsoft.StorageCache resource provider. + * List of Resource Provider operations supported by the Microsoft.StorageCache resource provider. */ @JsonProperty(value = "value") private List value; + /** Creates an instance of ApiOperationListResult class. */ + public ApiOperationListResult() { + } + /** * Get the nextLink property: URL to get the next set of operation list results if there are any. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationPropertiesServiceSpecification.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationPropertiesServiceSpecification.java index c6a7ce9fcd4d..ac7281fb27a3 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationPropertiesServiceSpecification.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ApiOperationPropertiesServiceSpecification.java @@ -23,6 +23,10 @@ public final class ApiOperationPropertiesServiceSpecification { @JsonProperty(value = "logSpecifications") private List logSpecifications; + /** Creates an instance of ApiOperationPropertiesServiceSpecification class. */ + public ApiOperationPropertiesServiceSpecification() { + } + /** * Get the metricSpecifications property: Details about operations related to metrics. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscOperations.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscOperations.java index 254cde87c5d4..48ed72aa2137 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscOperations.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscOperations.java @@ -14,23 +14,23 @@ public interface AscOperations { * * @param location The name of the region used to look up the operation. * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of an asynchronous operation for the Azure HPC Cache. + * @return the status of an asynchronous operation for the Azure HPC Cache along with {@link Response}. */ - AscOperation get(String location, String operationId); + Response getWithResponse(String location, String operationId, Context context); /** * Gets the status of an asynchronous operation for the Azure HPC Cache. * * @param location The name of the region used to look up the operation. * @param operationId The operation id which uniquely identifies the asynchronous operation. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of an asynchronous operation for the Azure HPC Cache along with {@link Response}. + * @return the status of an asynchronous operation for the Azure HPC Cache. */ - Response getWithResponse(String location, String operationId, Context context); + AscOperation get(String location, String operationId); } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/BlobNfsTarget.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/BlobNfsTarget.java index 6677cb2ce256..c3d97b5c277d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/BlobNfsTarget.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/BlobNfsTarget.java @@ -17,12 +17,28 @@ public final class BlobNfsTarget { private String target; /* - * Identifies the StorageCache usage model to be used for this storage - * target. + * Identifies the StorageCache usage model to be used for this storage target. */ @JsonProperty(value = "usageModel") private String usageModel; + /* + * Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. + */ + @JsonProperty(value = "verificationTimer") + private Integer verificationTimer; + + /* + * Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to + * back-end storage. + */ + @JsonProperty(value = "writeBackTimer") + private Integer writeBackTimer; + + /** Creates an instance of BlobNfsTarget class. */ + public BlobNfsTarget() { + } + /** * Get the target property: Resource ID of the storage container. * @@ -63,6 +79,50 @@ public BlobNfsTarget withUsageModel(String usageModel) { return this; } + /** + * Get the verificationTimer property: Amount of time (in seconds) the cache waits before it checks the back-end + * storage for file updates. + * + * @return the verificationTimer value. + */ + public Integer verificationTimer() { + return this.verificationTimer; + } + + /** + * Set the verificationTimer property: Amount of time (in seconds) the cache waits before it checks the back-end + * storage for file updates. + * + * @param verificationTimer the verificationTimer value to set. + * @return the BlobNfsTarget object itself. + */ + public BlobNfsTarget withVerificationTimer(Integer verificationTimer) { + this.verificationTimer = verificationTimer; + return this; + } + + /** + * Get the writeBackTimer property: Amount of time (in seconds) the cache waits after the last file change before it + * copies the changed file to back-end storage. + * + * @return the writeBackTimer value. + */ + public Integer writeBackTimer() { + return this.writeBackTimer; + } + + /** + * Set the writeBackTimer property: Amount of time (in seconds) the cache waits after the last file change before it + * copies the changed file to back-end storage. + * + * @param writeBackTimer the writeBackTimer value to set. + * @return the BlobNfsTarget object itself. + */ + public BlobNfsTarget withWriteBackTimer(Integer writeBackTimer) { + this.writeBackTimer = writeBackTimer; + return this; + } + /** * Validates the instance. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Cache.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Cache.java index ee86c98a89c3..7e5ebacfaa97 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Cache.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Cache.java @@ -575,16 +575,6 @@ interface WithDirectoryServicesSettings { */ void stop(Context context); - /** - * Create a priming job. This operation is only allowed when the cache is healthy. - * - * @param primingjob Object containing the definition of a priming job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void startPrimingJob(PrimingJob primingjob); - /** * Create a priming job. This operation is only allowed when the cache is healthy. * @@ -604,16 +594,6 @@ interface WithDirectoryServicesSettings { */ void startPrimingJob(PrimingJob primingjob, Context context); - /** - * Schedule a priming job for deletion. - * - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stopPrimingJob(PrimingJobIdParameter primingJobId); - /** * Schedule a priming job for deletion. * @@ -633,16 +613,6 @@ interface WithDirectoryServicesSettings { */ void stopPrimingJob(PrimingJobIdParameter primingJobId, Context context); - /** - * Schedule a priming job to be paused. - * - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void pausePrimingJob(PrimingJobIdParameter primingJobId); - /** * Schedule a priming job to be paused. * @@ -662,16 +632,6 @@ interface WithDirectoryServicesSettings { */ void pausePrimingJob(PrimingJobIdParameter primingJobId, Context context); - /** - * Resumes a paused priming job. - * - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resumePrimingJob(PrimingJobIdParameter primingJobId); - /** * Resumes a paused priming job. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettings.java index 00c7833fda84..81559d0409cf 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettings.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettings.java @@ -12,22 +12,19 @@ @Fluent public final class CacheActiveDirectorySettings { /* - * Primary DNS IP address used to resolve the Active Directory domain - * controller's fully qualified domain name. + * Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. */ @JsonProperty(value = "primaryDnsIpAddress", required = true) private String primaryDnsIpAddress; /* - * Secondary DNS IP address used to resolve the Active Directory domain - * controller's fully qualified domain name. + * Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name. */ @JsonProperty(value = "secondaryDnsIpAddress") private String secondaryDnsIpAddress; /* - * The fully qualified domain name of the Active Directory domain - * controller. + * The fully qualified domain name of the Active Directory domain controller. */ @JsonProperty(value = "domainName", required = true) private String domainName; @@ -39,9 +36,8 @@ public final class CacheActiveDirectorySettings { private String domainNetBiosName; /* - * The NetBIOS name to assign to the HPC Cache when it joins the Active - * Directory domain as a server. Length must 1-15 characters from the class - * [-0-9a-zA-Z]. + * The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must + * 1-15 characters from the class [-0-9a-zA-Z]. */ @JsonProperty(value = "cacheNetBiosName", required = true) private String cacheNetBiosName; @@ -53,12 +49,15 @@ public final class CacheActiveDirectorySettings { private DomainJoinedType domainJoined; /* - * Active Directory admin credentials used to join the HPC Cache to a - * domain. + * Active Directory admin credentials used to join the HPC Cache to a domain. */ @JsonProperty(value = "credentials") private CacheActiveDirectorySettingsCredentials credentials; + /** Creates an instance of CacheActiveDirectorySettings class. */ + public CacheActiveDirectorySettings() { + } + /** * Get the primaryDnsIpAddress property: Primary DNS IP address used to resolve the Active Directory domain * controller's fully qualified domain name. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettingsCredentials.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettingsCredentials.java index 0056ceaa84be..28c85585dbc3 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettingsCredentials.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheActiveDirectorySettingsCredentials.java @@ -12,19 +12,23 @@ @Fluent public final class CacheActiveDirectorySettingsCredentials { /* - * Username of the Active Directory domain administrator. This value is - * stored encrypted and not returned on response. + * Username of the Active Directory domain administrator. This value is stored encrypted and not returned on + * response. */ @JsonProperty(value = "username", required = true) private String username; /* - * Plain text password of the Active Directory domain administrator. This - * value is stored encrypted and not returned on response. + * Plain text password of the Active Directory domain administrator. This value is stored encrypted and not + * returned on response. */ @JsonProperty(value = "password", required = true) private String password; + /** Creates an instance of CacheActiveDirectorySettingsCredentials class. */ + public CacheActiveDirectorySettingsCredentials() { + } + /** * Get the username property: Username of the Active Directory domain administrator. This value is stored encrypted * and not returned on response. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheDirectorySettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheDirectorySettings.java index 5bd1be321fd3..c3a6ba92a46d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheDirectorySettings.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheDirectorySettings.java @@ -11,19 +11,21 @@ @Fluent public final class CacheDirectorySettings { /* - * Specifies settings for joining the HPC Cache to an Active Directory - * domain. + * Specifies settings for joining the HPC Cache to an Active Directory domain. */ @JsonProperty(value = "activeDirectory") private CacheActiveDirectorySettings activeDirectory; /* - * Specifies settings for Extended Groups. Extended Groups allows users to - * be members of more than 16 groups. + * Specifies settings for Extended Groups. Extended Groups allows users to be members of more than 16 groups. */ @JsonProperty(value = "usernameDownload") private CacheUsernameDownloadSettings usernameDownload; + /** Creates an instance of CacheDirectorySettings class. */ + public CacheDirectorySettings() { + } + /** * Get the activeDirectory property: Specifies settings for joining the HPC Cache to an Active Directory domain. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheEncryptionSettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheEncryptionSettings.java index 8c7ace429465..27b1367a8461 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheEncryptionSettings.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheEncryptionSettings.java @@ -17,12 +17,15 @@ public final class CacheEncryptionSettings { private KeyVaultKeyReference keyEncryptionKey; /* - * Specifies whether the service will automatically rotate to the newest - * version of the key in the Key Vault. + * Specifies whether the service will automatically rotate to the newest version of the key in the Key Vault. */ @JsonProperty(value = "rotationToLatestKeyVersionEnabled") private Boolean rotationToLatestKeyVersionEnabled; + /** Creates an instance of CacheEncryptionSettings class. */ + public CacheEncryptionSettings() { + } + /** * Get the keyEncryptionKey property: Specifies the location of the key encryption key in Key Vault. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheHealth.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheHealth.java index e11a345d9800..0932be6d1c92 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheHealth.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheHealth.java @@ -29,6 +29,10 @@ public final class CacheHealth { @JsonProperty(value = "conditions", access = JsonProperty.Access.WRITE_ONLY) private List conditions; + /** Creates an instance of CacheHealth class. */ + public CacheHealth() { + } + /** * Get the state property: List of Cache health states. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentity.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentity.java index 3a8fa4fd6399..9b089c65e978 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentity.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentity.java @@ -31,13 +31,17 @@ public class CacheIdentity { private CacheIdentityType type; /* - * A dictionary where each key is a user assigned identity resource ID, and - * each key's value is an empty dictionary. + * A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty + * dictionary. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of CacheIdentity class. */ + public CacheIdentity() { + } + /** * Get the principalId property: The principal ID for the system-assigned identity of the cache. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentityType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentityType.java index 6ac4bc15ee87..3deb09971f19 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentityType.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheIdentityType.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for CacheIdentityType. */ +/** The type of identity used for the cache. */ public enum CacheIdentityType { /** Enum value SystemAssigned. */ SYSTEM_ASSIGNED("SystemAssigned"), @@ -36,6 +36,9 @@ public enum CacheIdentityType { */ @JsonCreator public static CacheIdentityType fromString(String value) { + if (value == null) { + return null; + } CacheIdentityType[] items = CacheIdentityType.values(); for (CacheIdentityType item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -45,6 +48,7 @@ public static CacheIdentityType fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheNetworkSettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheNetworkSettings.java index 9781310c059c..bc34ffcfaa43 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheNetworkSettings.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheNetworkSettings.java @@ -24,8 +24,7 @@ public final class CacheNetworkSettings { private List utilityAddresses; /* - * DNS servers for the cache to use. It will be set from the network - * configuration if no value is provided. + * DNS servers for the cache to use. It will be set from the network configuration if no value is provided. */ @JsonProperty(value = "dnsServers") private List dnsServers; @@ -37,12 +36,15 @@ public final class CacheNetworkSettings { private String dnsSearchDomain; /* - * NTP server IP Address or FQDN for the cache to use. The default is - * time.windows.com. + * NTP server IP Address or FQDN for the cache to use. The default is time.windows.com. */ @JsonProperty(value = "ntpServer") private String ntpServer; + /** Creates an instance of CacheNetworkSettings class. */ + public CacheNetworkSettings() { + } + /** * Get the mtu property: The IPv4 maximum transmission unit configured for the subnet. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSecuritySettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSecuritySettings.java index b373a2c6c576..440521ffc873 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSecuritySettings.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSecuritySettings.java @@ -17,6 +17,10 @@ public final class CacheSecuritySettings { @JsonProperty(value = "accessPolicies") private List accessPolicies; + /** Creates an instance of CacheSecuritySettings class. */ + public CacheSecuritySettings() { + } + /** * Get the accessPolicies property: NFS access policies defined for this cache. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSku.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSku.java index deae3344e102..26dadeb725fa 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSku.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheSku.java @@ -16,6 +16,10 @@ public final class CacheSku { @JsonProperty(value = "name") private String name; + /** Creates an instance of CacheSku class. */ + public CacheSku() { + } + /** * Get the name property: SKU name for this Cache. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeSettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeSettings.java index 9643702015aa..3f7bd4a84a23 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeSettings.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeSettings.java @@ -12,22 +12,24 @@ @Fluent public final class CacheUpgradeSettings { /* - * True if the user chooses to select an installation time between now and - * firmwareUpdateDeadline. Else the firmware will automatically be - * installed after firmwareUpdateDeadline if not triggered earlier via the - * upgrade operation. + * True if the user chooses to select an installation time between now and firmwareUpdateDeadline. Else the + * firmware will automatically be installed after firmwareUpdateDeadline if not triggered earlier via the upgrade + * operation. */ @JsonProperty(value = "upgradeScheduleEnabled") private Boolean upgradeScheduleEnabled; /* - * When upgradeScheduleEnabled is true, this field holds the user-chosen - * upgrade time. At the user-chosen time, the firmware update will - * automatically be installed on the cache. + * When upgradeScheduleEnabled is true, this field holds the user-chosen upgrade time. At the user-chosen time, the + * firmware update will automatically be installed on the cache. */ @JsonProperty(value = "scheduledTime") private OffsetDateTime scheduledTime; + /** Creates an instance of CacheUpgradeSettings class. */ + public CacheUpgradeSettings() { + } + /** * Get the upgradeScheduleEnabled property: True if the user chooses to select an installation time between now and * firmwareUpdateDeadline. Else the firmware will automatically be installed after firmwareUpdateDeadline if not diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeStatus.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeStatus.java index 5e186d5c11b2..e5d406cd7b0d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeStatus.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUpgradeStatus.java @@ -18,16 +18,14 @@ public final class CacheUpgradeStatus { private String currentFirmwareVersion; /* - * True if there is a firmware update ready to install on this Cache. The - * firmware will automatically be installed after firmwareUpdateDeadline if - * not triggered earlier via the upgrade operation. + * True if there is a firmware update ready to install on this Cache. The firmware will automatically be installed + * after firmwareUpdateDeadline if not triggered earlier via the upgrade operation. */ @JsonProperty(value = "firmwareUpdateStatus", access = JsonProperty.Access.WRITE_ONLY) private FirmwareStatusType firmwareUpdateStatus; /* - * Time at which the pending firmware update will automatically be - * installed on the Cache. + * Time at which the pending firmware update will automatically be installed on the Cache. */ @JsonProperty(value = "firmwareUpdateDeadline", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime firmwareUpdateDeadline; @@ -39,12 +37,15 @@ public final class CacheUpgradeStatus { private OffsetDateTime lastFirmwareUpdate; /* - * When firmwareUpdateAvailable is true, this field holds the version - * string for the update. + * When firmwareUpdateAvailable is true, this field holds the version string for the update. */ @JsonProperty(value = "pendingFirmwareVersion", access = JsonProperty.Access.WRITE_ONLY) private String pendingFirmwareVersion; + /** Creates an instance of CacheUpgradeStatus class. */ + public CacheUpgradeStatus() { + } + /** * Get the currentFirmwareVersion property: Version string of the firmware currently installed on this Cache. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettings.java index ed8b5764e7f1..254dc02ec4d8 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettings.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettings.java @@ -17,24 +17,21 @@ public final class CacheUsernameDownloadSettings { private Boolean extendedGroups; /* - * This setting determines how the cache gets username and group names for - * clients. + * This setting determines how the cache gets username and group names for clients. */ @JsonProperty(value = "usernameSource") private UsernameSource usernameSource; /* - * The URI of the file containing group information (in /etc/group file - * format). This field must be populated when 'usernameSource' is set to - * 'File'. + * The URI of the file containing group information (in /etc/group file format). This field must be populated when + * 'usernameSource' is set to 'File'. */ @JsonProperty(value = "groupFileURI") private String groupFileUri; /* - * The URI of the file containing user information (in /etc/passwd file - * format). This field must be populated when 'usernameSource' is set to - * 'File'. + * The URI of the file containing user information (in /etc/passwd file format). This field must be populated when + * 'usernameSource' is set to 'File'. */ @JsonProperty(value = "userFileURI") private String userFileUri; @@ -58,30 +55,28 @@ public final class CacheUsernameDownloadSettings { private Boolean encryptLdapConnection; /* - * Determines if the certificates must be validated by a certificate - * authority. When true, caCertificateURI must be provided. + * Determines if the certificates must be validated by a certificate authority. When true, caCertificateURI must be + * provided. */ @JsonProperty(value = "requireValidCertificate") private Boolean requireValidCertificate; /* - * Determines if the certificate should be automatically downloaded. This - * applies to 'caCertificateURI' only if 'requireValidCertificate' is true. + * Determines if the certificate should be automatically downloaded. This applies to 'caCertificateURI' only if + * 'requireValidCertificate' is true. */ @JsonProperty(value = "autoDownloadCertificate") private Boolean autoDownloadCertificate; /* - * The URI of the CA certificate to validate the LDAP secure connection. - * This field must be populated when 'requireValidCertificate' is set to - * true. + * The URI of the CA certificate to validate the LDAP secure connection. This field must be populated when + * 'requireValidCertificate' is set to true. */ @JsonProperty(value = "caCertificateURI") private String caCertificateUri; /* - * Indicates whether or not the HPC Cache has performed the username - * download successfully. + * Indicates whether or not the HPC Cache has performed the username download successfully. */ @JsonProperty(value = "usernameDownloaded", access = JsonProperty.Access.WRITE_ONLY) private UsernameDownloadedType usernameDownloaded; @@ -92,6 +87,10 @@ public final class CacheUsernameDownloadSettings { @JsonProperty(value = "credentials") private CacheUsernameDownloadSettingsCredentials credentials; + /** Creates an instance of CacheUsernameDownloadSettings class. */ + public CacheUsernameDownloadSettings() { + } + /** * Get the extendedGroups property: Whether or not Extended Groups is enabled. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettingsCredentials.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettingsCredentials.java index a63336acce86..86b78c5cc64c 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettingsCredentials.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheUsernameDownloadSettingsCredentials.java @@ -11,19 +11,23 @@ @Fluent public final class CacheUsernameDownloadSettingsCredentials { /* - * The Bind Distinguished Name identity to be used in the secure LDAP - * connection. This value is stored encrypted and not returned on response. + * The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is stored encrypted + * and not returned on response. */ @JsonProperty(value = "bindDn") private String bindDn; /* - * The Bind password to be used in the secure LDAP connection. This value - * is stored encrypted and not returned on response. + * The Bind password to be used in the secure LDAP connection. This value is stored encrypted and not returned on + * response. */ @JsonProperty(value = "bindPassword") private String bindPassword; + /** Creates an instance of CacheUsernameDownloadSettingsCredentials class. */ + public CacheUsernameDownloadSettingsCredentials() { + } + /** * Get the bindDn property: The Bind Distinguished Name identity to be used in the secure LDAP connection. This * value is stored encrypted and not returned on response. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Caches.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Caches.java index 9f09dc3c5193..a8bd04fe6f89 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Caches.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Caches.java @@ -85,12 +85,13 @@ public interface Caches { * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance. + * @return a Cache instance along with {@link Response}. */ - Cache getByResourceGroup(String resourceGroupName, String cacheName); + Response getByResourceGroupWithResponse(String resourceGroupName, String cacheName, Context context); /** * Returns a Cache. @@ -98,13 +99,12 @@ public interface Caches { * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Cache instance along with {@link Response}. + * @return a Cache instance. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String cacheName, Context context); + Cache getByResourceGroup(String resourceGroupName, String cacheName); /** * Tells a Cache to write generate debug info for support to process. @@ -208,19 +208,6 @@ public interface Caches { */ void stop(String resourceGroupName, String cacheName, Context context); - /** - * Create a priming job. This operation is only allowed when the cache is healthy. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingjob Object containing the definition of a priming job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob); - /** * Create a priming job. This operation is only allowed when the cache is healthy. * @@ -247,19 +234,6 @@ public interface Caches { */ void startPrimingJob(String resourceGroupName, String cacheName, PrimingJob primingjob, Context context); - /** - * Schedule a priming job for deletion. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stopPrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); - /** * Schedule a priming job for deletion. * @@ -287,19 +261,6 @@ public interface Caches { void stopPrimingJob( String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context); - /** - * Schedule a priming job to be paused. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void pausePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); - /** * Schedule a priming job to be paused. * @@ -327,19 +288,6 @@ void stopPrimingJob( void pausePrimingJob( String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId, Context context); - /** - * Resumes a paused priming job. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param primingJobId Object containing the priming job ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resumePrimingJob(String resourceGroupName, String cacheName, PrimingJobIdParameter primingJobId); - /** * Resumes a paused priming job. * @@ -392,20 +340,6 @@ void resumePrimingJob( */ void upgradeFirmware(String resourceGroupName, String cacheName, Context context); - /** - * Update cache space allocation. - * - * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the - * [-0-9a-zA-Z_] char class. - * @param spaceAllocation List containing storage target cache space percentage allocations. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void spaceAllocation( - String resourceGroupName, String cacheName, List spaceAllocation); - /** * Update cache space allocation. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CachesListResult.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CachesListResult.java index c7eb36531c51..3a283bcf914a 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CachesListResult.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CachesListResult.java @@ -24,6 +24,10 @@ public final class CachesListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of CachesListResult class. */ + public CachesListResult() { + } + /** * Get the nextLink property: URL to get the next set of Cache list results, if there are any. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ClfsTarget.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ClfsTarget.java index 484bfc7ad2a8..c1e2d77d376d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ClfsTarget.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ClfsTarget.java @@ -16,6 +16,10 @@ public final class ClfsTarget { @JsonProperty(value = "target") private String target; + /** Creates an instance of ClfsTarget class. */ + public ClfsTarget() { + } + /** * Get the target property: Resource ID of storage container. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Condition.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Condition.java index 084937fa8d34..a1b87bfa17d4 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Condition.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Condition.java @@ -23,6 +23,10 @@ public final class Condition { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; + /** Creates an instance of Condition class. */ + public Condition() { + } + /** * Get the timestamp property: The time when the condition was raised. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/DomainJoinedType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/DomainJoinedType.java index e25642540c7f..94e3a6f16e6a 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/DomainJoinedType.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/DomainJoinedType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DomainJoinedType. */ +/** True if the HPC Cache is joined to the Active Directory domain. */ public final class DomainJoinedType extends ExpandableStringEnum { /** Static value Yes for DomainJoinedType. */ public static final DomainJoinedType YES = fromString("Yes"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ErrorResponse.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ErrorResponse.java index 4d8f4b8e1b15..cf2deb5e2aea 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ErrorResponse.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ErrorResponse.java @@ -22,6 +22,10 @@ public final class ErrorResponse { @JsonProperty(value = "message") private String message; + /** Creates an instance of ErrorResponse class. */ + public ErrorResponse() { + } + /** * Get the code property: Error code. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/FirmwareStatusType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/FirmwareStatusType.java index 66dfd14e815f..0341903bdd2a 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/FirmwareStatusType.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/FirmwareStatusType.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FirmwareStatusType. */ +/** + * True if there is a firmware update ready to install on this Cache. The firmware will automatically be installed after + * firmwareUpdateDeadline if not triggered earlier via the upgrade operation. + */ public final class FirmwareStatusType extends ExpandableStringEnum { /** Static value available for FirmwareStatusType. */ public static final FirmwareStatusType AVAILABLE = fromString("available"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/HealthStateType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/HealthStateType.java index 421168b15ca7..a722b29bc717 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/HealthStateType.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/HealthStateType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HealthStateType. */ +/** List of Cache health states. */ public final class HealthStateType extends ExpandableStringEnum { /** Static value Unknown for HealthStateType. */ public static final HealthStateType UNKNOWN = fromString("Unknown"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReference.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReference.java index 0a858807888b..6ae013733e60 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReference.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReference.java @@ -23,6 +23,10 @@ public final class KeyVaultKeyReference { @JsonProperty(value = "sourceVault", required = true) private KeyVaultKeyReferenceSourceVault sourceVault; + /** Creates an instance of KeyVaultKeyReference class. */ + public KeyVaultKeyReference() { + } + /** * Get the keyUrl property: The URL referencing a key encryption key in Key Vault. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReferenceSourceVault.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReferenceSourceVault.java index 6741b94e5cc3..c46637b618e9 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReferenceSourceVault.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/KeyVaultKeyReferenceSourceVault.java @@ -16,6 +16,10 @@ public final class KeyVaultKeyReferenceSourceVault { @JsonProperty(value = "id") private String id; + /** Creates an instance of KeyVaultKeyReferenceSourceVault class. */ + public KeyVaultKeyReferenceSourceVault() { + } + /** * Get the id property: Resource Id. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/LogSpecification.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/LogSpecification.java index 07a0282e117a..b15dbee37533 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/LogSpecification.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/LogSpecification.java @@ -22,6 +22,10 @@ public final class LogSpecification { @JsonProperty(value = "displayName") private String displayName; + /** Creates an instance of LogSpecification class. */ + public LogSpecification() { + } + /** * Get the name property: The name of the log. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricDimension.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricDimension.java index 58ef1d5eb451..0087913ee6c1 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricDimension.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricDimension.java @@ -34,6 +34,10 @@ public final class MetricDimension { @JsonProperty(value = "toBeExportedForShoebox") private Boolean toBeExportedForShoebox; + /** Creates an instance of MetricDimension class. */ + public MetricDimension() { + } + /** * Get the name property: Name of the dimension. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricSpecification.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricSpecification.java index 120e12b197ed..8bf8b1340f64 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricSpecification.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/MetricSpecification.java @@ -59,6 +59,10 @@ public final class MetricSpecification { @JsonProperty(value = "dimensions") private List dimensions; + /** Creates an instance of MetricSpecification class. */ + public MetricSpecification() { + } + /** * Get the name property: The name of the metric. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NamespaceJunction.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NamespaceJunction.java index 4f3263f5c923..9ebe734cd211 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NamespaceJunction.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NamespaceJunction.java @@ -34,6 +34,10 @@ public final class NamespaceJunction { @JsonProperty(value = "nfsAccessPolicy") private String nfsAccessPolicy; + /** Creates an instance of NamespaceJunction class. */ + public NamespaceJunction() { + } + /** * Get the namespacePath property: Namespace path on a Cache for a Storage Target. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Nfs3Target.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Nfs3Target.java index 4df0215487e3..b53bcda32171 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Nfs3Target.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Nfs3Target.java @@ -17,12 +17,28 @@ public final class Nfs3Target { private String target; /* - * Identifies the StorageCache usage model to be used for this storage - * target. + * Identifies the StorageCache usage model to be used for this storage target. */ @JsonProperty(value = "usageModel") private String usageModel; + /* + * Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates. + */ + @JsonProperty(value = "verificationTimer") + private Integer verificationTimer; + + /* + * Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to + * back-end storage. + */ + @JsonProperty(value = "writeBackTimer") + private Integer writeBackTimer; + + /** Creates an instance of Nfs3Target class. */ + public Nfs3Target() { + } + /** * Get the target property: IP address or host name of an NFSv3 host (e.g., 10.0.44.44). * @@ -63,6 +79,50 @@ public Nfs3Target withUsageModel(String usageModel) { return this; } + /** + * Get the verificationTimer property: Amount of time (in seconds) the cache waits before it checks the back-end + * storage for file updates. + * + * @return the verificationTimer value. + */ + public Integer verificationTimer() { + return this.verificationTimer; + } + + /** + * Set the verificationTimer property: Amount of time (in seconds) the cache waits before it checks the back-end + * storage for file updates. + * + * @param verificationTimer the verificationTimer value to set. + * @return the Nfs3Target object itself. + */ + public Nfs3Target withVerificationTimer(Integer verificationTimer) { + this.verificationTimer = verificationTimer; + return this; + } + + /** + * Get the writeBackTimer property: Amount of time (in seconds) the cache waits after the last file change before it + * copies the changed file to back-end storage. + * + * @return the writeBackTimer value. + */ + public Integer writeBackTimer() { + return this.writeBackTimer; + } + + /** + * Set the writeBackTimer property: Amount of time (in seconds) the cache waits after the last file change before it + * copies the changed file to back-end storage. + * + * @param writeBackTimer the writeBackTimer value to set. + * @return the Nfs3Target object itself. + */ + public Nfs3Target withWriteBackTimer(Integer writeBackTimer) { + this.writeBackTimer = writeBackTimer; + return this; + } + /** * Validates the instance. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessPolicy.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessPolicy.java index 4deec03dc906..a9bf302bb678 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessPolicy.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessPolicy.java @@ -13,8 +13,7 @@ @Fluent public final class NfsAccessPolicy { /* - * Name identifying this policy. Access Policy names are not case - * sensitive. + * Name identifying this policy. Access Policy names are not case sensitive. */ @JsonProperty(value = "name", required = true) private String name; @@ -25,6 +24,10 @@ public final class NfsAccessPolicy { @JsonProperty(value = "accessRules", required = true) private List accessRules; + /** Creates an instance of NfsAccessPolicy class. */ + public NfsAccessPolicy() { + } + /** * Get the name property: Name identifying this policy. Access Policy names are not case sensitive. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRule.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRule.java index 4cc254d32d1d..7e691076c292 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRule.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRule.java @@ -12,19 +12,16 @@ @Fluent public final class NfsAccessRule { /* - * Scope for this rule. The scope and filter determine which clients match - * the rule. + * Scope for this rule. The scope and filter determine which clients match the rule. */ @JsonProperty(value = "scope", required = true) private NfsAccessRuleScope scope; /* - * Filter applied to the scope for this rule. The filter's format depends - * on its scope. 'default' scope matches all clients and has no filter - * value. 'network' scope takes a filter in CIDR format (for example, - * 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name - * as filter. If a client does not match any filter rule and there is no - * default rule, access is denied. + * Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all + * clients and has no filter value. 'network' scope takes a filter in CIDR format (for example, 10.99.1.0/24). + * 'host' takes an IP address or fully qualified domain name as filter. If a client does not match any filter rule + * and there is no default rule, access is denied. */ @JsonProperty(value = "filter") private String filter; @@ -42,9 +39,8 @@ public final class NfsAccessRule { private Boolean suid; /* - * For the default policy, allow access to subdirectories under the root - * export. If this is set to no, clients can only mount the path '/'. If - * set to yes, clients can mount a deeper path, like '/a/b'. + * For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can + * only mount the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'. */ @JsonProperty(value = "submountAccess") private Boolean submountAccess; @@ -56,19 +52,21 @@ public final class NfsAccessRule { private Boolean rootSquash; /* - * UID value that replaces 0 when rootSquash is true. 65534 will be used if - * not provided. + * UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided. */ @JsonProperty(value = "anonymousUID") private String anonymousUid; /* - * GID value that replaces 0 when rootSquash is true. This will use the - * value of anonymousUID if not provided. + * GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided. */ @JsonProperty(value = "anonymousGID") private String anonymousGid; + /** Creates an instance of NfsAccessRule class. */ + public NfsAccessRule() { + } + /** * Get the scope property: Scope for this rule. The scope and filter determine which clients match the rule. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleAccess.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleAccess.java index 14ebd0b31eee..459de9329ba7 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleAccess.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleAccess.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NfsAccessRuleAccess. */ +/** Access allowed by this rule. */ public final class NfsAccessRuleAccess extends ExpandableStringEnum { /** Static value no for NfsAccessRuleAccess. */ public static final NfsAccessRuleAccess NO = fromString("no"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleScope.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleScope.java index 836173341d84..fa39bd32367e 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleScope.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/NfsAccessRuleScope.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NfsAccessRuleScope. */ +/** Scope for this rule. The scope and filter determine which clients match the rule. */ public final class NfsAccessRuleScope extends ExpandableStringEnum { /** Static value default for NfsAccessRuleScope. */ public static final NfsAccessRuleScope DEFAULT = fromString("default"); 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 index f2911d7e402e..23ec56fe2ddb 100644 --- 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 @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OperationalStateType. */ +/** Storage target operational state. */ public final class OperationalStateType extends ExpandableStringEnum { /** Static value Ready for OperationalStateType. */ public static final OperationalStateType READY = fromString("Ready"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJob.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJob.java index 926aa256b5ec..f7c7ae7b363b 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJob.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJob.java @@ -18,10 +18,9 @@ public final class PrimingJob { private String primingJobName; /* - * The URL for the priming manifest file to download. This file must be - * readable from the HPC Cache. When the file is in Azure blob storage the - * URL should include a Shared Access Signature (SAS) granting read - * permissions on the blob. + * The URL for the priming manifest file to download. This file must be readable from the HPC Cache. When the file + * is in Azure blob storage the URL should include a Shared Access Signature (SAS) granting read permissions on the + * blob. */ @JsonProperty(value = "primingManifestUrl", required = true) private String primingManifestUrl; @@ -56,6 +55,10 @@ public final class PrimingJob { @JsonProperty(value = "primingJobPercentComplete", access = JsonProperty.Access.WRITE_ONLY) private Double primingJobPercentComplete; + /** Creates an instance of PrimingJob class. */ + public PrimingJob() { + } + /** * Get the primingJobName property: The priming job name. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobIdParameter.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobIdParameter.java index 022bce69d26c..ba70c0c5c0cb 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobIdParameter.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobIdParameter.java @@ -17,6 +17,10 @@ public final class PrimingJobIdParameter { @JsonProperty(value = "primingJobId", required = true) private String primingJobId; + /** Creates an instance of PrimingJobIdParameter class. */ + public PrimingJobIdParameter() { + } + /** * Get the primingJobId property: The unique identifier of the priming job. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobState.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobState.java index b721de6697d7..b38de4d96a8d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobState.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/PrimingJobState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PrimingJobState. */ +/** The state of the priming operation. */ public final class PrimingJobState extends ExpandableStringEnum { /** Static value Queued for PrimingJobState. */ public static final PrimingJobState QUEUED = fromString("Queued"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ProvisioningStateType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ProvisioningStateType.java index 52aefc8058e0..7e7dc7194594 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ProvisioningStateType.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ProvisioningStateType.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProvisioningStateType. */ +/** + * ARM provisioning state, see + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. + */ public final class ProvisioningStateType extends ExpandableStringEnum { /** Static value Succeeded for ProvisioningStateType. */ public static final ProvisioningStateType SUCCEEDED = fromString("Succeeded"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ReasonCode.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ReasonCode.java index 3f59658d82b4..1f0670077225 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ReasonCode.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ReasonCode.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ReasonCode. */ +/** + * The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is set + * when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. + * "NotAvailableForSubscription" is related to capacity at the datacenter. + */ public final class ReasonCode extends ExpandableStringEnum { /** Static value QuotaId for ReasonCode. */ public static final ReasonCode QUOTA_ID = fromString("QuotaId"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuCapabilities.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuCapabilities.java index c2ac9b886d6e..e4a1080df3cf 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuCapabilities.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuCapabilities.java @@ -22,6 +22,10 @@ public final class ResourceSkuCapabilities { @JsonProperty(value = "value") private String value; + /** Creates an instance of ResourceSkuCapabilities class. */ + public ResourceSkuCapabilities() { + } + /** * Get the name property: Name of a capability, such as ops/sec. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuLocationInfo.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuLocationInfo.java index 1785298f384d..5176b69fb805 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuLocationInfo.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkuLocationInfo.java @@ -23,6 +23,10 @@ public final class ResourceSkuLocationInfo { @JsonProperty(value = "zones") private List zones; + /** Creates an instance of ResourceSkuLocationInfo class. */ + public ResourceSkuLocationInfo() { + } + /** * Get the location property: Location where this SKU is available. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkusResult.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkusResult.java index 30107507d909..8fe8c58d073f 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkusResult.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceSkusResult.java @@ -24,6 +24,10 @@ public final class ResourceSkusResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of ResourceSkusResult class. */ + public ResourceSkusResult() { + } + /** * Get the nextLink property: The URI to fetch the next page of Cache SKUs. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsageName.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsageName.java index 0841c7c3300a..7d22a5e28e69 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsageName.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsageName.java @@ -22,6 +22,10 @@ public final class ResourceUsageName { @JsonProperty(value = "localizedValue") private String localizedValue; + /** Creates an instance of ResourceUsageName class. */ + public ResourceUsageName() { + } + /** * Get the value property: Canonical name for this resource type. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsagesListResult.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsagesListResult.java index 0e4736e2eb34..a16b1b023265 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsagesListResult.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsagesListResult.java @@ -22,12 +22,15 @@ public final class ResourceUsagesListResult { private String nextLink; /* - * List of usages and limits for resources controlled by the - * Microsoft.StorageCache resource provider. + * List of usages and limits for resources controlled by the Microsoft.StorageCache resource provider. */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of ResourceUsagesListResult class. */ + public ResourceUsagesListResult() { + } + /** * Get the nextLink property: URL to get the next set of resource usage list results if there are any. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Restriction.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Restriction.java index da03aa0b73e5..c3add4939123 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Restriction.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Restriction.java @@ -12,29 +12,30 @@ @Fluent public final class Restriction { /* - * The type of restrictions. In this version, the only possible value for - * this is location. + * The type of restrictions. In this version, the only possible value for this is location. */ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; /* - * The value of restrictions. If the restriction type is set to location, - * then this would be the different locations where the SKU is restricted. + * The value of restrictions. If the restriction type is set to location, then this would be the different + * locations where the SKU is restricted. */ @JsonProperty(value = "values", access = JsonProperty.Access.WRITE_ONLY) private List values; /* - * The reason for the restriction. As of now this can be "QuotaId" or - * "NotAvailableForSubscription". "QuotaId" is set when the SKU has - * requiredQuotas parameter as the subscription does not belong to that - * quota. "NotAvailableForSubscription" is related to capacity at the - * datacenter. + * The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". "QuotaId" is + * set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. + * "NotAvailableForSubscription" is related to capacity at the datacenter. */ @JsonProperty(value = "reasonCode") private ReasonCode reasonCode; + /** Creates an instance of Restriction class. */ + public Restriction() { + } + /** * Get the type property: The type of restrictions. In this version, the only possible value for this is location. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetResource.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetResource.java index 014c396c2365..d8faa80b23e7 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetResource.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetResource.java @@ -24,6 +24,10 @@ public class StorageTargetResource extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of StorageTargetResource class. */ + public StorageTargetResource() { + } + /** * Get the location property: Region name string. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetSpaceAllocation.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetSpaceAllocation.java index 137a7ffdb16d..4d316aa59440 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetSpaceAllocation.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetSpaceAllocation.java @@ -22,6 +22,10 @@ public final class StorageTargetSpaceAllocation { @JsonProperty(value = "allocationPercentage") private Integer allocationPercentage; + /** Creates an instance of StorageTargetSpaceAllocation class. */ + public StorageTargetSpaceAllocation() { + } + /** * Get the name property: Name of the storage target. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetType.java index e7e745d811ff..d30eba1914cc 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetType.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StorageTargetType. */ +/** Type of the Storage Target. */ public final class StorageTargetType extends ExpandableStringEnum { /** Static value nfs3 for StorageTargetType. */ public static final StorageTargetType NFS3 = fromString("nfs3"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargets.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargets.java index 492fffb44e4e..5ee9e563858a 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargets.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargets.java @@ -74,13 +74,11 @@ public interface StorageTargets { * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param force Boolean value requesting the force delete operation for a storage target. Force delete discards - * unwritten-data in the cache instead of flushing it to back-end storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String cacheName, String storageTargetName, String force); + void delete(String resourceGroupName, String cacheName, String storageTargetName); /** * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or @@ -92,30 +90,30 @@ public interface StorageTargets { * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. + * @param force Boolean value requesting the force delete operation for a storage target. Force delete discards + * unwritten-data in the cache instead of flushing it to back-end storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void delete(String resourceGroupName, String cacheName, String storageTargetName); + void delete(String resourceGroupName, String cacheName, String storageTargetName, String force, Context context); /** - * Removes a Storage Target from a Cache. This operation is allowed at any time, but if the Cache is down or - * unhealthy, the actual removal of the Storage Target may be delayed until the Cache is healthy again. Note that if - * the Cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be - * deleted. + * Returns a Storage Target from a Cache. * * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the * [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. - * @param force Boolean value requesting the force delete operation for a storage target. Force delete discards - * unwritten-data in the cache instead of flushing it to back-end storage. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return type of the Storage Target along with {@link Response}. */ - void delete(String resourceGroupName, String cacheName, String storageTargetName, String force, Context context); + Response getWithResponse( + String resourceGroupName, String cacheName, String storageTargetName, Context context); /** * Returns a Storage Target from a Cache. @@ -132,7 +130,20 @@ public interface StorageTargets { StorageTarget get(String resourceGroupName, String cacheName, String storageTargetName); /** - * Returns a Storage Target from a Cache. + * Tells a storage target to restore its settings to their default values. + * + * @param resourceGroupName Target resource group. + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the + * [-0-9a-zA-Z_] char class. + * @param storageTargetName Name of Storage Target. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName); + + /** + * Tells a storage target to restore its settings to their default values. * * @param resourceGroupName Target resource group. * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the @@ -142,10 +153,8 @@ public interface StorageTargets { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return type of the Storage Target along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String cacheName, String storageTargetName, Context context); + void restoreDefaults(String resourceGroupName, String cacheName, String storageTargetName, Context context); /** * Returns a Storage Target from a Cache. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetsResult.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetsResult.java index d6915c774266..84dd902ab0bb 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetsResult.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetsResult.java @@ -24,6 +24,10 @@ public final class StorageTargetsResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of StorageTargetsResult class. */ + public StorageTargetsResult() { + } + /** * Get the nextLink property: The URI to fetch the next page of Storage Targets. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UnknownTarget.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UnknownTarget.java index 42dbdf4b626d..39e9673f5ccc 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UnknownTarget.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UnknownTarget.java @@ -13,13 +13,16 @@ @Fluent public final class UnknownTarget { /* - * Dictionary of string->string pairs containing information about the - * Storage Target. + * Dictionary of string->string pairs containing information about the Storage Target. */ @JsonProperty(value = "attributes") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map attributes; + /** Creates an instance of UnknownTarget class. */ + public UnknownTarget() { + } + /** * Get the attributes property: Dictionary of string->string pairs containing information about the Storage * Target. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelDisplay.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelDisplay.java index 9cc5a45281d3..1db22cfa5d66 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelDisplay.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelDisplay.java @@ -16,6 +16,10 @@ public final class UsageModelDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of UsageModelDisplay class. */ + public UsageModelDisplay() { + } + /** * Get the description property: String to display for this usage model. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelsResult.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelsResult.java index a6b26e8e9d20..eb4e37a75667 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelsResult.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModelsResult.java @@ -24,6 +24,10 @@ public final class UsageModelsResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of UsageModelsResult class. */ + public UsageModelsResult() { + } + /** * Get the nextLink property: The URI to fetch the next page of Cache usage models. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UserAssignedIdentitiesValue.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UserAssignedIdentitiesValue.java index 1c76541ab391..287cb6368eb2 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UserAssignedIdentitiesValue.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UserAssignedIdentitiesValue.java @@ -22,6 +22,10 @@ public final class UserAssignedIdentitiesValue { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private String clientId; + /** Creates an instance of UserAssignedIdentitiesValue class. */ + public UserAssignedIdentitiesValue() { + } + /** * Get the principalId property: The principal ID of the user-assigned identity. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameDownloadedType.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameDownloadedType.java index f0fad062e09d..d6deedc5b33b 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameDownloadedType.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameDownloadedType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UsernameDownloadedType. */ +/** Indicates whether or not the HPC Cache has performed the username download successfully. */ public final class UsernameDownloadedType extends ExpandableStringEnum { /** Static value Yes for UsernameDownloadedType. */ public static final UsernameDownloadedType YES = fromString("Yes"); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameSource.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameSource.java index 33b1b66041a9..5860d7c509de 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameSource.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsernameSource.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UsernameSource. */ +/** This setting determines how the cache gets username and group names for clients. */ public final class UsernameSource extends ExpandableStringEnum { /** Static value AD for UsernameSource. */ public static final UsernameSource AD = fromString("AD"); 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 index b3cbc83955d9..8edcb1bf628a 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for AscOperations Get. */ public final class AscOperationsGetSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscOperations_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/AscOperations_Get.json */ /** * Sample code: AscOperations_Get. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscUsagesListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscUsagesListSamples.java index ffd9f82c8df4..74f6cbbd0022 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscUsagesListSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscUsagesListSamples.java @@ -9,7 +9,7 @@ /** Samples for AscUsages List. */ public final class AscUsagesListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/AscResourceUsages_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/AscResourceUsages_Get.json */ /** * Sample code: AscUsages_List. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesCreateOrUpdateSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesCreateOrUpdateSamples.java index baa113be41fd..6fd05e43e65d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesCreateOrUpdateSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesCreateOrUpdateSamples.java @@ -31,7 +31,7 @@ /** Samples for Caches CreateOrUpdate. */ public final class CachesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_CreateOrUpdate_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_CreateOrUpdate_ldap_only.json */ /** * Sample code: Caches_CreateOrUpdate_ldap_only. @@ -58,7 +58,7 @@ public static void cachesCreateOrUpdateLdapOnly( new CacheEncryptionSettings() .withKeyEncryptionKey( new KeyVaultKeyReference() - .withKeyUrl("https://keyvault-cmk.vault.azure.net/keys/key2048/test") + .withKeyUrl("fakeTokenPlaceholder") .withSourceVault( new KeyVaultKeyReferenceSourceVault() .withId( @@ -90,12 +90,12 @@ public static void cachesCreateOrUpdateLdapOnly( .withCredentials( new CacheUsernameDownloadSettingsCredentials() .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local") - .withBindPassword("")))) + .withBindPassword("fakeTokenPlaceholder")))) .create(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_CreateOrUpdate.json */ /** * Sample code: Caches_CreateOrUpdate. @@ -128,7 +128,7 @@ public static void cachesCreateOrUpdate(com.azure.resourcemanager.storagecache.S new CacheEncryptionSettings() .withKeyEncryptionKey( new KeyVaultKeyReference() - .withKeyUrl("https://keyvault-cmk.vault.azure.net/keys/key2047/test") + .withKeyUrl("fakeTokenPlaceholder") .withSourceVault( new KeyVaultKeyReferenceSourceVault() .withId( @@ -161,7 +161,7 @@ public static void cachesCreateOrUpdate(com.azure.resourcemanager.storagecache.S .withCredentials( new CacheActiveDirectorySettingsCredentials() .withUsername("consotoAdmin") - .withPassword(""))) + .withPassword("fakeTokenPlaceholder"))) .withUsernameDownload( new CacheUsernameDownloadSettings() .withExtendedGroups(true) @@ -171,7 +171,7 @@ public static void cachesCreateOrUpdate(com.azure.resourcemanager.storagecache.S .withCredentials( new CacheUsernameDownloadSettingsCredentials() .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local") - .withBindPassword("")))) + .withBindPassword("fakeTokenPlaceholder")))) .create(); } 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 index 2020f831d9b5..54ac87a7fe74 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches DebugInfo. */ public final class CachesDebugInfoSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_DebugInfo.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_DebugInfo.json */ /** * Sample code: Caches_DebugInfo. 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 index 850778c5a437..2e470bc69854 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches Delete. */ public final class CachesDeleteSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Delete.json */ /** * Sample code: Caches_Delete. 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 index b2b6b9f704c9..493ea3b89b20 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches Flush. */ public final class CachesFlushSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Flush.json */ /** * Sample code: Caches_Flush. 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 index 57c424ff5b15..6ca07d935743 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches GetByResourceGroup. */ public final class CachesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Get.json */ /** * Sample code: Caches_Get. 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 index d0d52684320e..60b2cc95a45e 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches ListByResourceGroup. */ public final class CachesListByResourceGroupSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_ListByResourceGroup.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_ListByResourceGroup.json */ /** * Sample code: Caches_ListByResourceGroup. 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 index 219b18c7a0cb..cccaa663e5ad 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches List. */ public final class CachesListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_List.json */ /** * Sample code: Caches_List. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesPausePrimingJobSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesPausePrimingJobSamples.java index dc07a770132d..1983d37387ee 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesPausePrimingJobSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesPausePrimingJobSamples.java @@ -10,7 +10,7 @@ /** Samples for Caches PausePrimingJob. */ public final class CachesPausePrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/PausePrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/PausePrimingJob.json */ /** * Sample code: PausePrimingJob. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesResumePrimingJobSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesResumePrimingJobSamples.java index 3d94937122da..3740c145f4e0 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesResumePrimingJobSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesResumePrimingJobSamples.java @@ -10,7 +10,7 @@ /** Samples for Caches ResumePrimingJob. */ public final class CachesResumePrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/ResumePrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/ResumePrimingJob.json */ /** * Sample code: ResumePrimingJob. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesSpaceAllocationSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesSpaceAllocationSamples.java index 6e321dcbe578..5e8d2d3ba65d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesSpaceAllocationSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesSpaceAllocationSamples.java @@ -11,7 +11,7 @@ /** Samples for Caches SpaceAllocation. */ public final class CachesSpaceAllocationSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/SpaceAllocation_Post.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/SpaceAllocation_Post.json */ /** * Sample code: SpaceAllocation_Post. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartPrimingJobSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartPrimingJobSamples.java index bdfd507e4912..c1fb279005e1 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartPrimingJobSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartPrimingJobSamples.java @@ -10,7 +10,7 @@ /** Samples for Caches StartPrimingJob. */ public final class CachesStartPrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StartPrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StartPrimingJob.json */ /** * Sample code: StartPrimingJob. 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 index 7d538f017b2f..820af0c1a3c9 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches Start. */ public final class CachesStartSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Start.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Start.json */ /** * Sample code: Caches_Start. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopPrimingJobSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopPrimingJobSamples.java index 4e756cfb1527..803a9ddb6d64 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopPrimingJobSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopPrimingJobSamples.java @@ -10,7 +10,7 @@ /** Samples for Caches StopPrimingJob. */ public final class CachesStopPrimingJobSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StopPrimingJob.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StopPrimingJob.json */ /** * Sample code: StopPrimingJob. 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 index 86533a7d34b1..35d087fc3cdc 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches Stop. */ public final class CachesStopSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Stop.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Stop.json */ /** * Sample code: Caches_Stop. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpdateSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpdateSamples.java index 63728fa99819..16d2d61b24a5 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpdateSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesUpdateSamples.java @@ -26,7 +26,7 @@ /** Samples for Caches Update. */ public final class CachesUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Update_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Update_ldap_only.json */ /** * Sample code: Caches_Update_ldap_only. @@ -102,12 +102,12 @@ public static void cachesUpdateLdapOnly(com.azure.resourcemanager.storagecache.S .withCredentials( new CacheUsernameDownloadSettingsCredentials() .withBindDn("cn=ldapadmin,dc=contosoad,dc=contoso,dc=local") - .withBindPassword("")))) + .withBindPassword("fakeTokenPlaceholder")))) .apply(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_Update.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_Update.json */ /** * Sample code: Caches_Update. 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 index cd034e312a0a..5ba545447f53 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Caches UpgradeFirmware. */ public final class CachesUpgradeFirmwareSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Caches_UpgradeFirmware.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Caches_UpgradeFirmware.json */ /** * Sample code: Caches_UpgradeFirmware. 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 index 5913640e1c73..f1597deb6cd8 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Operations_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Operations_List.json */ /** * Sample code: Operations_List. 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 index a4bd0093ae98..44cd830000fd 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/Skus_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/Skus_List.json */ /** * Sample code: Skus_List. 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 index 512427bff119..23927c451d23 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for StorageTargetOperation Flush. */ public final class StorageTargetOperationFlushSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Flush.json */ /** * Sample code: StorageTargets_Flush. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationInvalidateSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationInvalidateSamples.java index 6855c76cb11b..dfdf49e00f32 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationInvalidateSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationInvalidateSamples.java @@ -9,7 +9,7 @@ /** Samples for StorageTargetOperation Invalidate. */ public final class StorageTargetOperationInvalidateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Invalidate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Invalidate.json */ /** * Sample code: StorageTargets_Invalidate. 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 index 26c5eb05ef5a..2769e345cb10 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for StorageTargetOperation Resume. */ public final class StorageTargetOperationResumeSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Resume.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Resume.json */ /** * Sample code: StorageTargets_Resume. 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 index ee8e59ff740f..c0267c3b69c8 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for StorageTargetOperation Suspend. */ public final class StorageTargetOperationSuspendSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Suspend.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Suspend.json */ /** * Sample code: StorageTargets_Suspend. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsCreateOrUpdateSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsCreateOrUpdateSamples.java index 0d0ef23c1917..25d3704629e1 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsCreateOrUpdateSamples.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ /** Samples for StorageTargets CreateOrUpdate. */ public final class StorageTargetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate.json */ /** * Sample code: StorageTargets_CreateOrUpdate. @@ -40,12 +40,12 @@ public static void storageTargetsCreateOrUpdate( .withNfsExport("exp2") .withNfsAccessPolicy("rootSquash"))) .withTargetType(StorageTargetType.NFS3) - .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_HEAVY_INFREQ")) + .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_ONLY").withVerificationTimer(30)) .create(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json */ /** * Sample code: StorageTargets_CreateOrUpdate_BlobNfs. @@ -64,12 +64,14 @@ public static void storageTargetsCreateOrUpdateBlobNfs( new BlobNfsTarget() .withTarget( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Storage/storageAccounts/blofnfs/blobServices/default/containers/blobnfs") - .withUsageModel("WRITE_WORKLOAD_15")) + .withUsageModel("READ_WRITE") + .withVerificationTimer(28800) + .withWriteBackTimer(3600)) .create(); } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json */ /** * Sample code: StorageTargets_CreateOrUpdate_NoJunctions. @@ -83,7 +85,7 @@ public static void storageTargetsCreateOrUpdateNoJunctions( .define("st1") .withExistingCache("scgroup", "sc1") .withTargetType(StorageTargetType.NFS3) - .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_HEAVY_INFREQ")) + .withNfs3(new Nfs3Target().withTarget("10.0.44.44").withUsageModel("READ_ONLY").withVerificationTimer(30)) .create(); } } 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 index 69d71e51af5c..595e34f6c215 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for StorageTargets Delete. */ public final class StorageTargetsDeleteSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Delete.json */ /** * Sample code: StorageTargets_Delete. 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 index e0d4188ba5ee..6d30a4821241 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for StorageTargets DnsRefresh. */ public final class StorageTargetsDnsRefreshSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_DnsRefresh.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_DnsRefresh.json */ /** * Sample code: Caches_DnsRefresh. 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 index 86de8eb57c15..04d52ff9e2de 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for StorageTargets Get. */ public final class StorageTargetsGetSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_Get.json */ /** * Sample code: StorageTargets_Get. 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 index 7ee403e4cf69..6ba34250f95b 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for StorageTargets ListByCache. */ public final class StorageTargetsListByCacheSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/StorageTargets_ListByCache.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_ListByCache.json */ /** * Sample code: StorageTargets_List. diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsRestoreDefaultsSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsRestoreDefaultsSamples.java new file mode 100644 index 000000000000..0662b49f7891 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetsRestoreDefaultsSamples.java @@ -0,0 +1,23 @@ +// 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 RestoreDefaults. */ +public final class StorageTargetsRestoreDefaultsSamples { + /* + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/StorageTargets_RestoreDefaults.json + */ + /** + * Sample code: StorageTargets_RestoreDefaults. + * + * @param manager Entry point to StorageCacheManager. + */ + public static void storageTargetsRestoreDefaults( + com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + manager.storageTargets().restoreDefaults("scgroup", "sc", "st1", 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 index 01356a8d5391..8a038e7ad754 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for UsageModels List. */ public final class UsageModelsListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-05-01/examples/UsageModels_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2023-01-01/examples/UsageModels_List.json */ /** * Sample code: UsageModels_List.