From 3a2693b4b321c682c837fae48241dcf36a8227d7 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 15 Mar 2022 11:05:00 +0000 Subject: [PATCH] CodeGen from PR 18255 in Azure/azure-rest-api-specs Merge 947333e51a47a11269064ddd0cb1eafa057a621f into 6354ca8bf06ea064f4f0fef331a10c1baf62ac35 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 105 ++++-- .../pom.xml | 2 +- .../storagecache/StorageCacheManager.java | 39 +- .../fluent/AscOperationsClient.java | 2 +- .../storagecache/fluent/AscUsagesClient.java | 39 ++ .../storagecache/fluent/CachesClient.java | 40 +- .../storagecache/fluent/OperationsClient.java | 6 +- .../storagecache/fluent/SkusClient.java | 6 +- .../fluent/StorageCacheManagementClient.java | 7 + .../fluent/StorageTargetOperationsClient.java | 78 +++- .../fluent/StorageTargetsClient.java | 18 +- .../fluent/UsageModelsClient.java | 6 +- .../fluent/models/ApiOperationInner.java | 4 - .../fluent/models/ApiOperationProperties.java | 4 - .../fluent/models/AscOperationInner.java | 4 - .../fluent/models/AscOperationProperties.java | 4 - .../fluent/models/CacheInner.java | 29 +- .../fluent/models/CacheProperties.java | 33 +- .../fluent/models/ResourceSkuInner.java | 4 - .../fluent/models/ResourceUsageInner.java | 84 +++++ .../fluent/models/StorageTargetInner.java | 4 - .../models/StorageTargetProperties.java | 7 +- .../fluent/models/UsageModelInner.java | 4 - .../AscOperationsClientImpl.java | 13 +- .../implementation/AscOperationsImpl.java | 3 +- .../implementation/AscUsagesClientImpl.java | 313 ++++++++++++++++ .../implementation/AscUsagesImpl.java | 45 +++ .../implementation/CacheImpl.java | 14 + .../implementation/CachesClientImpl.java | 195 +++++----- .../implementation/CachesImpl.java | 19 +- .../implementation/OperationsClientImpl.java | 25 +- .../implementation/OperationsImpl.java | 3 +- .../implementation/ResourceUsageImpl.java | 45 +++ .../implementation/SkusClientImpl.java | 27 +- .../storagecache/implementation/SkusImpl.java | 3 +- .../StorageCacheManagementClientImpl.java | 22 +- .../StorageTargetOperationsClientImpl.java | 351 ++++++++++++++++-- .../StorageTargetOperationsImpl.java | 11 +- .../StorageTargetsClientImpl.java | 91 ++--- .../implementation/StorageTargetsImpl.java | 27 +- .../implementation/UsageModelsClientImpl.java | 25 +- .../implementation/UsageModelsImpl.java | 3 +- .../models/ApiOperationDisplay.java | 4 - .../models/ApiOperationListResult.java | 4 - ...erationPropertiesServiceSpecification.java | 4 - .../storagecache/models/AscOperations.java | 2 +- .../storagecache/models/AscUsages.java | 34 ++ .../storagecache/models/BlobNfsTarget.java | 4 - .../storagecache/models/Cache.java | 23 +- .../models/CacheActiveDirectorySettings.java | 13 +- ...cheActiveDirectorySettingsCredentials.java | 9 +- .../models/CacheDirectorySettings.java | 4 - .../models/CacheEncryptionSettings.java | 4 - .../storagecache/models/CacheHealth.java | 4 - .../storagecache/models/CacheIdentity.java | 4 - .../models/CacheNetworkSettings.java | 4 - .../models/CacheSecuritySettings.java | 4 - .../storagecache/models/CacheSku.java | 4 - .../models/CacheUpgradeStatus.java | 4 - .../models/CacheUsernameDownloadSettings.java | 4 - ...heUsernameDownloadSettingsCredentials.java | 4 - .../storagecache/models/Caches.java | 14 +- .../storagecache/models/CachesListResult.java | 4 - .../storagecache/models/ClfsTarget.java | 4 - .../storagecache/models/Condition.java | 4 - .../storagecache/models/ErrorResponse.java | 4 - .../models/KeyVaultKeyReference.java | 9 +- .../KeyVaultKeyReferenceSourceVault.java | 4 - .../storagecache/models/MetricDimension.java | 4 - .../models/MetricSpecification.java | 4 - .../models/NamespaceJunction.java | 4 - .../storagecache/models/Nfs3Target.java | 4 - .../storagecache/models/NfsAccessPolicy.java | 9 +- .../storagecache/models/NfsAccessRule.java | 9 +- .../storagecache/models/Operations.java | 6 +- .../models/ResourceSkuCapabilities.java | 4 - .../models/ResourceSkuLocationInfo.java | 4 - .../models/ResourceSkusResult.java | 4 - .../storagecache/models/ResourceUsage.java | 45 +++ .../models/ResourceUsageName.java | 72 ++++ .../models/ResourceUsagesListResult.java | 60 +++ .../storagecache/models/Restriction.java | 4 - .../storagecache/models/Skus.java | 6 +- .../models/StorageTargetOperations.java | 29 ++ .../models/StorageTargetResource.java | 4 - .../storagecache/models/StorageTargets.java | 10 +- .../models/StorageTargetsResult.java | 4 - .../storagecache/models/UnknownTarget.java | 4 - .../models/UsageModelDisplay.java | 4 - .../storagecache/models/UsageModels.java | 6 +- .../models/UsageModelsResult.java | 4 - .../models/UserAssignedIdentitiesValue.java | 4 - .../generated/AscOperationsGetSamples.java | 2 +- .../generated/AscUsagesListSamples.java | 22 ++ .../CachesCreateOrUpdateSamples.java | 4 +- .../generated/CachesDebugInfoSamples.java | 2 +- .../generated/CachesDeleteSamples.java | 2 +- .../generated/CachesFlushSamples.java | 2 +- .../CachesGetByResourceGroupSamples.java | 2 +- .../CachesListByResourceGroupSamples.java | 2 +- .../generated/CachesListSamples.java | 2 +- .../generated/CachesStartSamples.java | 2 +- .../generated/CachesStopSamples.java | 2 +- .../generated/CachesUpdateSamples.java | 4 +- .../CachesUpgradeFirmwareSamples.java | 2 +- .../generated/OperationsListSamples.java | 6 +- .../generated/SkusListSamples.java | 2 +- .../StorageTargetOperationFlushSamples.java | 2 +- ...orageTargetOperationInvalidateSamples.java | 22 ++ .../StorageTargetOperationResumeSamples.java | 2 +- .../StorageTargetOperationSuspendSamples.java | 2 +- .../StorageTargetsCreateOrUpdateSamples.java | 6 +- .../StorageTargetsDeleteSamples.java | 2 +- .../StorageTargetsDnsRefreshSamples.java | 2 +- .../generated/StorageTargetsGetSamples.java | 2 +- .../StorageTargetsListByCacheSamples.java | 2 +- .../generated/UsageModelsListSamples.java | 2 +- 119 files changed, 1790 insertions(+), 572 deletions(-) create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/AscUsagesClient.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceUsageInner.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesClientImpl.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesImpl.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/ResourceUsageImpl.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscUsages.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsage.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsageName.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsagesListResult.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscUsagesListSamples.java create mode 100644 sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationInvalidateSamples.java diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md b/sdk/storagecache/azure-resourcemanager-storagecache/CHANGELOG.md index 454572e3d5724..f5089d42bbb7e 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.5 (Unreleased) +## 1.0.0-beta.1 (2022-03-15) + +- Azure Resource Manager StorageCache client library for Java. This package contains Microsoft Azure SDK for StorageCache Management SDK. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/README.md b/sdk/storagecache/azure-resourcemanager-storagecache/README.md index 2daea77ebac09..c96127f7a44ec 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/README.md +++ b/sdk/storagecache/azure-resourcemanager-storagecache/README.md @@ -2,7 +2,7 @@ Azure Resource Manager StorageCache client library for Java. -This package contains Microsoft Azure SDK for StorageCache Management SDK. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2021-09. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for StorageCache Management SDK. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-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.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md index feb20901928db..d43b2107700e1 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md +++ b/sdk/storagecache/azure-resourcemanager-storagecache/SAMPLE.md @@ -5,6 +5,10 @@ - [Get](#ascoperations_get) +## AscUsages + +- [List](#ascusages_list) + ## Caches - [CreateOrUpdate](#caches_createorupdate) @@ -30,6 +34,7 @@ ## StorageTargetOperation - [Flush](#storagetargetoperation_flush) +- [Invalidate](#storagetargetoperation_invalidate) - [Resume](#storagetargetoperation_resume) - [Suspend](#storagetargetoperation_suspend) @@ -52,7 +57,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/2021-09-01/examples/AscOperations_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/AscOperations_Get.json */ /** * Sample code: AscOperations_Get. @@ -65,6 +70,27 @@ public final class AscOperationsGetSamples { } ``` +### AscUsages_List + +```java +import com.azure.core.util.Context; + +/** Samples for AscUsages List. */ +public final class AscUsagesListSamples { + /* + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/AscResourceUsages_Get.json + */ + /** + * Sample code: AscUsages_List. + * + * @param manager Entry point to StorageCacheManager. + */ + public static void ascUsagesList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + manager.ascUsages().list("eastus", Context.NONE); + } +} +``` + ### Caches_CreateOrUpdate ```java @@ -93,7 +119,7 @@ import java.util.Map; /** Samples for Caches CreateOrUpdate. */ public final class CachesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_CreateOrUpdate_ldap_only.json */ /** * Sample code: Caches_CreateOrUpdate_ldap_only. @@ -153,7 +179,7 @@ public final class CachesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_CreateOrUpdate.json */ /** * Sample code: Caches_CreateOrUpdate. @@ -250,7 +276,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/2021-09-01/examples/Caches_DebugInfo.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_DebugInfo.json */ /** * Sample code: Caches_DebugInfo. @@ -271,7 +297,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/2021-09-01/examples/Caches_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Delete.json */ /** * Sample code: Caches_Delete. @@ -292,7 +318,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/2021-09-01/examples/Caches_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Flush.json */ /** * Sample code: Caches_Flush. @@ -313,7 +339,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/2021-09-01/examples/Caches_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Get.json */ /** * Sample code: Caches_Get. @@ -334,7 +360,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/2021-09-01/examples/Caches_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_List.json */ /** * Sample code: Caches_List. @@ -355,7 +381,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/2021-09-01/examples/Caches_ListByResourceGroup.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_ListByResourceGroup.json */ /** * Sample code: Caches_ListByResourceGroup. @@ -376,7 +402,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/2021-09-01/examples/Caches_Start.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Start.json */ /** * Sample code: Caches_Start. @@ -397,7 +423,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/2021-09-01/examples/Caches_Stop.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Stop.json */ /** * Sample code: Caches_Stop. @@ -433,7 +459,7 @@ import java.util.Map; /** Samples for Caches Update. */ public final class CachesUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Update_ldap_only.json */ /** * Sample code: Caches_Update_ldap_only. @@ -510,7 +536,7 @@ public final class CachesUpdateSamples { } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Update.json */ /** * Sample code: Caches_Update. @@ -608,7 +634,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/2021-09-01/examples/Caches_UpgradeFirmware.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_UpgradeFirmware.json */ /** * Sample code: Caches_UpgradeFirmware. @@ -629,14 +655,14 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Operations_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Operations_List.json */ /** - * Sample code: StorageTargets_List. + * Sample code: Operations_List. * * @param manager Entry point to StorageCacheManager. */ - public static void storageTargetsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + public static void operationsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { manager.operations().list(Context.NONE); } } @@ -650,7 +676,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/2021-09-01/examples/Skus_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Skus_List.json */ /** * Sample code: Skus_List. @@ -671,7 +697,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/2021-09-01/examples/StorageTargets_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Flush.json */ /** * Sample code: StorageTargets_Flush. @@ -684,6 +710,27 @@ public final class StorageTargetOperationFlushSamples { } ``` +### StorageTargetOperation_Invalidate + +```java +import com.azure.core.util.Context; + +/** Samples for StorageTargetOperation Invalidate. */ +public final class StorageTargetOperationInvalidateSamples { + /* + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Invalidate.json + */ + /** + * Sample code: StorageTargets_Invalidate. + * + * @param manager Entry point to StorageCacheManager. + */ + public static void storageTargetsInvalidate(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + manager.storageTargetOperations().invalidate("scgroup", "sc", "st1", Context.NONE); + } +} +``` + ### StorageTargetOperation_Resume ```java @@ -692,7 +739,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/2021-09-01/examples/StorageTargets_Resume.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Resume.json */ /** * Sample code: StorageTargets_Resume. @@ -713,7 +760,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/2021-09-01/examples/StorageTargets_Suspend.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Suspend.json */ /** * Sample code: StorageTargets_Suspend. @@ -738,7 +785,7 @@ import java.util.Arrays; /** Samples for StorageTargets CreateOrUpdate. */ public final class StorageTargetsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate.json */ /** * Sample code: StorageTargets_CreateOrUpdate. @@ -770,7 +817,7 @@ public final class StorageTargetsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json */ /** * Sample code: StorageTargets_CreateOrUpdate_BlobNfs. @@ -794,7 +841,7 @@ public final class StorageTargetsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json */ /** * Sample code: StorageTargets_CreateOrUpdate_NoJunctions. @@ -822,7 +869,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/2021-09-01/examples/StorageTargets_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Delete.json */ /** * Sample code: StorageTargets_Delete. @@ -843,7 +890,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/2021-09-01/examples/StorageTargets_DnsRefresh.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_DnsRefresh.json */ /** * Sample code: Caches_DnsRefresh. @@ -864,7 +911,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/2021-09-01/examples/StorageTargets_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Get.json */ /** * Sample code: StorageTargets_Get. @@ -885,7 +932,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/2021-09-01/examples/StorageTargets_ListByCache.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_ListByCache.json */ /** * Sample code: StorageTargets_List. @@ -906,7 +953,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/2021-09-01/examples/UsageModels_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 e904af25ef1fc..dc21ca028f7a0 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml +++ b/sdk/storagecache/azure-resourcemanager-storagecache/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for StorageCache Management - This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2021-09. + This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. A Storage Cache provides scalable caching service for NAS clients, serving data from either NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to manage Caches. Package tag package-2022-01. 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 412124d0f457a..839653b53b326 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 @@ -8,6 +8,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; @@ -22,6 +23,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.StorageCacheManagementClient; import com.azure.resourcemanager.storagecache.implementation.AscOperationsImpl; +import com.azure.resourcemanager.storagecache.implementation.AscUsagesImpl; import com.azure.resourcemanager.storagecache.implementation.CachesImpl; import com.azure.resourcemanager.storagecache.implementation.OperationsImpl; import com.azure.resourcemanager.storagecache.implementation.SkusImpl; @@ -30,6 +32,7 @@ import com.azure.resourcemanager.storagecache.implementation.StorageTargetsImpl; import com.azure.resourcemanager.storagecache.implementation.UsageModelsImpl; import com.azure.resourcemanager.storagecache.models.AscOperations; +import com.azure.resourcemanager.storagecache.models.AscUsages; import com.azure.resourcemanager.storagecache.models.Caches; import com.azure.resourcemanager.storagecache.models.Operations; import com.azure.resourcemanager.storagecache.models.Skus; @@ -41,6 +44,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** * Entry point to StorageCacheManager. A Storage Cache provides scalable caching service for NAS clients, serving data @@ -56,6 +60,8 @@ public final class StorageCacheManager { private AscOperations ascOperations; + private AscUsages ascUsages; + private Caches caches; private StorageTargets storageTargets; @@ -100,7 +106,7 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -174,9 +180,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -198,7 +206,7 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.storagecache") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -221,11 +229,24 @@ public StorageCacheManager authenticate(TokenCredential credential, AzureProfile List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -269,6 +290,14 @@ public AscOperations ascOperations() { return ascOperations; } + /** @return Resource collection API of AscUsages. */ + public AscUsages ascUsages() { + if (this.ascUsages == null) { + this.ascUsages = new AscUsagesImpl(clientObject.getAscUsages(), this); + } + return ascUsages; + } + /** @return Resource collection API of Caches. */ public Caches caches() { if (this.caches == null) { 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 01fd9d422b8a5..7cc4ad1c1a6d4 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 @@ -34,7 +34,7 @@ public interface AscOperationsClient { * @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) Response getWithResponse(String location, String operationId, Context context); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/AscUsagesClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/AscUsagesClient.java new file mode 100644 index 0000000000000..2534fff639b50 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/AscUsagesClient.java @@ -0,0 +1,39 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.storagecache.fluent.models.ResourceUsageInner; + +/** An instance of this class provides access to all the operations defined in AscUsagesClient. */ +public interface AscUsagesClient { + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @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 quantity used and quota limit for resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @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 quantity used and quota limit for resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); +} 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 b720175d97f87..6d81393110580 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 @@ -20,7 +20,7 @@ public interface CachesClient { * * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -32,7 +32,7 @@ public interface CachesClient { * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -44,7 +44,7 @@ public interface CachesClient { * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -57,7 +57,7 @@ public interface CachesClient { * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -71,7 +71,7 @@ public interface CachesClient { * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName); @@ -86,7 +86,7 @@ public interface CachesClient { * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName, Context context); @@ -142,7 +142,7 @@ public interface CachesClient { * @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) Response getByResourceGroupWithResponse(String resourceGroupName, String cacheName, Context context); @@ -158,7 +158,7 @@ public interface CachesClient { * @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.LONG_RUNNING_OPERATION) SyncPoller, CacheInner> beginCreateOrUpdate( @@ -176,7 +176,7 @@ 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. + * @return the {@link SyncPoller} for polling of a Cache instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CacheInner> beginCreateOrUpdate( @@ -255,7 +255,7 @@ 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. + * @return a Cache instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -270,7 +270,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDebugInfo(String resourceGroupName, String cacheName); @@ -285,7 +285,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDebugInfo(String resourceGroupName, String cacheName, Context context); @@ -327,7 +327,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName); @@ -343,7 +343,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName, Context context); @@ -386,7 +386,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String cacheName); @@ -401,7 +401,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String cacheName, Context context); @@ -442,7 +442,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop(String resourceGroupName, String cacheName); @@ -457,7 +457,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop(String resourceGroupName, String cacheName, Context context); @@ -498,7 +498,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginUpgradeFirmware(String resourceGroupName, String cacheName); @@ -513,7 +513,7 @@ Response updateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginUpgradeFirmware( diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/OperationsClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/OperationsClient.java index 03fc22ebfcfc3..fc221ab60f8d5 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/OperationsClient.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @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 result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @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 result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java index 2f6ee7fd4aa37..ab091bdfca21a 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/SkusClient.java @@ -17,7 +17,8 @@ public interface SkusClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface SkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageCacheManagementClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageCacheManagementClient.java index 78c40c6901627..92dcb4215f968 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageCacheManagementClient.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageCacheManagementClient.java @@ -73,6 +73,13 @@ public interface StorageCacheManagementClient { */ AscOperationsClient getAscOperations(); + /** + * Gets the AscUsagesClient object to access its operations. + * + * @return the AscUsagesClient object. + */ + AscUsagesClient getAscUsages(); + /** * Gets the CachesClient object to access its operations. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java index 7094ce4f6f213..445a444bff6f5 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java @@ -23,7 +23,7 @@ public interface StorageTargetOperationsClient { * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName, String storageTargetName); @@ -40,7 +40,7 @@ public interface StorageTargetOperationsClient { * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginFlush( @@ -87,7 +87,7 @@ SyncPoller, Void> beginFlush( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginSuspend( @@ -104,7 +104,7 @@ SyncPoller, Void> beginSuspend( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginSuspend( @@ -149,7 +149,7 @@ SyncPoller, Void> beginSuspend( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginResume( @@ -166,7 +166,7 @@ SyncPoller, Void> beginResume( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginResume( @@ -200,4 +200,70 @@ SyncPoller, Void> beginResume( */ @ServiceMethod(returns = ReturnType.SINGLE) void resume(String resourceGroupName, String cacheName, String storageTargetName, Context context); + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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> beginInvalidate( + String resourceGroupName, String cacheName, String storageTargetName); + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginInvalidate( + String resourceGroupName, String cacheName, String storageTargetName, Context context); + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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) + void invalidate(String resourceGroupName, String cacheName, String storageTargetName); + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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 invalidate(String resourceGroupName, String cacheName, String storageTargetName, Context context); } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetsClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetsClient.java index 39e0e164d8f66..8f8befb76ca1e 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 @@ -25,7 +25,7 @@ public interface StorageTargetsClient { * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDnsRefresh( @@ -42,7 +42,7 @@ SyncPoller, Void> beginDnsRefresh( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDnsRefresh( @@ -86,7 +86,7 @@ SyncPoller, Void> beginDnsRefresh( * @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 list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCache(String resourceGroupName, String cacheName); @@ -101,7 +101,7 @@ SyncPoller, Void> beginDnsRefresh( * @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 list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByCache(String resourceGroupName, String cacheName, Context context); @@ -121,7 +121,7 @@ SyncPoller, Void> beginDnsRefresh( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -143,7 +143,7 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -231,7 +231,7 @@ SyncPoller, Void> beginDelete( * @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) Response getWithResponse( @@ -249,7 +249,7 @@ Response getWithResponse( * @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 type of the Storage Target. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageTargetInner> beginCreateOrUpdate( @@ -268,7 +268,7 @@ SyncPoller, StorageTargetInner> beginCreateOrUpda * @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 type of the Storage Target. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, StorageTargetInner> beginCreateOrUpdate( diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/UsageModelsClient.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/UsageModelsClient.java index 8e835430212cb..961cd4d0e8992 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/UsageModelsClient.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/UsageModelsClient.java @@ -17,7 +17,8 @@ public interface UsageModelsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface UsageModelsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(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 2cae7cd7ef309..981ce58e68fc8 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 @@ -5,10 +5,8 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.ApiOperationDisplay; import com.azure.resourcemanager.storagecache.models.ApiOperationPropertiesServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -17,8 +15,6 @@ */ @Fluent public final class ApiOperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiOperationInner.class); - /* * 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 511725c343824..741c85bff4d9c 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.ApiOperationPropertiesServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Additional details about an operation. */ @Fluent public final class ApiOperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiOperationProperties.class); - /* * 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 e5f995713cbe5..7d7f4f8295016 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.ErrorResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The status of operation. */ @Fluent public final class AscOperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AscOperationInner.class); - /* * 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 f88b3e32b4d53..7ea2de0a7be0c 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** Additional operation-specific output. */ @Fluent public final class AscOperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AscOperationProperties.class); - /* * 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 e6ad52c0b6a6f..e86db299e5ec8 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.CacheDirectorySettings; import com.azure.resourcemanager.storagecache.models.CacheEncryptionSettings; import com.azure.resourcemanager.storagecache.models.CacheHealth; @@ -17,7 +16,6 @@ import com.azure.resourcemanager.storagecache.models.CacheSku; import com.azure.resourcemanager.storagecache.models.CacheUpgradeStatus; import com.azure.resourcemanager.storagecache.models.ProvisioningStateType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -28,8 +26,6 @@ */ @Fluent public final class CacheInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheInner.class); - /* * The identity of the cache, if configured. */ @@ -301,6 +297,31 @@ public CacheInner withDirectoryServicesSettings(CacheDirectorySettings directory return this; } + /** + * Get the zones property: Availability zones for resources. This field should only contain a single element in the + * array. + * + * @return the zones value. + */ + public List zones() { + return this.innerProperties() == null ? null : this.innerProperties().zones(); + } + + /** + * Set the zones property: Availability zones for resources. This field should only contain a single element in the + * array. + * + * @param zones the zones value to set. + * @return the CacheInner object itself. + */ + public CacheInner withZones(List zones) { + if (this.innerProperties() == null) { + this.innerProperties = new CacheProperties(); + } + this.innerProperties().withZones(zones); + return this; + } + /** * Validates the instance. * diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/CacheProperties.java index f1a43a15f29df..87e53c61cb269 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.CacheDirectorySettings; import com.azure.resourcemanager.storagecache.models.CacheEncryptionSettings; import com.azure.resourcemanager.storagecache.models.CacheHealth; @@ -13,15 +12,12 @@ import com.azure.resourcemanager.storagecache.models.CacheSecuritySettings; import com.azure.resourcemanager.storagecache.models.CacheUpgradeStatus; import com.azure.resourcemanager.storagecache.models.ProvisioningStateType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of the Cache. */ @Fluent public final class CacheProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheProperties.class); - /* * The size of this Cache, in GB. */ @@ -83,6 +79,13 @@ public final class CacheProperties { @JsonProperty(value = "directoryServicesSettings") private CacheDirectorySettings directoryServicesSettings; + /* + * Availability zones for resources. This field should only contain a + * single element in the array. + */ + @JsonProperty(value = "zones") + private List zones; + /** * Get the cacheSizeGB property: The size of this Cache, in GB. * @@ -240,6 +243,28 @@ public CacheProperties withDirectoryServicesSettings(CacheDirectorySettings dire return this; } + /** + * Get the zones property: Availability zones for resources. This field should only contain a single element in the + * array. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: Availability zones for resources. This field should only contain a single element in the + * array. + * + * @param zones the zones value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withZones(List zones) { + this.zones = zones; + return this; + } + /** * Validates the instance. * 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 c7d5ff958b087..455f3b6b9e7a0 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 @@ -5,19 +5,15 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.ResourceSkuCapabilities; import com.azure.resourcemanager.storagecache.models.ResourceSkuLocationInfo; import com.azure.resourcemanager.storagecache.models.Restriction; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A resource SKU. */ @Fluent public final class ResourceSkuInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuInner.class); - /* * 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 new file mode 100644 index 0000000000000..575995032b266 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/ResourceUsageInner.java @@ -0,0 +1,84 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.storagecache.models.ResourceUsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The usage and limit (quota) for a resource. */ +@Immutable +public final class ResourceUsageInner { + /* + * The limit (quota) for this resource. + */ + @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) + private Integer limit; + + /* + * Unit that the limit and usages are expressed in, such as 'Count'. + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /* + * The current usage of this resource. + */ + @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) + private Integer currentValue; + + /* + * Naming information for this resource type. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private ResourceUsageName name; + + /** + * Get the limit property: The limit (quota) for this resource. + * + * @return the limit value. + */ + public Integer limit() { + return this.limit; + } + + /** + * Get the unit property: Unit that the limit and usages are expressed in, such as 'Count'. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Get the currentValue property: The current usage of this resource. + * + * @return the currentValue value. + */ + public Integer currentValue() { + return this.currentValue; + } + + /** + * Get the name property: Naming information for this resource type. + * + * @return the name value. + */ + public ResourceUsageName name() { + return this.name; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() != null) { + name().validate(); + } + } +} diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetInner.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/models/StorageTargetInner.java index c45630fc6acd6..dc09afc7e1ba3 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.BlobNfsTarget; import com.azure.resourcemanager.storagecache.models.ClfsTarget; import com.azure.resourcemanager.storagecache.models.NamespaceJunction; @@ -15,15 +14,12 @@ import com.azure.resourcemanager.storagecache.models.StorageTargetResource; import com.azure.resourcemanager.storagecache.models.StorageTargetType; import com.azure.resourcemanager.storagecache.models.UnknownTarget; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Type of the Storage Target. */ @Fluent public final class StorageTargetInner extends StorageTargetResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageTargetInner.class); - /* * 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 6fe1735958b50..88b99b9ac77e8 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 @@ -14,15 +14,12 @@ import com.azure.resourcemanager.storagecache.models.ProvisioningStateType; import com.azure.resourcemanager.storagecache.models.StorageTargetType; import com.azure.resourcemanager.storagecache.models.UnknownTarget; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of the Storage Target. */ @Fluent public final class StorageTargetProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageTargetProperties.class); - /* * List of Cache namespace junctions to target for namespace associations. */ @@ -232,7 +229,7 @@ public void validate() { junctions().forEach(e -> e.validate()); } if (targetType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property targetType in model StorageTargetProperties")); @@ -250,4 +247,6 @@ public void validate() { blobNfs().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(StorageTargetProperties.class); } 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 f5c93ef00b449..ec8e58489c28a 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.models.UsageModelDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A usage model. */ @Fluent public final class UsageModelInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageModelInner.class); - /* * 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 74a8743e24a0c..f65612b0184d8 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 @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.AscOperationsClient; import com.azure.resourcemanager.storagecache.fluent.models.AscOperationInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in AscOperationsClient. */ public final class AscOperationsClientImpl implements AscOperationsClient { - private final ClientLogger logger = new ClientLogger(AscOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AscOperationsService service; @@ -78,7 +75,8 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location, String operationId) { @@ -125,7 +123,8 @@ private Mono> getWithResponseAsync(String location, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -169,7 +168,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String operationId) { @@ -208,7 +207,7 @@ public AscOperationInner get(String location, String operationId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response getWithResponse(String location, String operationId, Context context) { 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 78b4e413a0641..2f45dc8c0e737 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 @@ -12,10 +12,9 @@ import com.azure.resourcemanager.storagecache.fluent.models.AscOperationInner; import com.azure.resourcemanager.storagecache.models.AscOperation; import com.azure.resourcemanager.storagecache.models.AscOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AscOperationsImpl implements AscOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AscOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AscOperationsImpl.class); private final AscOperationsClient 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 new file mode 100644 index 0000000000000..09d74d525de97 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesClientImpl.java @@ -0,0 +1,313 @@ +// 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.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.storagecache.fluent.AscUsagesClient; +import com.azure.resourcemanager.storagecache.fluent.models.ResourceUsageInner; +import com.azure.resourcemanager.storagecache.models.ResourceUsagesListResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AscUsagesClient. */ +public final class AscUsagesClientImpl implements AscUsagesClient { + /** The proxy service used to perform REST calls. */ + private final AscUsagesService service; + + /** The service client containing this operation class. */ + private final StorageCacheManagementClientImpl client; + + /** + * Initializes an instance of AscUsagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AscUsagesClientImpl(StorageCacheManagementClientImpl client) { + this.service = + RestProxy.create(AscUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for StorageCacheManagementClientAscUsages to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "StorageCacheManageme") + private interface AscUsagesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quantity used and quota limit for resources along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + location, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @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 quantity used and quota limit for resources along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + location, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quantity used and quota limit for resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @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 quantity used and quota limit for resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 quantity used and quota limit for resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @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 quantity used and quota limit for resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink 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. + * @return result of the request to list resource usages along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list resource usages along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesImpl.java new file mode 100644 index 0000000000000..0697febf59d11 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/AscUsagesImpl.java @@ -0,0 +1,45 @@ +// 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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.storagecache.fluent.AscUsagesClient; +import com.azure.resourcemanager.storagecache.fluent.models.ResourceUsageInner; +import com.azure.resourcemanager.storagecache.models.AscUsages; +import com.azure.resourcemanager.storagecache.models.ResourceUsage; + +public final class AscUsagesImpl implements AscUsages { + private static final ClientLogger LOGGER = new ClientLogger(AscUsagesImpl.class); + + private final AscUsagesClient innerClient; + + private final com.azure.resourcemanager.storagecache.StorageCacheManager serviceManager; + + public AscUsagesImpl( + AscUsagesClient innerClient, com.azure.resourcemanager.storagecache.StorageCacheManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return Utils.mapPage(inner, inner1 -> new ResourceUsageImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return Utils.mapPage(inner, inner1 -> new ResourceUsageImpl(inner1, this.manager())); + } + + private AscUsagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.storagecache.StorageCacheManager manager() { + return this.serviceManager; + } +} 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 df562965ec5bc..2f216aedf7b9d 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 @@ -109,6 +109,15 @@ public CacheDirectorySettings directoryServicesSettings() { return this.innerModel().directoryServicesSettings(); } + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -303,4 +312,9 @@ public CacheImpl withDirectoryServicesSettings(CacheDirectorySettings directoryS this.innerModel().withDirectoryServicesSettings(directoryServicesSettings); return this; } + + public CacheImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesClientImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesClientImpl.java index 598dbbb20c389..650d7d3730737 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 @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.storagecache.fluent.CachesClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in CachesClient. */ public final class CachesClientImpl implements CachesClient { - private final ClientLogger logger = new ClientLogger(CachesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CachesService service; @@ -256,7 +253,8 @@ Mono> listByResourceGroupNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -302,7 +300,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -343,7 +342,7 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -357,7 +356,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -370,7 +369,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -384,7 +383,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -398,7 +397,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -450,7 +450,8 @@ private Mono> listByResourceGroupSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -499,7 +500,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -516,7 +517,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -532,7 +533,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -547,7 +548,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -563,7 +564,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String cacheName) { @@ -612,7 +613,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -658,14 +659,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cacheName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, cacheName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -678,7 +680,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -699,7 +701,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName) { @@ -716,7 +718,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String cacheName, Context context) { @@ -732,7 +734,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String cacheName) { @@ -749,7 +751,7 @@ private Mono deleteAsync(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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String cacheName, Context context) { @@ -798,7 +800,7 @@ public void delete(String resourceGroupName, String cacheName, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String cacheName) { @@ -847,7 +849,7 @@ private Mono> getByResourceGroupWithResponseAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -893,7 +895,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String cacheName) { @@ -934,7 +936,7 @@ public CacheInner getByResourceGroup(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. + * @return a Cache instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -953,7 +955,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -1009,7 +1011,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -1061,7 +1063,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of a Cache instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CacheInner> beginCreateOrUpdateAsync( @@ -1070,7 +1072,7 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), CacheInner.class, CacheInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), CacheInner.class, CacheInner.class, this.client.getContext()); } /** @@ -1085,7 +1087,7 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of a Cache instance. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CacheInner> beginCreateOrUpdateAsync( @@ -1110,7 +1112,7 @@ private PollerFlux, CacheInner> beginCreateOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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.LONG_RUNNING_OPERATION) public SyncPoller, CacheInner> beginCreateOrUpdate( @@ -1130,7 +1132,7 @@ public SyncPoller, CacheInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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.LONG_RUNNING_OPERATION) public SyncPoller, CacheInner> beginCreateOrUpdate( @@ -1149,7 +1151,7 @@ public SyncPoller, CacheInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String cacheName, CacheInner cache) { @@ -1167,7 +1169,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String ca * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String cacheName) { @@ -1189,7 +1191,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String ca * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1264,7 +1266,7 @@ public CacheInner createOrUpdate(String resourceGroupName, String cacheName, Cac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1320,7 +1322,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1372,7 +1374,7 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String cacheName, CacheInner cache) { @@ -1396,7 +1398,7 @@ private Mono updateAsync(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. + * @return a Cache instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String cacheName) { @@ -1441,7 +1443,7 @@ 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. + * @return a Cache instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1458,7 +1460,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> debugInfoWithResponseAsync(String resourceGroupName, String cacheName) { @@ -1507,7 +1509,7 @@ private Mono>> debugInfoWithResponseAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> debugInfoWithResponseAsync( @@ -1553,14 +1555,15 @@ private Mono>> debugInfoWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDebugInfoAsync(String resourceGroupName, String cacheName) { Mono>> mono = debugInfoWithResponseAsync(resourceGroupName, cacheName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1573,7 +1576,7 @@ private PollerFlux, Void> beginDebugInfoAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDebugInfoAsync( @@ -1594,7 +1597,7 @@ private PollerFlux, Void> beginDebugInfoAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDebugInfo(String resourceGroupName, String cacheName) { @@ -1611,7 +1614,7 @@ public SyncPoller, Void> beginDebugInfo(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDebugInfo( @@ -1628,7 +1631,7 @@ public SyncPoller, Void> beginDebugInfo( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono debugInfoAsync(String resourceGroupName, String cacheName) { @@ -1645,7 +1648,7 @@ private Mono debugInfoAsync(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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono debugInfoAsync(String resourceGroupName, String cacheName, Context context) { @@ -1695,7 +1698,7 @@ public void debugInfo(String resourceGroupName, String cacheName, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> flushWithResponseAsync(String resourceGroupName, String cacheName) { @@ -1745,7 +1748,7 @@ private Mono>> flushWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> flushWithResponseAsync( @@ -1792,14 +1795,15 @@ private Mono>> flushWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginFlushAsync(String resourceGroupName, String cacheName) { Mono>> mono = flushWithResponseAsync(resourceGroupName, cacheName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1813,7 +1817,7 @@ private PollerFlux, Void> beginFlushAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginFlushAsync( @@ -1835,7 +1839,7 @@ private PollerFlux, Void> beginFlushAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName) { @@ -1853,7 +1857,7 @@ public SyncPoller, Void> beginFlush(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginFlush(String resourceGroupName, String cacheName, Context context) { @@ -1870,7 +1874,7 @@ public SyncPoller, Void> beginFlush(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono flushAsync(String resourceGroupName, String cacheName) { @@ -1888,7 +1892,7 @@ private Mono flushAsync(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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono flushAsync(String resourceGroupName, String cacheName, Context context) { @@ -1939,7 +1943,7 @@ public void flush(String resourceGroupName, String cacheName, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String cacheName) { @@ -1988,7 +1992,7 @@ private Mono>> startWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -2034,14 +2038,15 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync(String resourceGroupName, String cacheName) { Mono>> mono = startWithResponseAsync(resourceGroupName, cacheName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2054,7 +2059,7 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( @@ -2075,7 +2080,7 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart(String resourceGroupName, String cacheName) { @@ -2092,7 +2097,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart(String resourceGroupName, String cacheName, Context context) { @@ -2108,7 +2113,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String cacheName) { @@ -2125,7 +2130,7 @@ private Mono startAsync(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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String cacheName, Context context) { @@ -2174,7 +2179,7 @@ public void start(String resourceGroupName, String cacheName, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync(String resourceGroupName, String cacheName) { @@ -2223,7 +2228,7 @@ private Mono>> stopWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -2269,14 +2274,15 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync(String resourceGroupName, String cacheName) { Mono>> mono = stopWithResponseAsync(resourceGroupName, cacheName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2289,7 +2295,7 @@ private PollerFlux, Void> beginStopAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( @@ -2310,7 +2316,7 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop(String resourceGroupName, String cacheName) { @@ -2327,7 +2333,7 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop(String resourceGroupName, String cacheName, Context context) { @@ -2343,7 +2349,7 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String cacheName) { @@ -2360,7 +2366,7 @@ private Mono stopAsync(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 the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String cacheName, Context context) { @@ -2409,7 +2415,7 @@ public void stop(String resourceGroupName, String cacheName, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> upgradeFirmwareWithResponseAsync( @@ -2459,7 +2465,7 @@ private Mono>> upgradeFirmwareWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> upgradeFirmwareWithResponseAsync( @@ -2505,14 +2511,15 @@ private Mono>> upgradeFirmwareWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUpgradeFirmwareAsync(String resourceGroupName, String cacheName) { Mono>> mono = upgradeFirmwareWithResponseAsync(resourceGroupName, cacheName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2525,7 +2532,7 @@ private PollerFlux, Void> beginUpgradeFirmwareAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginUpgradeFirmwareAsync( @@ -2546,7 +2553,7 @@ private PollerFlux, Void> beginUpgradeFirmwareAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpgradeFirmware(String resourceGroupName, String cacheName) { @@ -2563,7 +2570,7 @@ public SyncPoller, Void> beginUpgradeFirmware(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpgradeFirmware( @@ -2580,7 +2587,7 @@ public SyncPoller, Void> beginUpgradeFirmware( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono upgradeFirmwareAsync(String resourceGroupName, String cacheName) { @@ -2599,7 +2606,7 @@ private Mono upgradeFirmwareAsync(String resourceGroupName, String cacheNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono upgradeFirmwareAsync(String resourceGroupName, String cacheName, Context context) { @@ -2646,7 +2653,8 @@ public void upgradeFirmware(String resourceGroupName, String cacheName, Context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2682,7 +2690,8 @@ private Mono> listNextSinglePageAsync(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2717,7 +2726,8 @@ private Mono> listNextSinglePageAsync(String nextLink, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2754,7 +2764,8 @@ private Mono> listByResourceGroupNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Caches. + * @return result of the request to list Caches along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { 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 d9ce58150474e..ebc07255bde2f 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/CachesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.storagecache.fluent.models.CacheInner; import com.azure.resourcemanager.storagecache.models.Cache; import com.azure.resourcemanager.storagecache.models.Caches; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CachesImpl implements Caches { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CachesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CachesImpl.class); private final CachesClient innerClient; @@ -122,7 +121,7 @@ public void upgradeFirmware(String resourceGroupName, String cacheName, Context public Cache getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -130,7 +129,7 @@ public Cache getById(String id) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); @@ -141,7 +140,7 @@ public Cache getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -149,7 +148,7 @@ public Response getByIdWithResponse(String id, Context context) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); @@ -160,7 +159,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -168,7 +167,7 @@ public void deleteById(String id) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); @@ -179,7 +178,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -187,7 +186,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); 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 dbba355188d65..5b5d530eb9ffb 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.OperationsClient; import com.azure.resourcemanager.storagecache.fluent.models.ApiOperationInner; import com.azure.resourcemanager.storagecache.models.ApiOperationListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,7 @@ private Mono> listSinglePageAsync(Context conte * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +161,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +174,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +189,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +204,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +241,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsImpl.java index f6c98d3a2ba5e..2f71fc5055b21 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.storagecache.fluent.models.ApiOperationInner; import com.azure.resourcemanager.storagecache.models.ApiOperation; import com.azure.resourcemanager.storagecache.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/ResourceUsageImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/ResourceUsageImpl.java new file mode 100644 index 0000000000000..53a548802d860 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/ResourceUsageImpl.java @@ -0,0 +1,45 @@ +// 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.implementation; + +import com.azure.resourcemanager.storagecache.fluent.models.ResourceUsageInner; +import com.azure.resourcemanager.storagecache.models.ResourceUsage; +import com.azure.resourcemanager.storagecache.models.ResourceUsageName; + +public final class ResourceUsageImpl implements ResourceUsage { + private ResourceUsageInner innerObject; + + private final com.azure.resourcemanager.storagecache.StorageCacheManager serviceManager; + + ResourceUsageImpl( + ResourceUsageInner innerObject, com.azure.resourcemanager.storagecache.StorageCacheManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Integer limit() { + return this.innerModel().limit(); + } + + public String unit() { + return this.innerModel().unit(); + } + + public Integer currentValue() { + return this.innerModel().currentValue(); + } + + public ResourceUsageName name() { + return this.innerModel().name(); + } + + public ResourceUsageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.storagecache.StorageCacheManager manager() { + return this.serviceManager; + } +} 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 468fdc7000df4..dc8202b80e0a9 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.SkusClient; import com.azure.resourcemanager.storagecache.fluent.models.ResourceSkuInner; import com.azure.resourcemanager.storagecache.models.ResourceSkusResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in SkusClient. */ public final class SkusClientImpl implements SkusClient { - private final ClientLogger logger = new ClientLogger(SkusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SkusService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -131,7 +129,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -172,7 +171,8 @@ private Mono> listSinglePageAsync(Context contex * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -186,7 +186,8 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -199,7 +200,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -213,7 +215,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -227,7 +230,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Cache SKUs operation. + * @return the response from the List Cache SKUs operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -263,7 +267,8 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response from the List Cache SKUs operation. + * @return the response from the List Cache SKUs operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusImpl.java index b15691f03d37c..4111e50d495b6 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.storagecache.fluent.models.ResourceSkuInner; import com.azure.resourcemanager.storagecache.models.ResourceSku; import com.azure.resourcemanager.storagecache.models.Skus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SkusImpl implements Skus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SkusImpl.class); private final SkusClient innerClient; 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 363b89e756849..79c075fd0e02c 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 @@ -22,6 +22,7 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.storagecache.fluent.AscOperationsClient; +import com.azure.resourcemanager.storagecache.fluent.AscUsagesClient; import com.azure.resourcemanager.storagecache.fluent.CachesClient; import com.azure.resourcemanager.storagecache.fluent.OperationsClient; import com.azure.resourcemanager.storagecache.fluent.SkusClient; @@ -42,8 +43,6 @@ /** Initializes a new instance of the StorageCacheManagementClientImpl type. */ @ServiceClient(builder = StorageCacheManagementClientBuilder.class) public final class StorageCacheManagementClientImpl implements StorageCacheManagementClient { - private final ClientLogger logger = new ClientLogger(StorageCacheManagementClientImpl.class); - /** * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of * the URI for every service call. @@ -168,6 +167,18 @@ public AscOperationsClient getAscOperations() { return this.ascOperations; } + /** The AscUsagesClient object to access its operations. */ + private final AscUsagesClient ascUsages; + + /** + * Gets the AscUsagesClient object to access its operations. + * + * @return the AscUsagesClient object. + */ + public AscUsagesClient getAscUsages() { + return this.ascUsages; + } + /** The CachesClient object to access its operations. */ private final CachesClient caches; @@ -227,11 +238,12 @@ public StorageTargetOperationsClient getStorageTargetOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-09-01"; + this.apiVersion = "2022-01-01"; this.operations = new OperationsClientImpl(this); this.skus = new SkusClientImpl(this); this.usageModels = new UsageModelsClientImpl(this); this.ascOperations = new AscOperationsClientImpl(this); + this.ascUsages = new AscUsagesClientImpl(this); this.caches = new CachesClientImpl(this); this.storageTargets = new StorageTargetsClientImpl(this); this.storageTargetOperations = new StorageTargetOperationsClientImpl(this); @@ -320,7 +332,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -379,4 +391,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(StorageCacheManagementClientImpl.class); } 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 adda4ffb7e95c..b5ed02194f8fc 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 @@ -22,7 +22,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.storagecache.fluent.StorageTargetOperationsClient; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in StorageTargetOperationsClient. */ public final class StorageTargetOperationsClientImpl implements StorageTargetOperationsClient { - private final ClientLogger logger = new ClientLogger(StorageTargetOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final StorageTargetOperationsService service; @@ -106,6 +103,22 @@ Mono>> resume( @PathParam("storageTargetName") String storageTargetName, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches" + + "/{cacheName}/storageTargets/{storageTargetName}/invalidate") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> invalidate( + @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); } /** @@ -119,7 +132,7 @@ Mono>> resume( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> flushWithResponseAsync( @@ -176,7 +189,7 @@ private Mono>> flushWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> flushWithResponseAsync( @@ -229,7 +242,7 @@ private Mono>> flushWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginFlushAsync( @@ -237,7 +250,8 @@ private PollerFlux, Void> beginFlushAsync( Mono>> mono = flushWithResponseAsync(resourceGroupName, cacheName, storageTargetName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -252,7 +266,7 @@ private PollerFlux, Void> beginFlushAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginFlushAsync( @@ -276,7 +290,7 @@ private PollerFlux, Void> beginFlushAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginFlush( @@ -296,7 +310,7 @@ public SyncPoller, Void> beginFlush( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginFlush( @@ -315,7 +329,7 @@ public SyncPoller, Void> beginFlush( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono flushAsync(String resourceGroupName, String cacheName, String storageTargetName) { @@ -336,7 +350,7 @@ private Mono flushAsync(String resourceGroupName, String cacheName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono flushAsync( @@ -391,7 +405,7 @@ public void flush(String resourceGroupName, String cacheName, String storageTarg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> suspendWithResponseAsync( @@ -447,7 +461,7 @@ private Mono>> suspendWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> suspendWithResponseAsync( @@ -499,7 +513,7 @@ private Mono>> suspendWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginSuspendAsync( @@ -508,7 +522,8 @@ private PollerFlux, Void> beginSuspendAsync( suspendWithResponseAsync(resourceGroupName, cacheName, storageTargetName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -522,7 +537,7 @@ private PollerFlux, Void> beginSuspendAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginSuspendAsync( @@ -545,7 +560,7 @@ private PollerFlux, Void> beginSuspendAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSuspend( @@ -564,7 +579,7 @@ public SyncPoller, Void> beginSuspend( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSuspend( @@ -582,7 +597,7 @@ public SyncPoller, Void> beginSuspend( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono suspendAsync(String resourceGroupName, String cacheName, String storageTargetName) { @@ -602,7 +617,7 @@ private Mono suspendAsync(String resourceGroupName, String cacheName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono suspendAsync( @@ -655,7 +670,7 @@ public void suspend(String resourceGroupName, String cacheName, String storageTa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resumeWithResponseAsync( @@ -711,7 +726,7 @@ private Mono>> resumeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> resumeWithResponseAsync( @@ -763,7 +778,7 @@ private Mono>> resumeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResumeAsync( @@ -772,7 +787,8 @@ private PollerFlux, Void> beginResumeAsync( resumeWithResponseAsync(resourceGroupName, cacheName, storageTargetName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -786,7 +802,7 @@ private PollerFlux, Void> beginResumeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginResumeAsync( @@ -809,7 +825,7 @@ private PollerFlux, Void> beginResumeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginResume( @@ -828,7 +844,7 @@ public SyncPoller, Void> beginResume( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginResume( @@ -846,7 +862,7 @@ public SyncPoller, Void> beginResume( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resumeAsync(String resourceGroupName, String cacheName, String storageTargetName) { @@ -866,7 +882,7 @@ private Mono resumeAsync(String resourceGroupName, String cacheName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resumeAsync( @@ -908,4 +924,279 @@ public void resume(String resourceGroupName, String cacheName, String storageTar public void resume(String resourceGroupName, String cacheName, String storageTargetName, Context context) { resumeAsync(resourceGroupName, cacheName, storageTargetName, context).block(); } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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>> invalidateWithResponseAsync( + 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 + .invalidate( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + cacheName, + storageTargetName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> invalidateWithResponseAsync( + 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 + .invalidate( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + cacheName, + storageTargetName, + accept, + context); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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> beginInvalidateAsync( + String resourceGroupName, String cacheName, String storageTargetName) { + Mono>> mono = + invalidateWithResponseAsync(resourceGroupName, cacheName, storageTargetName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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> beginInvalidateAsync( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + invalidateWithResponseAsync(resourceGroupName, cacheName, storageTargetName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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> beginInvalidate( + String resourceGroupName, String cacheName, String storageTargetName) { + return beginInvalidateAsync(resourceGroupName, cacheName, storageTargetName).getSyncPoller(); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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> beginInvalidate( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + return beginInvalidateAsync(resourceGroupName, cacheName, storageTargetName, context).getSyncPoller(); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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 invalidateAsync(String resourceGroupName, String cacheName, String storageTargetName) { + return beginInvalidateAsync(resourceGroupName, cacheName, storageTargetName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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 invalidateAsync( + String resourceGroupName, String cacheName, String storageTargetName, Context context) { + return beginInvalidateAsync(resourceGroupName, cacheName, storageTargetName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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 invalidate(String resourceGroupName, String cacheName, String storageTargetName) { + invalidateAsync(resourceGroupName, cacheName, storageTargetName).block(); + } + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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 invalidate(String resourceGroupName, String cacheName, String storageTargetName, Context context) { + invalidateAsync(resourceGroupName, cacheName, storageTargetName, context).block(); + } } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsImpl.java index a716e8259a4fa..5f5abbfe706e1 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/StorageTargetOperationsImpl.java @@ -8,10 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.StorageTargetOperationsClient; import com.azure.resourcemanager.storagecache.models.StorageTargetOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class StorageTargetOperationsImpl implements StorageTargetOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageTargetOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(StorageTargetOperationsImpl.class); private final StorageTargetOperationsClient innerClient; @@ -48,6 +47,14 @@ public void resume(String resourceGroupName, String cacheName, String storageTar this.serviceClient().resume(resourceGroupName, cacheName, storageTargetName, context); } + public void invalidate(String resourceGroupName, String cacheName, String storageTargetName) { + this.serviceClient().invalidate(resourceGroupName, cacheName, storageTargetName); + } + + public void invalidate(String resourceGroupName, String cacheName, String storageTargetName, Context context) { + this.serviceClient().invalidate(resourceGroupName, cacheName, storageTargetName, context); + } + private StorageTargetOperationsClient serviceClient() { return this.innerClient; } 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 4312c1df79675..93ba6b01d19a8 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 @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.storagecache.fluent.StorageTargetsClient; @@ -42,8 +41,6 @@ /** An instance of this class provides access to all the operations defined in StorageTargetsClient. */ public final class StorageTargetsClientImpl implements StorageTargetsClient { - private final ClientLogger logger = new ClientLogger(StorageTargetsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final StorageTargetsService service; @@ -170,7 +167,7 @@ Mono> listByCacheNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> dnsRefreshWithResponseAsync( @@ -226,7 +223,7 @@ private Mono>> dnsRefreshWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> dnsRefreshWithResponseAsync( @@ -278,7 +275,7 @@ private Mono>> dnsRefreshWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDnsRefreshAsync( @@ -287,7 +284,8 @@ private PollerFlux, Void> beginDnsRefreshAsync( dnsRefreshWithResponseAsync(resourceGroupName, cacheName, storageTargetName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -301,7 +299,7 @@ private PollerFlux, Void> beginDnsRefreshAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDnsRefreshAsync( @@ -324,7 +322,7 @@ private PollerFlux, Void> beginDnsRefreshAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDnsRefresh( @@ -343,7 +341,7 @@ public SyncPoller, Void> beginDnsRefresh( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDnsRefresh( @@ -361,7 +359,7 @@ public SyncPoller, Void> beginDnsRefresh( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono dnsRefreshAsync(String resourceGroupName, String cacheName, String storageTargetName) { @@ -381,7 +379,7 @@ private Mono dnsRefreshAsync(String resourceGroupName, String cacheName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono dnsRefreshAsync( @@ -433,7 +431,7 @@ public void dnsRefresh(String resourceGroupName, String cacheName, String storag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCacheSinglePageAsync( @@ -492,7 +490,7 @@ private Mono> listByCacheSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCacheSinglePageAsync( @@ -547,7 +545,7 @@ private Mono> listByCacheSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCacheAsync(String resourceGroupName, String cacheName) { @@ -566,7 +564,7 @@ private PagedFlux listByCacheAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByCacheAsync( @@ -585,7 +583,7 @@ private PagedFlux listByCacheAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCache(String resourceGroupName, String cacheName) { @@ -602,7 +600,7 @@ public PagedIterable listByCache(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByCache(String resourceGroupName, String cacheName, Context context) { @@ -624,7 +622,7 @@ public PagedIterable listByCache(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -686,7 +684,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -744,7 +742,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -753,7 +751,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, cacheName, storageTargetName, force); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -772,7 +771,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -800,7 +799,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -824,7 +823,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -847,7 +846,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String cacheName, String storageTargetName, String force) { @@ -869,7 +868,7 @@ private Mono deleteAsync(String resourceGroupName, String cacheName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String cacheName, String storageTargetName) { @@ -895,7 +894,7 @@ private Mono deleteAsync(String resourceGroupName, String cacheName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -979,7 +978,7 @@ public void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1035,7 +1034,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -1087,7 +1086,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String cacheName, String storageTargetName) { @@ -1130,7 +1129,7 @@ public StorageTargetInner get(String resourceGroupName, String cacheName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Response getWithResponse( @@ -1150,7 +1149,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -1212,7 +1211,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -1274,7 +1273,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of type of the Storage Target. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageTargetInner> beginCreateOrUpdateAsync( @@ -1284,7 +1283,11 @@ private PollerFlux, StorageTargetInner> beginCrea return this .client .getLroResult( - mono, this.client.getHttpPipeline(), StorageTargetInner.class, StorageTargetInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + StorageTargetInner.class, + StorageTargetInner.class, + this.client.getContext()); } /** @@ -1300,7 +1303,7 @@ private PollerFlux, StorageTargetInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of type of the Storage Target. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, StorageTargetInner> beginCreateOrUpdateAsync( @@ -1330,7 +1333,7 @@ private PollerFlux, StorageTargetInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 type of the Storage Target. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageTargetInner> beginCreateOrUpdate( @@ -1351,7 +1354,7 @@ public SyncPoller, StorageTargetInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 type of the Storage Target. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, StorageTargetInner> beginCreateOrUpdate( @@ -1376,7 +1379,7 @@ public SyncPoller, StorageTargetInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1397,7 +1400,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1421,7 +1424,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -1506,7 +1509,7 @@ public StorageTargetInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCacheNextSinglePageAsync(String nextLink) { @@ -1542,7 +1545,7 @@ private Mono> listByCacheNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Storage Targets. + * @return a list of Storage Targets along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByCacheNextSinglePageAsync(String nextLink, Context context) { 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 8bdbb6423517e..dd676b9436841 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.storagecache.fluent.models.StorageTargetInner; import com.azure.resourcemanager.storagecache.models.StorageTarget; import com.azure.resourcemanager.storagecache.models.StorageTargets; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class StorageTargetsImpl implements StorageTargets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageTargetsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(StorageTargetsImpl.class); private final StorageTargetsClient innerClient; @@ -87,7 +86,7 @@ public Response getWithResponse( public StorageTarget getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -95,14 +94,14 @@ public StorageTarget getById(String id) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); } String storageTargetName = Utils.getValueFromIdByName(id, "storageTargets"); if (storageTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -114,7 +113,7 @@ public StorageTarget getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -122,14 +121,14 @@ public Response getByIdWithResponse(String id, Context context) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); } String storageTargetName = Utils.getValueFromIdByName(id, "storageTargets"); if (storageTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -141,7 +140,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -149,14 +148,14 @@ public void deleteById(String id) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); } String storageTargetName = Utils.getValueFromIdByName(id, "storageTargets"); if (storageTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -169,7 +168,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, String force, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -177,14 +176,14 @@ public void deleteByIdWithResponse(String id, String force, Context context) { } String cacheName = Utils.getValueFromIdByName(id, "caches"); if (cacheName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); } String storageTargetName = Utils.getValueFromIdByName(id, "storageTargets"); if (storageTargetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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 1d85e1a0a4ba5..0b42de7f335af 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.UsageModelsClient; import com.azure.resourcemanager.storagecache.fluent.models.UsageModelInner; import com.azure.resourcemanager.storagecache.models.UsageModelsResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in UsageModelsClient. */ public final class UsageModelsClientImpl implements UsageModelsClient { - private final ClientLogger logger = new ClientLogger(UsageModelsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final UsageModelsService service; @@ -86,7 +83,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -132,7 +130,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -173,7 +172,8 @@ private Mono> listSinglePageAsync(Context context * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -187,7 +187,8 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -200,7 +201,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -214,7 +216,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -228,7 +231,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Cache usage models. + * @return a list of Cache usage models along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -264,7 +267,7 @@ private Mono> listNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Cache usage models. + * @return a list of Cache usage models along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsImpl.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsImpl.java index d763bdc2bd6eb..34e4074b743c3 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsImpl.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/UsageModelsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.storagecache.fluent.models.UsageModelInner; import com.azure.resourcemanager.storagecache.models.UsageModel; import com.azure.resourcemanager.storagecache.models.UsageModels; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class UsageModelsImpl implements UsageModels { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageModelsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(UsageModelsImpl.class); private final UsageModelsClient innerClient; 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 88d6619f04766..195a842581c9c 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The object that represents the operation. */ @Fluent public final class ApiOperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiOperationDisplay.class); - /* * 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 c0b2faaacb737..0c5ce5b6e697a 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 @@ -5,9 +5,7 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.models.ApiOperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Fluent public final class ApiOperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiOperationListResult.class); - /* * 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 bf7189f30c142..752ed641f247c 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Specification of the all the metrics provided for a resource type. */ @Fluent public final class ApiOperationPropertiesServiceSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiOperationPropertiesServiceSpecification.class); - /* * 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 0fcbaa391b685..254cde87c5d4a 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 @@ -30,7 +30,7 @@ public interface AscOperations { * @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}. */ Response getWithResponse(String location, String operationId, Context context); } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscUsages.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscUsages.java new file mode 100644 index 0000000000000..772e28e4f6d66 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/AscUsages.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.storagecache.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of AscUsages. */ +public interface AscUsages { + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @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 quantity used and quota limit for resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * Gets the quantity used and quota limit for resources. + * + * @param location The name of the region to query for usage information. + * @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 quantity used and quota limit for resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); +} 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 ebc59a4b289aa..6677cb2ce2560 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties pertaining to the BlobNfsTarget. */ @Fluent public final class BlobNfsTarget { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BlobNfsTarget.class); - /* * Resource ID of the storage container. */ 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 96b96df253160..cc9a29a450450 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 @@ -140,6 +140,14 @@ public interface Cache { */ CacheDirectorySettings directoryServicesSettings(); + /** + * Gets the zones property: Availability zones for resources. This field should only contain a single element in the + * array. + * + * @return the zones value. + */ + List zones(); + /** * Gets the region of the resource. * @@ -214,7 +222,8 @@ interface WithCreate DefinitionStages.WithNetworkSettings, DefinitionStages.WithEncryptionSettings, DefinitionStages.WithSecuritySettings, - DefinitionStages.WithDirectoryServicesSettings { + DefinitionStages.WithDirectoryServicesSettings, + DefinitionStages.WithZones { /** * Executes the create request. * @@ -320,6 +329,18 @@ interface WithDirectoryServicesSettings { */ WithCreate withDirectoryServicesSettings(CacheDirectorySettings directoryServicesSettings); } + /** The stage of the Cache definition allowing to specify zones. */ + interface WithZones { + /** + * Specifies the zones property: Availability zones for resources. This field should only contain a single + * element in the array.. + * + * @param zones Availability zones for resources. This field should only contain a single element in the + * array. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } } /** * Begins update for the Cache resource. 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 7a394589eb21e..00c7833fda84f 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Active Directory settings used to join a cache to a domain. */ @Fluent public final class CacheActiveDirectorySettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheActiveDirectorySettings.class); - /* * Primary DNS IP address used to resolve the Active Directory domain * controller's fully qualified domain name. @@ -204,25 +201,25 @@ public CacheActiveDirectorySettings withCredentials(CacheActiveDirectorySettings */ public void validate() { if (primaryDnsIpAddress() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property primaryDnsIpAddress in model CacheActiveDirectorySettings")); } if (domainName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property domainName in model CacheActiveDirectorySettings")); } if (domainNetBiosName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property domainNetBiosName in model CacheActiveDirectorySettings")); } if (cacheNetBiosName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property cacheNetBiosName in model CacheActiveDirectorySettings")); @@ -231,4 +228,6 @@ public void validate() { credentials().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(CacheActiveDirectorySettings.class); } 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 938b0d1180041..0056ceaa84beb 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Active Directory admin credentials used to join the HPC Cache to a domain. */ @Fluent public final class CacheActiveDirectorySettingsCredentials { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheActiveDirectorySettingsCredentials.class); - /* * Username of the Active Directory domain administrator. This value is * stored encrypted and not returned on response. @@ -79,16 +76,18 @@ public CacheActiveDirectorySettingsCredentials withPassword(String password) { */ public void validate() { if (username() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property username in model CacheActiveDirectorySettingsCredentials")); } if (password() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property password in model CacheActiveDirectorySettingsCredentials")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CacheActiveDirectorySettingsCredentials.class); } 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 9c8abe0476b13..5bd1be321fd33 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cache Directory Services settings. */ @Fluent public final class CacheDirectorySettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheDirectorySettings.class); - /* * 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 e434531d2b193..8c7ace429465c 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cache encryption settings. */ @Fluent public final class CacheEncryptionSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheEncryptionSettings.class); - /* * 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 db0c80441b2b5..e11a345d9800f 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** An indication of Cache health. Gives more information about health than just that related to provisioning. */ @Fluent public final class CacheHealth { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheHealth.class); - /* * 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 c01baefe54b33..3a8fa4fd63996 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** Cache identity properties. */ @Fluent public class CacheIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheIdentity.class); - /* * 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/CacheNetworkSettings.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/CacheNetworkSettings.java index 843b7ee9dbd83..9781310c059c7 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Cache network settings. */ @Fluent public final class CacheNetworkSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheNetworkSettings.class); - /* * 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 96ede47414762..b373a2c6c576d 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Cache security settings. */ @Fluent public final class CacheSecuritySettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheSecuritySettings.class); - /* * 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 b3115b1017653..deae3344e102e 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** SKU for the Cache. */ @Fluent public final class CacheSku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheSku.class); - /* * SKU name for this Cache. */ 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 703160c003895..5e186d5c11b29 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Properties describing the software upgrade state of the Cache. */ @Immutable public final class CacheUpgradeStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheUpgradeStatus.class); - /* * 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 81da06eb0299a..ed8b5764e7f1c 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Settings for Extended Groups username and group download. */ @Fluent public final class CacheUsernameDownloadSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheUsernameDownloadSettings.class); - /* * 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 6ff095d1180fe..a63336acce864 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** When present, these are the credentials for the secure LDAP connection. */ @Fluent public final class CacheUsernameDownloadSettingsCredentials { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CacheUsernameDownloadSettingsCredentials.class); - /* * 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 82d4eac3bf333..d0b5818c1a24b 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 @@ -15,7 +15,7 @@ public interface Caches { * * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -26,7 +26,7 @@ public interface Caches { * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -37,7 +37,7 @@ public interface Caches { * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -49,7 +49,7 @@ public interface Caches { * @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 result of the request to list Caches. + * @return result of the request to list Caches as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -101,7 +101,7 @@ public interface Caches { * @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}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String cacheName, Context context); @@ -239,7 +239,7 @@ public interface Caches { * @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 getById(String id); @@ -251,7 +251,7 @@ public interface Caches { * @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}. */ Response getByIdWithResponse(String id, Context context); 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 3e1715efd823c..c7eb36531c51a 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.models.CacheInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of the request to list Caches. It contains a list of Caches and a URL link to get the next set of results. */ @Fluent public final class CachesListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CachesListResult.class); - /* * 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 0dc8e69c59b75..484bfc7ad2a84 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties pertaining to the ClfsTarget. */ @Fluent public final class ClfsTarget { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClfsTarget.class); - /* * 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 ad5d3ab2429f1..084937fa8d34d 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Outstanding conditions that will need to be resolved. */ @Immutable public final class Condition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Condition.class); - /* * The time when the condition was raised. */ 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 281d7fcf04e8a..4d8f4b8e1b15d 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes the format of Error response. */ @Fluent public final class ErrorResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ErrorResponse.class); - /* * Error code */ 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 7b11147166152..0a858807888b7 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes a reference to Key Vault Key. */ @Fluent public final class KeyVaultKeyReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyVaultKeyReference.class); - /* * The URL referencing a key encryption key in Key Vault. */ @@ -73,12 +70,12 @@ public KeyVaultKeyReference withSourceVault(KeyVaultKeyReferenceSourceVault sour */ public void validate() { if (keyUrl() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property keyUrl in model KeyVaultKeyReference")); } if (sourceVault() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceVault in model KeyVaultKeyReference")); @@ -86,4 +83,6 @@ public void validate() { sourceVault().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(KeyVaultKeyReference.class); } 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 d51e28a2293dd..6741b94e5cc3f 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Describes a resource Id to source Key Vault. */ @Fluent public final class KeyVaultKeyReferenceSourceVault { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyVaultKeyReferenceSourceVault.class); - /* * Resource Id. */ 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 d4d0648d5d130..58ef1d5eb4518 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Specifications of the Dimension of metrics. */ @Fluent public final class MetricDimension { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricDimension.class); - /* * 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 49f95b2e95048..120e12b197ed8 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Details about operation related to metrics. */ @Fluent public final class MetricSpecification { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecification.class); - /* * 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 9a49c74f9738d..4f3263f5c923a 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A namespace junction. */ @Fluent public final class NamespaceJunction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NamespaceJunction.class); - /* * 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 1c36a62af4378..4df0215487e30 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties pertaining to the Nfs3Target. */ @Fluent public final class Nfs3Target { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Nfs3Target.class); - /* * IP address or host name of an NFSv3 host (e.g., 10.0.44.44). */ 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 f05d0cc2b2e63..4deec03dc9068 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 @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A set of rules describing access policies applied to NFSv3 clients of the cache. */ @Fluent public final class NfsAccessPolicy { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NfsAccessPolicy.class); - /* * Name identifying this policy. Access Policy names are not case * sensitive. @@ -75,16 +72,18 @@ public NfsAccessPolicy withAccessRules(List accessRules) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model NfsAccessPolicy")); } if (accessRules() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property accessRules in model NfsAccessPolicy")); } else { accessRules().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(NfsAccessPolicy.class); } 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 80faaea76116e..4cc254d32d1d3 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Rule to place restrictions on portions of the cache namespace being presented to clients. */ @Fluent public final class NfsAccessRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NfsAccessRule.class); - /* * Scope for this rule. The scope and filter determine which clients match * the rule. @@ -253,14 +250,16 @@ public NfsAccessRule withAnonymousGid(String anonymousGid) { */ public void validate() { if (scope() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property scope in model NfsAccessRule")); } if (access() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property access in model NfsAccessRule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(NfsAccessRule.class); } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Operations.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Operations.java index dfbce29e85830..f03519f2ac0f2 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Operations.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @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 result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @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 result of the request to list Resource Provider operations. + * @return result of the request to list Resource Provider operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } 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 9fe327471400e..c2ac9b886d6e9 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A resource SKU capability. */ @Fluent public final class ResourceSkuCapabilities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuCapabilities.class); - /* * 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 2a8c57f947ce3..1785298f384d7 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Resource SKU location information. */ @Fluent public final class ResourceSkuLocationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuLocationInfo.class); - /* * 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 fc472136198de..30107507d9098 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.models.ResourceSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response from the List Cache SKUs operation. */ @Fluent public final class ResourceSkusResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkusResult.class); - /* * 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/ResourceUsage.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsage.java new file mode 100644 index 0000000000000..1f1589393da03 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsage.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.storagecache.models; + +import com.azure.resourcemanager.storagecache.fluent.models.ResourceUsageInner; + +/** An immutable client-side representation of ResourceUsage. */ +public interface ResourceUsage { + /** + * Gets the limit property: The limit (quota) for this resource. + * + * @return the limit value. + */ + Integer limit(); + + /** + * Gets the unit property: Unit that the limit and usages are expressed in, such as 'Count'. + * + * @return the unit value. + */ + String unit(); + + /** + * Gets the currentValue property: The current usage of this resource. + * + * @return the currentValue value. + */ + Integer currentValue(); + + /** + * Gets the name property: Naming information for this resource type. + * + * @return the name value. + */ + ResourceUsageName name(); + + /** + * Gets the inner com.azure.resourcemanager.storagecache.fluent.models.ResourceUsageInner object. + * + * @return the inner object. + */ + ResourceUsageInner innerModel(); +} 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 new file mode 100644 index 0000000000000..0841c7c3300a8 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsageName.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.storagecache.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Naming information for this resource type. */ +@Fluent +public final class ResourceUsageName { + /* + * Canonical name for this resource type. + */ + @JsonProperty(value = "value") + private String value; + + /* + * Localized name for this resource type. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * Get the value property: Canonical name for this resource type. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Canonical name for this resource type. + * + * @param value the value value to set. + * @return the ResourceUsageName object itself. + */ + public ResourceUsageName withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the localizedValue property: Localized name for this resource type. + * + * @return the localizedValue value. + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localizedValue property: Localized name for this resource type. + * + * @param localizedValue the localizedValue value to set. + * @return the ResourceUsageName object itself. + */ + public ResourceUsageName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 0000000000000..0e4736e2eb340 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/ResourceUsagesListResult.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.storagecache.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.storagecache.fluent.models.ResourceUsageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of the request to list resource usages. It contains a list of resource usages & limits and a URL link to + * get the next set of results. + */ +@Immutable +public final class ResourceUsagesListResult { + /* + * URL to get the next set of resource usage list results if there are any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /* + * 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; + + /** + * Get the nextLink property: URL to get the next set of resource usage list results if there are any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Get the value property: List of usages and limits for resources controlled by the Microsoft.StorageCache resource + * provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} 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 7153ce9668d2c..da03aa0b73e55 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The restrictions preventing this SKU from being used. */ @Fluent public final class Restriction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Restriction.class); - /* * 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/Skus.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Skus.java index d4132db637919..03577b28d6d2d 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Skus.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/Skus.java @@ -14,7 +14,8 @@ public interface Skus { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Skus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of StorageCache.Cache SKUs available to this subscription. + * @return the list of StorageCache.Cache SKUs available to this subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetOperations.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetOperations.java index fb9aae132ae7d..ddb167240c295 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetOperations.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/StorageTargetOperations.java @@ -90,4 +90,33 @@ public interface StorageTargetOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void resume(String resourceGroupName, String cacheName, String storageTargetName, Context context); + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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 invalidate(String resourceGroupName, String cacheName, String storageTargetName); + + /** + * Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the + * next request. + * + * @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. + */ + void invalidate(String resourceGroupName, String cacheName, String storageTargetName, Context context); } 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 f46de4d13646c..014c396c2365e 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 @@ -7,15 +7,11 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Resource used by a Cache. */ @Immutable public class StorageTargetResource extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageTargetResource.class); - /* * Region name string. */ 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 484e0f09154ae..492fffb44e4e0 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 @@ -46,7 +46,7 @@ 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 a list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedIterable}. */ PagedIterable listByCache(String resourceGroupName, String cacheName); @@ -60,7 +60,7 @@ 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 a list of Storage Targets. + * @return a list of Storage Targets as paginated response with {@link PagedIterable}. */ PagedIterable listByCache(String resourceGroupName, String cacheName, Context context); @@ -142,7 +142,7 @@ 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. + * @return type of the Storage Target along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String cacheName, String storageTargetName, Context context); @@ -154,7 +154,7 @@ Response getWithResponse( * @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}. */ StorageTarget getById(String id); @@ -166,7 +166,7 @@ Response getWithResponse( * @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}. */ Response getByIdWithResponse(String id, Context context); 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 54a7d368d078d..d6915c7742665 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.models.StorageTargetInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of Storage Targets. */ @Fluent public final class StorageTargetsResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageTargetsResult.class); - /* * 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 b691a2a649198..42dbdf4b626d2 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 @@ -5,8 +5,6 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** Properties pertaining to the UnknownTarget. */ @Fluent public final class UnknownTarget { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UnknownTarget.class); - /* * 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 758097daa1702..9cc5a45281d35 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Localized information describing this usage model. */ @Fluent public final class UsageModelDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageModelDisplay.class); - /* * String to display for this usage model. */ diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModels.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModels.java index 8b1d344762a45..12362741154d0 100644 --- a/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModels.java +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/models/UsageModels.java @@ -14,7 +14,8 @@ public interface UsageModels { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface UsageModels { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cache Usage Models available to this subscription. + * @return the list of Cache Usage Models available to this subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } 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 927fe0671d4d8..a6b26e8e9d205 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 @@ -5,17 +5,13 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.storagecache.fluent.models.UsageModelInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of Cache usage models. */ @Fluent public final class UsageModelsResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageModelsResult.class); - /* * 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 17f2550463a47..1c76541ab3915 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.storagecache.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The UserAssignedIdentitiesValue model. */ @Immutable public final class UserAssignedIdentitiesValue { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentitiesValue.class); - /* * The principal ID of the user-assigned identity. */ 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 e4ef998f00016..24a96dd052c61 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/2021-09-01/examples/AscOperations_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 new file mode 100644 index 0000000000000..e8685c8a8df88 --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/AscUsagesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.storagecache.generated; + +import com.azure.core.util.Context; + +/** Samples for AscUsages List. */ +public final class AscUsagesListSamples { + /* + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/AscResourceUsages_Get.json + */ + /** + * Sample code: AscUsages_List. + * + * @param manager Entry point to StorageCacheManager. + */ + public static void ascUsagesList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + manager.ascUsages().list("eastus", Context.NONE); + } +} 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 95ea28da31405..caf85990b5cf3 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 @@ -29,7 +29,7 @@ /** Samples for Caches CreateOrUpdate. */ public final class CachesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_CreateOrUpdate_ldap_only.json */ /** * Sample code: Caches_CreateOrUpdate_ldap_only. @@ -89,7 +89,7 @@ public static void cachesCreateOrUpdateLdapOnly( } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_CreateOrUpdate.json */ /** * Sample code: Caches_CreateOrUpdate. 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 3cd7d2cb482fc..b377c3704f1c6 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/2021-09-01/examples/Caches_DebugInfo.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 2db213d8c0efc..808885866e50d 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/2021-09-01/examples/Caches_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 6baacd93aa9cc..a16c507ccf54f 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/2021-09-01/examples/Caches_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 93384c05989ba..c810dfcdd7fb8 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/2021-09-01/examples/Caches_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 13f71bb57a2cb..1a5209526b952 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/2021-09-01/examples/Caches_ListByResourceGroup.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 4e1f2d52c76f3..50ac2e0244618 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/2021-09-01/examples/Caches_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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/CachesStartSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStartSamples.java index 511eea6b4c79a..e54d4916ed9ec 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/2021-09-01/examples/Caches_Start.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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/CachesStopSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/CachesStopSamples.java index 74609712696f2..f4fd6b5581f9d 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/2021-09-01/examples/Caches_Stop.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 0396e25e32128..86f8680dcc0c8 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 @@ -24,7 +24,7 @@ /** Samples for Caches Update. */ public final class CachesUpdateSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update_ldap_only.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Caches_Update_ldap_only.json */ /** * Sample code: Caches_Update_ldap_only. @@ -101,7 +101,7 @@ public static void cachesUpdateLdapOnly(com.azure.resourcemanager.storagecache.S } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Caches_Update.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 221b638145026..58356fd8157b6 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/2021-09-01/examples/Caches_UpgradeFirmware.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 1ced474b2d0db..cfd1251c65647 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,14 +9,14 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/Operations_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/Operations_List.json */ /** - * Sample code: StorageTargets_List. + * Sample code: Operations_List. * * @param manager Entry point to StorageCacheManager. */ - public static void storageTargetsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + public static void operationsList(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { manager.operations().list(Context.NONE); } } diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/SkusListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/SkusListSamples.java index 84caff265ea58..088407a9e7253 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/2021-09-01/examples/Skus_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 6194821d44c43..649db49afd094 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/2021-09-01/examples/StorageTargets_Flush.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 new file mode 100644 index 0000000000000..5a1bcd3d2f5fb --- /dev/null +++ b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationInvalidateSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.storagecache.generated; + +import com.azure.core.util.Context; + +/** Samples for StorageTargetOperation Invalidate. */ +public final class StorageTargetOperationInvalidateSamples { + /* + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_Invalidate.json + */ + /** + * Sample code: StorageTargets_Invalidate. + * + * @param manager Entry point to StorageCacheManager. + */ + public static void storageTargetsInvalidate(com.azure.resourcemanager.storagecache.StorageCacheManager manager) { + manager.storageTargetOperations().invalidate("scgroup", "sc", "st1", Context.NONE); + } +} diff --git a/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationResumeSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/StorageTargetOperationResumeSamples.java index d60b0831fe117..b0c94a72825a7 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/2021-09-01/examples/StorageTargets_Resume.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 1e328570a55ff..48ed70a87a2ee 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/2021-09-01/examples/StorageTargets_Suspend.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 eb1ca0a83c5c7..d874ef45863aa 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/2021-09-01/examples/StorageTargets_CreateOrUpdate.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate.json */ /** * Sample code: StorageTargets_CreateOrUpdate. @@ -45,7 +45,7 @@ public static void storageTargetsCreateOrUpdate( } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate_BlobNfs.json */ /** * Sample code: StorageTargets_CreateOrUpdate_BlobNfs. @@ -69,7 +69,7 @@ public static void storageTargetsCreateOrUpdateBlobNfs( } /* - * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2021-09-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/StorageTargets_CreateOrUpdate_NoJunctions.json */ /** * Sample code: StorageTargets_CreateOrUpdate_NoJunctions. 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 ed18c18702fc0..7edaa4dab5068 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/2021-09-01/examples/StorageTargets_Delete.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 8ac93ad3262c4..6eb9c279ec82d 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/2021-09-01/examples/StorageTargets_DnsRefresh.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 bf8bc38da2281..36d9ae4041ad8 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/2021-09-01/examples/StorageTargets_Get.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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 e7f346ded2b58..de87a03171c02 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/2021-09-01/examples/StorageTargets_ListByCache.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-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/UsageModelsListSamples.java b/sdk/storagecache/azure-resourcemanager-storagecache/src/samples/java/com/azure/resourcemanager/storagecache/generated/UsageModelsListSamples.java index cb418eee19d3c..8f24c148ce1e1 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/2021-09-01/examples/UsageModels_List.json + * x-ms-original-file: specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2022-01-01/examples/UsageModels_List.json */ /** * Sample code: UsageModels_List.