diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index 2f83f7a5e4b93..b8f1cb510128d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,14 +1,389 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-07-19) + +- Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-2024-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +#### `models.ServiceSpecification` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MetricSpecification` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationDisplay` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.Volume$Update` was modified + +* `withProtocolTypes(java.util.List)` was added + +#### `models.VolumePatchPropertiesExportPolicy` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumePatch` was modified + +* `id()` was added +* `type()` was added +* `name()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `protocolTypes()` was added +* `withProtocolTypes(java.util.List)` was added + +#### `models.KeyVaultProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.BreakFileLocksRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.SnapshotPolicyPatch` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.HourlySchedule` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.ActiveDirectory` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.BackupVaultPatch` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.SnapshotPoliciesList` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.PlacementKeyValuePairs` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeQuotaRulesList` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeGroupMetadata` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.ManagedServiceIdentity` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MonthlySchedule` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.LogSpecification` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.BackupPoliciesList` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.VolumePropertiesDataProtection` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.ResourceNameAvailabilityRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.BackupsMigrationRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.GetGroupIdListForLdapUserRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.VolumeRelocationProperties` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.EncryptionIdentity` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.DailySchedule` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.SnapshotsList` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.RelocateVolumeRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeGroupList` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeSnapshotProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NicInfo` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumePatchPropertiesDataProtection` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.VolumeBackups` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.OperationListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.ExportPolicyRule` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.VolumePropertiesExportPolicy` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.BackupsList` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.BackupVaultsList` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.BackupPolicyPatch` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `id()` was added +* `name()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `type()` was added + +#### `models.UpdateNetworkSiblingSetRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.ReplicationObject` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.BackupRestoreFiles` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.NetAppAccountPatch` was modified + +* `name()` was added +* `id()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `type()` was added + +#### `models.SubvolumePatchRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeRevert` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.FilePathAvailabilityRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.AuthorizeRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.RegionInfoAvailabilityZoneMappingsItem` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.BreakReplicationRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.QueryNetworkSiblingSetRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.WeeklySchedule` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.CapacityPoolPatch` was modified + +* `id()` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `type()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `name()` was added + +#### `models.SnapshotRestoreFiles` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.LdapSearchScopeOpt` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeGroupVolumeProperties` was modified + +* `id()` was added +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added +* `type()` was added + +#### `models.BackupPatch` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.Dimension` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.Replication` was modified + +* `replicationId()` was added + +#### `models.SubscriptionQuotaItemList` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.RegionInfosList` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.QuotaAvailabilityRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.VolumeQuotaRulePatch` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeList` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.CapacityPoolList` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.SubvolumesList` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.UserAssignedIdentity` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.AccountEncryption` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VolumeBackupProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.ListReplications` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.PoolChangeRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.NetAppAccountList` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added -### Bugs Fixed +#### `models.ReestablishReplicationRequest` was modified -### Other Changes +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added ## 1.2.0 (2024-05-30) diff --git a/sdk/netapp/azure-resourcemanager-netapp/README.md b/sdk/netapp/azure-resourcemanager-netapp/README.md index 29a44533317de..8f9fdf12f777c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/README.md +++ b/sdk/netapp/azure-resourcemanager-netapp/README.md @@ -2,7 +2,7 @@ Azure Resource Manager NetAppFiles client library for Java. -This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2023-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-2024-03. 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-netapp - 1.2.0 + 1.3.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. +Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. -- `AZURE_CLIENT_ID` for Azure client ID. -- `AZURE_TENANT_ID` for Azure tenant ID. -- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. +Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. - -With above configuration, `azure` client can be authenticated using the following code: +Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -104,6 +100,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md index 0b28a4a839f23..55311557d28c1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -157,7 +157,8 @@ import java.util.Arrays; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -169,7 +170,8 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -205,7 +207,8 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -226,7 +229,8 @@ public final class AccountsDeleteSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -247,7 +251,8 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -268,7 +273,8 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -289,7 +295,8 @@ public final class AccountsListByResourceGroupSamples { */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_RenewCredentials.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. @@ -314,7 +321,8 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -350,7 +358,8 @@ public final class AccountsUpdateSamples { */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -379,7 +388,8 @@ public final class BackupPoliciesCreateSamples { */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_Delete. @@ -401,7 +411,8 @@ public final class BackupPoliciesDeleteSamples { */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. @@ -423,7 +434,8 @@ public final class BackupPoliciesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_List. @@ -446,7 +458,8 @@ import com.azure.resourcemanager.netapp.models.BackupPolicy; */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. @@ -475,7 +488,8 @@ public final class BackupPoliciesUpdateSamples { */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Create.json */ /** * Sample code: BackupVault_CreateOrUpdate. @@ -500,7 +514,8 @@ public final class BackupVaultsCreateOrUpdateSamples { */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Delete.json */ /** * Sample code: BackupVaults_Delete. @@ -521,7 +536,8 @@ public final class BackupVaultsDeleteSamples { */ public final class BackupVaultsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Get.json */ /** * Sample code: BackupVaults_Get. @@ -542,7 +558,8 @@ public final class BackupVaultsGetSamples { */ public final class BackupVaultsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_List.json */ /** * Sample code: BackupVaults_List. @@ -567,7 +584,8 @@ import java.util.Map; */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Update.json */ /** * Sample code: BackupVaults_Update. @@ -603,7 +621,9 @@ public final class BackupVaultsUpdateSamples { */ public final class BackupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Create. + * json */ /** * Sample code: BackupsUnderBackupVault_Create. @@ -630,7 +650,9 @@ public final class BackupsCreateSamples { */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Delete. + * json */ /** * Sample code: BackupsUnderBackupVault_Delete. @@ -652,7 +674,9 @@ public final class BackupsDeleteSamples { */ public final class BackupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Get. + * json */ /** * Sample code: BackupsUnderBackupVault_Get. @@ -674,7 +698,8 @@ public final class BackupsGetSamples { */ public final class BackupsGetLatestStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_LatestBackupStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestBackupStatus.json */ /** * Sample code: Volumes_BackupStatus. @@ -696,7 +721,9 @@ public final class BackupsGetLatestStatusSamples { */ public final class BackupsGetVolumeLatestRestoreStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_LatestRestoreStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestRestoreStatus. + * json */ /** * Sample code: Volumes_RestoreStatus. @@ -719,7 +746,9 @@ public final class BackupsGetVolumeLatestRestoreStatusSamples { */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_List. + * json */ /** * Sample code: Backups_List. @@ -742,7 +771,9 @@ import com.azure.resourcemanager.netapp.models.Backup; */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Update. + * json */ /** * Sample code: BackupsUnderBackupVault_Update. @@ -768,7 +799,9 @@ import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; */ public final class BackupsUnderAccountMigrateBackupsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderAccount_Migrate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderAccount_Migrate. + * json */ /** * Sample code: BackupsUnderAccount_Migrate. @@ -795,7 +828,8 @@ import java.util.Arrays; */ public final class BackupsUnderBackupVaultRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/ + * BackupsUnderBackupVault_SingleFileRestore.json */ /** * Sample code: Backups_SingleFileRestore. @@ -823,7 +857,8 @@ import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; */ public final class BackupsUnderVolumeMigrateBackupsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderVolume_Migrate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderVolume_Migrate.json */ /** * Sample code: BackupsUnderVolume_Migrate. @@ -849,7 +884,8 @@ import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckFilePathAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -878,7 +914,8 @@ import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckNameAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -907,7 +944,8 @@ import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckQuotaAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -935,7 +973,8 @@ import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/NetworkSiblingSet_Query.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -961,7 +1000,8 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfo.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfo.json */ /** * Sample code: RegionInfo_Query. @@ -985,7 +1025,8 @@ import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/NetworkSiblingSet_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -1012,7 +1053,8 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/QuotaLimits_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -1034,7 +1076,8 @@ public final class NetAppResourceQuotaLimitsGetSamples { */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/QuotaLimits_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. @@ -1055,7 +1098,8 @@ public final class NetAppResourceQuotaLimitsListSamples { */ public final class NetAppResourceRegionInfosGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfos_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_Get.json */ /** * Sample code: RegionInfos_Get. @@ -1076,7 +1120,8 @@ public final class NetAppResourceRegionInfosGetSamples { */ public final class NetAppResourceRegionInfosListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfos_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_List.json */ /** * Sample code: RegionInfos_List. @@ -1097,7 +1142,8 @@ public final class NetAppResourceRegionInfosListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/OperationList.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/OperationList.json */ /** * Sample code: OperationList. @@ -1121,7 +1167,8 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -1149,7 +1196,8 @@ public final class PoolsCreateOrUpdateSamples { */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -1170,7 +1218,8 @@ public final class PoolsDeleteSamples { */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -1191,7 +1240,8 @@ public final class PoolsGetSamples { */ public final class PoolsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_List.json */ /** * Sample code: Pools_List. @@ -1214,7 +1264,8 @@ import com.azure.resourcemanager.netapp.models.CapacityPool; */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -1242,7 +1293,8 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -1274,7 +1326,8 @@ public final class SnapshotPoliciesCreateSamples { */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -1296,7 +1349,8 @@ public final class SnapshotPoliciesDeleteSamples { */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -1318,7 +1372,8 @@ public final class SnapshotPoliciesGetSamples { */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. @@ -1339,7 +1394,9 @@ public final class SnapshotPoliciesListSamples { */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_ListVolumes. + * json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -1367,7 +1424,8 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -1399,7 +1457,8 @@ public final class SnapshotPoliciesUpdateSamples { */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -1424,7 +1483,8 @@ public final class SnapshotsCreateSamples { */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -1446,7 +1506,8 @@ public final class SnapshotsDeleteSamples { */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -1468,7 +1529,8 @@ public final class SnapshotsGetSamples { */ public final class SnapshotsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_List.json */ /** * Sample code: Snapshots_List. @@ -1492,7 +1554,9 @@ import java.util.Arrays; */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_SingleFileRestore.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_SingleFileRestore. + * json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -1520,7 +1584,8 @@ import java.io.IOException; */ public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. @@ -1545,7 +1610,8 @@ public final class SnapshotsUpdateSamples { */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -1570,7 +1636,8 @@ public final class SubvolumesCreateSamples { */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -1592,7 +1659,8 @@ public final class SubvolumesDeleteSamples { */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -1614,7 +1682,8 @@ public final class SubvolumesGetSamples { */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Metadata.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -1636,7 +1705,8 @@ public final class SubvolumesGetMetadataSamples { */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. @@ -1659,7 +1729,8 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. @@ -1691,7 +1762,9 @@ import java.util.Arrays; */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Create_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_SapHana. + * json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -1851,7 +1924,8 @@ public final class VolumeGroupsCreateSamples { } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Create_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -2204,7 +2278,8 @@ public final class VolumeGroupsCreateSamples { */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -2225,7 +2300,8 @@ public final class VolumeGroupsDeleteSamples { */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Get_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -2237,7 +2313,8 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Get_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. @@ -2258,7 +2335,8 @@ public final class VolumeGroupsGetSamples { */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_List_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -2270,7 +2348,8 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_List_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. @@ -2293,7 +2372,8 @@ import com.azure.resourcemanager.netapp.models.Type; */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -2321,7 +2401,8 @@ public final class VolumeQuotaRulesCreateSamples { */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -2343,7 +2424,8 @@ public final class VolumeQuotaRulesDeleteSamples { */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -2366,7 +2448,8 @@ public final class VolumeQuotaRulesGetSamples { */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -2390,7 +2473,8 @@ import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -2417,7 +2501,9 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_AuthorizeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_AuthorizeReplication. + * json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -2444,7 +2530,8 @@ import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_BreakFileLocks.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -2470,7 +2557,8 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_BreakReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -2495,7 +2583,8 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -2525,7 +2614,8 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -2546,7 +2636,8 @@ public final class VolumesDeleteSamples { */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_DeleteReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -2567,7 +2658,8 @@ public final class VolumesDeleteReplicationSamples { */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_FinalizeRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. @@ -2588,7 +2680,8 @@ public final class VolumesFinalizeRelocationSamples { */ public final class VolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -2609,7 +2702,8 @@ public final class VolumesGetSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -2632,7 +2726,8 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/GroupIdListForLDAPUser.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -2655,7 +2750,8 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ListReplications.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. @@ -2678,7 +2774,8 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_PoolChange.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -2702,7 +2799,8 @@ public final class VolumesPoolChangeSamples { */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/ + * Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -2724,7 +2822,9 @@ public final class VolumesPopulateAvailabilityZoneSamples { */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReInitializeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReInitializeReplication + * .json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -2748,7 +2848,9 @@ import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReestablishReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReestablishReplication. + * json */ /** * Sample code: Volumes_ReestablishReplication. @@ -2775,7 +2877,8 @@ import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Relocate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -2798,7 +2901,8 @@ public final class VolumesRelocateSamples { */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReplicationStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -2820,7 +2924,8 @@ public final class VolumesReplicationStatusSamples { */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ResetCifsPassword.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. @@ -2841,7 +2946,8 @@ public final class VolumesResetCifsPasswordSamples { */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ResyncReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -2864,7 +2970,8 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; */ public final class VolumesRevertSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Revert.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -2888,7 +2995,8 @@ public final class VolumesRevertSamples { */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_RevertRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. @@ -2911,7 +3019,8 @@ import com.azure.resourcemanager.netapp.models.Volume; */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index d5ae6fbff3459..c3cefb84bb990 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/pom.xml +++ b/sdk/netapp/azure-resourcemanager-netapp/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for NetAppFiles Management - This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-netapp-2023-11-01. + This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-2024-03. https://github.com/Azure/azure-sdk-for-java @@ -48,6 +48,11 @@ true + + com.azure + azure-json + 1.1.0 + com.azure azure-core diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java index fe756ef550636..d5825f0c11d62 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java @@ -273,7 +273,7 @@ public NetAppFilesManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.netapp") .append("/") - .append("2.0.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java index 710f5eea907df..a0a0deb442f18 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java @@ -5,38 +5,38 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * NetApp account properties. */ @Fluent -public final class AccountProperties { +public final class AccountProperties implements JsonSerializable { /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * Active Directories */ - @JsonProperty(value = "activeDirectories") private List activeDirectories; /* * Encryption settings */ - @JsonProperty(value = "encryption") private AccountEncryption encryption; /* * Shows the status of disableShowmount for all volumes under the subscription, null equals false */ - @JsonProperty(value = "disableShowmount", access = JsonProperty.Access.WRITE_ONLY) private Boolean disableShowmount; /** @@ -117,4 +117,50 @@ public void validate() { encryption().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("activeDirectories", this.activeDirectories, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccountProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccountProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AccountProperties. + */ + public static AccountProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccountProperties deserializedAccountProperties = new AccountProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedAccountProperties.provisioningState = reader.getString(); + } else if ("activeDirectories".equals(fieldName)) { + List activeDirectories + = reader.readArray(reader1 -> ActiveDirectory.fromJson(reader1)); + deserializedAccountProperties.activeDirectories = activeDirectories; + } else if ("encryption".equals(fieldName)) { + deserializedAccountProperties.encryption = AccountEncryption.fromJson(reader); + } else if ("disableShowmount".equals(fieldName)) { + deserializedAccountProperties.disableShowmount = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAccountProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java index b5c23c061dadb..4cc764289da2f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java @@ -8,8 +8,11 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** @@ -20,15 +23,28 @@ public final class BackupInner extends ProxyResource { /* * Backup Properties */ - @JsonProperty(value = "properties", required = true) private BackupProperties innerProperties = new BackupProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of BackupInner class. */ @@ -54,9 +70,37 @@ public SystemData systemData() { } /** - * Get the backupId property: backupId + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. * - * UUID v4 used to identify the Backup. + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the backupId property: UUID v4 used to identify the Backup. * * @return the backupId value. */ @@ -65,9 +109,7 @@ public String backupId() { } /** - * Get the creationDate property: creationDate - * - * The creation date of the backup. + * Get the creationDate property: The creation date of the backup. * * @return the creationDate value. */ @@ -117,9 +159,7 @@ public BackupInner withLabel(String label) { } /** - * Get the backupType property: backupType - * - * Type of backup Manual or Scheduled. + * Get the backupType property: Type of backup Manual or Scheduled. * * @return the backupType value. */ @@ -231,4 +271,49 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(BackupInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupInner. + */ + public static BackupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupInner deserializedBackupInner = new BackupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBackupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBackupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBackupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBackupInner.innerProperties = BackupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBackupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java index c05f14b104ba0..7c11e10604587 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Backup patch properties. */ @Fluent -public final class BackupPatchProperties { +public final class BackupPatchProperties implements JsonSerializable { /* * Label for backup */ - @JsonProperty(value = "label") private String label; /** @@ -51,4 +54,40 @@ public BackupPatchProperties withLabel(String label) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("label", this.label); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupPatchProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupPatchProperties. + */ + public static BackupPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupPatchProperties deserializedBackupPatchProperties = new BackupPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("label".equals(fieldName)) { + deserializedBackupPatchProperties.label = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupPatchProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java index a625c63f54805..24d7180e91ded 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java @@ -8,8 +8,11 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.VolumeBackups; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -21,21 +24,33 @@ public final class BackupPolicyInner extends Resource { /* * A unique read-only string that changes whenever the resource is updated. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; /* * Backup policy Properties */ - @JsonProperty(value = "properties", required = true) private BackupPolicyProperties innerProperties = new BackupPolicyProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of BackupPolicyInner class. */ @@ -69,6 +84,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -231,4 +276,58 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(BackupPolicyInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupPolicyInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupPolicyInner. + */ + public static BackupPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupPolicyInner deserializedBackupPolicyInner = new BackupPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBackupPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBackupPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBackupPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedBackupPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedBackupPolicyInner.innerProperties = BackupPolicyProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedBackupPolicyInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedBackupPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupPolicyInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java index acff33d57098c..9decde0bd19b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java @@ -5,61 +5,57 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.VolumeBackups; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Backup policy properties. */ @Fluent -public final class BackupPolicyProperties { +public final class BackupPolicyProperties implements JsonSerializable { /* * Backup Policy Resource ID */ - @JsonProperty(value = "backupPolicyId", access = JsonProperty.Access.WRITE_ONLY) private String backupPolicyId; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * Daily backups count to keep */ - @JsonProperty(value = "dailyBackupsToKeep") private Integer dailyBackupsToKeep; /* * Weekly backups count to keep */ - @JsonProperty(value = "weeklyBackupsToKeep") private Integer weeklyBackupsToKeep; /* * Monthly backups count to keep */ - @JsonProperty(value = "monthlyBackupsToKeep") private Integer monthlyBackupsToKeep; /* * Volumes using current backup policy */ - @JsonProperty(value = "volumesAssigned", access = JsonProperty.Access.WRITE_ONLY) private Integer volumesAssigned; /* * The property to decide policy is enabled or not */ - @JsonProperty(value = "enabled") private Boolean enabled; /* * A list of volumes assigned to this policy */ - @JsonProperty(value = "volumeBackups", access = JsonProperty.Access.WRITE_ONLY) private List volumeBackups; /** @@ -194,4 +190,58 @@ public void validate() { volumeBackups().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("dailyBackupsToKeep", this.dailyBackupsToKeep); + jsonWriter.writeNumberField("weeklyBackupsToKeep", this.weeklyBackupsToKeep); + jsonWriter.writeNumberField("monthlyBackupsToKeep", this.monthlyBackupsToKeep); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupPolicyProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupPolicyProperties. + */ + public static BackupPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupPolicyProperties deserializedBackupPolicyProperties = new BackupPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backupPolicyId".equals(fieldName)) { + deserializedBackupPolicyProperties.backupPolicyId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedBackupPolicyProperties.provisioningState = reader.getString(); + } else if ("dailyBackupsToKeep".equals(fieldName)) { + deserializedBackupPolicyProperties.dailyBackupsToKeep = reader.getNullable(JsonReader::getInt); + } else if ("weeklyBackupsToKeep".equals(fieldName)) { + deserializedBackupPolicyProperties.weeklyBackupsToKeep = reader.getNullable(JsonReader::getInt); + } else if ("monthlyBackupsToKeep".equals(fieldName)) { + deserializedBackupPolicyProperties.monthlyBackupsToKeep = reader.getNullable(JsonReader::getInt); + } else if ("volumesAssigned".equals(fieldName)) { + deserializedBackupPolicyProperties.volumesAssigned = reader.getNullable(JsonReader::getInt); + } else if ("enabled".equals(fieldName)) { + deserializedBackupPolicyProperties.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("volumeBackups".equals(fieldName)) { + List volumeBackups = reader.readArray(reader1 -> VolumeBackups.fromJson(reader1)); + deserializedBackupPolicyProperties.volumeBackups = volumeBackups; + } else { + reader.skipChildren(); + } + } + + return deserializedBackupPolicyProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java index 74ae0a6446363..38ff6c3df2214 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java @@ -5,86 +5,75 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.BackupType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * Backup properties. */ @Fluent -public final class BackupProperties { +public final class BackupProperties implements JsonSerializable { /* - * backupId - * * UUID v4 used to identify the Backup */ - @JsonProperty(value = "backupId", access = JsonProperty.Access.WRITE_ONLY) private String backupId; /* - * creationDate - * * The creation date of the backup */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * Size of backup in bytes */ - @JsonProperty(value = "size", access = JsonProperty.Access.WRITE_ONLY) private Long size; /* * Label for backup */ - @JsonProperty(value = "label") private String label; /* - * backupType - * * Type of backup Manual or Scheduled */ - @JsonProperty(value = "backupType", access = JsonProperty.Access.WRITE_ONLY) private BackupType backupType; /* * Failure reason */ - @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY) private String failureReason; /* * ResourceId used to identify the Volume */ - @JsonProperty(value = "volumeResourceId", required = true) private String volumeResourceId; /* - * Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups + * Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for + * manual backups */ - @JsonProperty(value = "useExistingSnapshot") private Boolean useExistingSnapshot; /* * The name of the snapshot */ - @JsonProperty(value = "snapshotName") private String snapshotName; /* * ResourceId used to identify the backup policy */ - @JsonProperty(value = "backupPolicyResourceId", access = JsonProperty.Access.WRITE_ONLY) private String backupPolicyResourceId; /** @@ -94,9 +83,7 @@ public BackupProperties() { } /** - * Get the backupId property: backupId - * - * UUID v4 used to identify the Backup. + * Get the backupId property: UUID v4 used to identify the Backup. * * @return the backupId value. */ @@ -105,9 +92,7 @@ public String backupId() { } /** - * Get the creationDate property: creationDate - * - * The creation date of the backup. + * Get the creationDate property: The creation date of the backup. * * @return the creationDate value. */ @@ -154,9 +139,7 @@ public BackupProperties withLabel(String label) { } /** - * Get the backupType property: backupType - * - * Type of backup Manual or Scheduled. + * Get the backupType property: Type of backup Manual or Scheduled. * * @return the backupType value. */ @@ -258,4 +241,65 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(BackupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("volumeResourceId", this.volumeResourceId); + jsonWriter.writeStringField("label", this.label); + jsonWriter.writeBooleanField("useExistingSnapshot", this.useExistingSnapshot); + jsonWriter.writeStringField("snapshotName", this.snapshotName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupProperties. + */ + public static BackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupProperties deserializedBackupProperties = new BackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("volumeResourceId".equals(fieldName)) { + deserializedBackupProperties.volumeResourceId = reader.getString(); + } else if ("backupId".equals(fieldName)) { + deserializedBackupProperties.backupId = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedBackupProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedBackupProperties.provisioningState = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedBackupProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("label".equals(fieldName)) { + deserializedBackupProperties.label = reader.getString(); + } else if ("backupType".equals(fieldName)) { + deserializedBackupProperties.backupType = BackupType.fromString(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedBackupProperties.failureReason = reader.getString(); + } else if ("useExistingSnapshot".equals(fieldName)) { + deserializedBackupProperties.useExistingSnapshot = reader.getNullable(JsonReader::getBoolean); + } else if ("snapshotName".equals(fieldName)) { + deserializedBackupProperties.snapshotName = reader.getString(); + } else if ("backupPolicyResourceId".equals(fieldName)) { + deserializedBackupProperties.backupPolicyResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java index ff231536d3d4c..0b1efdba68bd6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java @@ -5,67 +5,62 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.MirrorState; import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Backup status. */ @Immutable -public final class BackupStatusInner { +public final class BackupStatusInner implements JsonSerializable { /* * Backup health status */ - @JsonProperty(value = "healthy", access = JsonProperty.Access.WRITE_ONLY) private Boolean healthy; /* * Status of the backup mirror relationship */ - @JsonProperty(value = "relationshipStatus", access = JsonProperty.Access.WRITE_ONLY) private RelationshipStatus relationshipStatus; /* * The status of the backup */ - @JsonProperty(value = "mirrorState", access = JsonProperty.Access.WRITE_ONLY) private MirrorState mirrorState; /* * Reason for the unhealthy backup relationship */ - @JsonProperty(value = "unhealthyReason", access = JsonProperty.Access.WRITE_ONLY) private String unhealthyReason; /* * Displays error message if the backup is in an error state */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) private String errorMessage; /* * Displays the last transfer size */ - @JsonProperty(value = "lastTransferSize", access = JsonProperty.Access.WRITE_ONLY) private Long lastTransferSize; /* * Displays the last transfer type */ - @JsonProperty(value = "lastTransferType", access = JsonProperty.Access.WRITE_ONLY) private String lastTransferType; /* * Displays the total bytes transferred */ - @JsonProperty(value = "totalTransferBytes", access = JsonProperty.Access.WRITE_ONLY) private Long totalTransferBytes; /* * Displays the total number of bytes transferred for the ongoing operation */ - @JsonProperty(value = "transferProgressBytes", access = JsonProperty.Access.WRITE_ONLY) private Long transferProgressBytes; /** @@ -162,4 +157,56 @@ public Long transferProgressBytes() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupStatusInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupStatusInner. + */ + public static BackupStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupStatusInner deserializedBackupStatusInner = new BackupStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("healthy".equals(fieldName)) { + deserializedBackupStatusInner.healthy = reader.getNullable(JsonReader::getBoolean); + } else if ("relationshipStatus".equals(fieldName)) { + deserializedBackupStatusInner.relationshipStatus + = RelationshipStatus.fromString(reader.getString()); + } else if ("mirrorState".equals(fieldName)) { + deserializedBackupStatusInner.mirrorState = MirrorState.fromString(reader.getString()); + } else if ("unhealthyReason".equals(fieldName)) { + deserializedBackupStatusInner.unhealthyReason = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedBackupStatusInner.errorMessage = reader.getString(); + } else if ("lastTransferSize".equals(fieldName)) { + deserializedBackupStatusInner.lastTransferSize = reader.getNullable(JsonReader::getLong); + } else if ("lastTransferType".equals(fieldName)) { + deserializedBackupStatusInner.lastTransferType = reader.getString(); + } else if ("totalTransferBytes".equals(fieldName)) { + deserializedBackupStatusInner.totalTransferBytes = reader.getNullable(JsonReader::getLong); + } else if ("transferProgressBytes".equals(fieldName)) { + deserializedBackupStatusInner.transferProgressBytes = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupStatusInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java index c8c572398b54e..b5a87f587f7c3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java @@ -7,7 +7,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** @@ -18,15 +21,28 @@ public final class BackupVaultInner extends Resource { /* * Backup Vault Properties */ - @JsonProperty(value = "properties") private BackupVaultProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of BackupVaultInner class. */ @@ -51,6 +67,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -88,4 +134,56 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupVaultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupVaultInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupVaultInner. + */ + public static BackupVaultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupVaultInner deserializedBackupVaultInner = new BackupVaultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBackupVaultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBackupVaultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBackupVaultInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedBackupVaultInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupVaultInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedBackupVaultInner.innerProperties = BackupVaultProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBackupVaultInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupVaultInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java index c7c4463e55202..5f1e2814ca0f2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Backup Vault properties. */ @Immutable -public final class BackupVaultProperties { +public final class BackupVaultProperties implements JsonSerializable { /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /** @@ -40,4 +43,39 @@ public String provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupVaultProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupVaultProperties. + */ + public static BackupVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupVaultProperties deserializedBackupVaultProperties = new BackupVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedBackupVaultProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupVaultProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java index 209e2648a14b2..8e6aee650a197 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java @@ -8,10 +8,13 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.EncryptionType; import com.azure.resourcemanager.netapp.models.QosType; import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -22,21 +25,33 @@ public final class CapacityPoolInner extends Resource { /* * A unique read-only string that changes whenever the resource is updated. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; /* * Capacity pool properties */ - @JsonProperty(value = "properties", required = true) private PoolProperties innerProperties = new PoolProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of CapacityPoolInner class. */ @@ -70,6 +85,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -89,9 +134,7 @@ public CapacityPoolInner withTags(Map tags) { } /** - * Get the poolId property: poolId - * - * UUID v4 used to identify the Pool. + * Get the poolId property: UUID v4 used to identify the Pool. * * @return the poolId value. */ @@ -100,10 +143,8 @@ public String poolId() { } /** - * Get the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @return the size value. */ @@ -112,10 +153,8 @@ public long size() { } /** - * Set the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @param size the size value to set. * @return the CapacityPoolInner object itself. @@ -129,9 +168,7 @@ public CapacityPoolInner withSize(long size) { } /** - * Get the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Get the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -140,9 +177,7 @@ public ServiceLevel serviceLevel() { } /** - * Set the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Set the serviceLevel property: The service level of the file system. * * @param serviceLevel the serviceLevel value to set. * @return the CapacityPoolInner object itself. @@ -229,10 +264,8 @@ public CapacityPoolInner withCoolAccess(Boolean coolAccess) { } /** - * Get the encryptionType property: encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. - * This value can only be set when creating new pool. + * Get the encryptionType property: Encryption type of the capacity pool, set encryption type for data at rest for + * this pool and all volumes in it. This value can only be set when creating new pool. * * @return the encryptionType value. */ @@ -241,10 +274,8 @@ public EncryptionType encryptionType() { } /** - * Set the encryptionType property: encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. - * This value can only be set when creating new pool. + * Set the encryptionType property: Encryption type of the capacity pool, set encryption type for data at rest for + * this pool and all volumes in it. This value can only be set when creating new pool. * * @param encryptionType the encryptionType value to set. * @return the CapacityPoolInner object itself. @@ -273,4 +304,58 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(CapacityPoolInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapacityPoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapacityPoolInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CapacityPoolInner. + */ + public static CapacityPoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapacityPoolInner deserializedCapacityPoolInner = new CapacityPoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCapacityPoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCapacityPoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCapacityPoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedCapacityPoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCapacityPoolInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedCapacityPoolInner.innerProperties = PoolProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedCapacityPoolInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedCapacityPoolInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCapacityPoolInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java index 7f89ebe959974..11cde72136cbd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java @@ -5,30 +5,35 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Information regarding availability of a resource. */ @Fluent -public final class CheckAvailabilityResponseInner { +public final class CheckAvailabilityResponseInner implements JsonSerializable { /* - * true indicates name is valid and available. false indicates the name is invalid, unavailable, or both. + * true indicates name is valid and available. false indicates the name is invalid, + * unavailable, or both. */ - @JsonProperty(value = "isAvailable") private Boolean isAvailable; /* - * Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. + * Invalid indicates the name provided does not match Azure App Service naming requirements. + * AlreadyExists indicates that the name is already in use and is therefore unavailable. */ - @JsonProperty(value = "reason") private InAvailabilityReasonType reason; /* - * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource + * naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource + * name is already in use, and direct them to select a different name. */ - @JsonProperty(value = "message") private String message; /** @@ -114,4 +119,48 @@ public CheckAvailabilityResponseInner withMessage(String message) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isAvailable", this.isAvailable); + jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString()); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckAvailabilityResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckAvailabilityResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CheckAvailabilityResponseInner. + */ + public static CheckAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckAvailabilityResponseInner deserializedCheckAvailabilityResponseInner + = new CheckAvailabilityResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isAvailable".equals(fieldName)) { + deserializedCheckAvailabilityResponseInner.isAvailable = reader.getNullable(JsonReader::getBoolean); + } else if ("reason".equals(fieldName)) { + deserializedCheckAvailabilityResponseInner.reason + = InAvailabilityReasonType.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedCheckAvailabilityResponseInner.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckAvailabilityResponseInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java index 9438a22244f0d..5feb7fca887d1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java @@ -5,18 +5,22 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Group Id list for Ldap user. */ @Fluent -public final class GetGroupIdListForLdapUserResponseInner { +public final class GetGroupIdListForLdapUserResponseInner + implements JsonSerializable { /* * Group Id list */ - @JsonProperty(value = "groupIdsForLdapUser") private List groupIdsForLdapUser; /** @@ -52,4 +56,43 @@ public GetGroupIdListForLdapUserResponseInner withGroupIdsForLdapUser(List writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GetGroupIdListForLdapUserResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GetGroupIdListForLdapUserResponseInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GetGroupIdListForLdapUserResponseInner. + */ + public static GetGroupIdListForLdapUserResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GetGroupIdListForLdapUserResponseInner deserializedGetGroupIdListForLdapUserResponseInner + = new GetGroupIdListForLdapUserResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupIdsForLdapUser".equals(fieldName)) { + List groupIdsForLdapUser = reader.readArray(reader1 -> reader1.getString()); + deserializedGetGroupIdListForLdapUserResponseInner.groupIdsForLdapUser = groupIdsForLdapUser; + } else { + reader.skipChildren(); + } + } + + return deserializedGetGroupIdListForLdapUserResponseInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java index 8137ae2fb8ce3..f82a252485a77 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/MountTargetProperties.java @@ -6,43 +6,35 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Mount target properties. */ @Fluent -public final class MountTargetProperties { +public final class MountTargetProperties implements JsonSerializable { /* - * mountTargetId - * * UUID v4 used to identify the MountTarget */ - @JsonProperty(value = "mountTargetId", access = JsonProperty.Access.WRITE_ONLY) private String mountTargetId; /* - * fileSystemId - * * UUID v4 used to identify the MountTarget */ - @JsonProperty(value = "fileSystemId", required = true) private String fileSystemId; /* - * ipAddress - * * The mount target's IPv4 address */ - @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY) private String ipAddress; /* - * smbServerFQDN - * * The SMB server's Fully Qualified Domain Name, FQDN */ - @JsonProperty(value = "smbServerFqdn") private String smbServerFqdn; /** @@ -52,9 +44,7 @@ public MountTargetProperties() { } /** - * Get the mountTargetId property: mountTargetId - * - * UUID v4 used to identify the MountTarget. + * Get the mountTargetId property: UUID v4 used to identify the MountTarget. * * @return the mountTargetId value. */ @@ -63,9 +53,7 @@ public String mountTargetId() { } /** - * Get the fileSystemId property: fileSystemId - * - * UUID v4 used to identify the MountTarget. + * Get the fileSystemId property: UUID v4 used to identify the MountTarget. * * @return the fileSystemId value. */ @@ -74,9 +62,7 @@ public String fileSystemId() { } /** - * Set the fileSystemId property: fileSystemId - * - * UUID v4 used to identify the MountTarget. + * Set the fileSystemId property: UUID v4 used to identify the MountTarget. * * @param fileSystemId the fileSystemId value to set. * @return the MountTargetProperties object itself. @@ -87,9 +73,7 @@ public MountTargetProperties withFileSystemId(String fileSystemId) { } /** - * Get the ipAddress property: ipAddress - * - * The mount target's IPv4 address. + * Get the ipAddress property: The mount target's IPv4 address. * * @return the ipAddress value. */ @@ -98,9 +82,7 @@ public String ipAddress() { } /** - * Get the smbServerFqdn property: smbServerFQDN - * - * The SMB server's Fully Qualified Domain Name, FQDN. + * Get the smbServerFqdn property: The SMB server's Fully Qualified Domain Name, FQDN. * * @return the smbServerFqdn value. */ @@ -109,9 +91,7 @@ public String smbServerFqdn() { } /** - * Set the smbServerFqdn property: smbServerFQDN - * - * The SMB server's Fully Qualified Domain Name, FQDN. + * Set the smbServerFqdn property: The SMB server's Fully Qualified Domain Name, FQDN. * * @param smbServerFqdn the smbServerFqdn value to set. * @return the MountTargetProperties object itself. @@ -135,4 +115,48 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(MountTargetProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("fileSystemId", this.fileSystemId); + jsonWriter.writeStringField("smbServerFqdn", this.smbServerFqdn); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MountTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MountTargetProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MountTargetProperties. + */ + public static MountTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MountTargetProperties deserializedMountTargetProperties = new MountTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fileSystemId".equals(fieldName)) { + deserializedMountTargetProperties.fileSystemId = reader.getString(); + } else if ("mountTargetId".equals(fieldName)) { + deserializedMountTargetProperties.mountTargetId = reader.getString(); + } else if ("ipAddress".equals(fieldName)) { + deserializedMountTargetProperties.ipAddress = reader.getString(); + } else if ("smbServerFqdn".equals(fieldName)) { + deserializedMountTargetProperties.smbServerFqdn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMountTargetProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java index d9137b3416705..a706363c5a81b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java @@ -7,10 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AccountEncryption; import com.azure.resourcemanager.netapp.models.ActiveDirectory; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -22,27 +25,38 @@ public final class NetAppAccountInner extends Resource { /* * A unique read-only string that changes whenever the resource is updated. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; /* * NetApp Account properties */ - @JsonProperty(value = "properties") private AccountProperties innerProperties; /* * The identity used for the resource. */ - @JsonProperty(value = "identity") private ManagedServiceIdentity identity; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of NetAppAccountInner class. */ @@ -96,6 +110,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -192,4 +236,61 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetAppAccountInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetAppAccountInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetAppAccountInner. + */ + public static NetAppAccountInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetAppAccountInner deserializedNetAppAccountInner = new NetAppAccountInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetAppAccountInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetAppAccountInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNetAppAccountInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNetAppAccountInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetAppAccountInner.withTags(tags); + } else if ("etag".equals(fieldName)) { + deserializedNetAppAccountInner.etag = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNetAppAccountInner.innerProperties = AccountProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetAppAccountInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNetAppAccountInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetAppAccountInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java index adee862e51f03..8a27884665d26 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java @@ -5,10 +5,14 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.NetworkFeatures; import com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState; import com.azure.resourcemanager.netapp.models.NicInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -17,49 +21,37 @@ * Describes the contents of a network sibling set. */ @Fluent -public final class NetworkSiblingSetInner { +public final class NetworkSiblingSetInner implements JsonSerializable { /* - * Network Sibling Set ID - * * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. */ - @JsonProperty(value = "networkSiblingSetId") private String networkSiblingSetId; /* - * Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/ + * subnets/{mySubnet} */ - @JsonProperty(value = "subnetId") private String subnetId; /* - * Network sibling set state Id - * * Network sibling set state Id identifying the current state of the sibling set. */ - @JsonProperty(value = "networkSiblingSetStateId") private String networkSiblingSetStateId; /* - * Network features - * * Network features available to the volume, or current state of update. */ - @JsonProperty(value = "networkFeatures") private NetworkFeatures networkFeatures; /* * Gets the status of the NetworkSiblingSet at the time the operation was called. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private NetworkSiblingSetProvisioningState provisioningState; /* * List of NIC information */ - @JsonProperty(value = "nicInfoList") private List nicInfoList; /** @@ -69,9 +61,8 @@ public NetworkSiblingSetInner() { } /** - * Get the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + * Get the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources + * in a subnet. * * @return the networkSiblingSetId value. */ @@ -80,9 +71,8 @@ public String networkSiblingSetId() { } /** - * Set the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + * Set the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources + * in a subnet. * * @param networkSiblingSetId the networkSiblingSetId value to set. * @return the NetworkSiblingSetInner object itself. @@ -93,9 +83,8 @@ public NetworkSiblingSetInner withNetworkSiblingSetId(String networkSiblingSetId } /** - * Get the subnetId property: Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes. Example * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. * * @return the subnetId value. @@ -105,9 +94,8 @@ public String subnetId() { } /** - * Set the subnetId property: Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes. Example * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. * * @param subnetId the subnetId value to set. @@ -119,9 +107,8 @@ public NetworkSiblingSetInner withSubnetId(String subnetId) { } /** - * Get the networkSiblingSetStateId property: Network sibling set state Id - * - * Network sibling set state Id identifying the current state of the sibling set. + * Get the networkSiblingSetStateId property: Network sibling set state Id identifying the current state of the + * sibling set. * * @return the networkSiblingSetStateId value. */ @@ -130,9 +117,8 @@ public String networkSiblingSetStateId() { } /** - * Set the networkSiblingSetStateId property: Network sibling set state Id - * - * Network sibling set state Id identifying the current state of the sibling set. + * Set the networkSiblingSetStateId property: Network sibling set state Id identifying the current state of the + * sibling set. * * @param networkSiblingSetStateId the networkSiblingSetStateId value to set. * @return the NetworkSiblingSetInner object itself. @@ -143,9 +129,7 @@ public NetworkSiblingSetInner withNetworkSiblingSetStateId(String networkSibling } /** - * Get the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Get the networkFeatures property: Network features available to the volume, or current state of update. * * @return the networkFeatures value. */ @@ -154,9 +138,7 @@ public NetworkFeatures networkFeatures() { } /** - * Set the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Set the networkFeatures property: Network features available to the volume, or current state of update. * * @param networkFeatures the networkFeatures value to set. * @return the NetworkSiblingSetInner object itself. @@ -206,4 +188,57 @@ public void validate() { nicInfoList().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkSiblingSetId", this.networkSiblingSetId); + jsonWriter.writeStringField("subnetId", this.subnetId); + jsonWriter.writeStringField("networkSiblingSetStateId", this.networkSiblingSetStateId); + jsonWriter.writeStringField("networkFeatures", + this.networkFeatures == null ? null : this.networkFeatures.toString()); + jsonWriter.writeArrayField("nicInfoList", this.nicInfoList, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkSiblingSetInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkSiblingSetInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkSiblingSetInner. + */ + public static NetworkSiblingSetInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkSiblingSetInner deserializedNetworkSiblingSetInner = new NetworkSiblingSetInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkSiblingSetId".equals(fieldName)) { + deserializedNetworkSiblingSetInner.networkSiblingSetId = reader.getString(); + } else if ("subnetId".equals(fieldName)) { + deserializedNetworkSiblingSetInner.subnetId = reader.getString(); + } else if ("networkSiblingSetStateId".equals(fieldName)) { + deserializedNetworkSiblingSetInner.networkSiblingSetStateId = reader.getString(); + } else if ("networkFeatures".equals(fieldName)) { + deserializedNetworkSiblingSetInner.networkFeatures = NetworkFeatures.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedNetworkSiblingSetInner.provisioningState + = NetworkSiblingSetProvisioningState.fromString(reader.getString()); + } else if ("nicInfoList".equals(fieldName)) { + List nicInfoList = reader.readArray(reader1 -> NicInfo.fromJson(reader1)); + deserializedNetworkSiblingSetInner.nicInfoList = nicInfoList; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkSiblingSetInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java index 4f5d863a90af0..c3c2fd1d68735 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java @@ -5,37 +5,37 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.OperationDisplay; import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Microsoft.NetApp REST API operation definition. */ @Fluent -public final class OperationInner { +public final class OperationInner implements JsonSerializable { /* * Operation name: {provider}/{resource}/{operation} */ - @JsonProperty(value = "name") private String name; /* * Display metadata associated with the operation. */ - @JsonProperty(value = "display") private OperationDisplay display; /* * The origin of operations. */ - @JsonProperty(value = "origin") private String origin; /* * Properties of operation, include metric specifications. */ - @JsonProperty(value = "properties") private OperationProperties innerProperties; /** @@ -149,4 +149,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("display", this.display); + jsonWriter.writeStringField("origin", this.origin); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedOperationInner.innerProperties = OperationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java index 4939f8d4ab1e6..c16c1327579fe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Properties of operation, include metric specifications. */ @Fluent -public final class OperationProperties { +public final class OperationProperties implements JsonSerializable { /* * One property of operation, include metric specifications. */ - @JsonProperty(value = "serviceSpecification") private ServiceSpecification serviceSpecification; /** @@ -55,4 +58,40 @@ public void validate() { serviceSpecification().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("serviceSpecification", this.serviceSpecification); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationProperties. + */ + public static OperationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationProperties deserializedOperationProperties = new OperationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceSpecification".equals(fieldName)) { + deserializedOperationProperties.serviceSpecification = ServiceSpecification.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java index 444d7aa77c826..b73b809b72b54 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java @@ -5,32 +5,32 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.QosType; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Patchable pool properties. */ @Fluent -public final class PoolPatchProperties { +public final class PoolPatchProperties implements JsonSerializable { /* - * size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 1099511627776). + * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of + * 1099511627776). */ - @JsonProperty(value = "size") private Long size; /* * The qos type of the pool */ - @JsonProperty(value = "qosType") private QosType qosType; /* * If enabled (true) the pool can contain cool Access enabled volumes. */ - @JsonProperty(value = "coolAccess") private Boolean coolAccess; /** @@ -40,10 +40,8 @@ public PoolPatchProperties() { } /** - * Get the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @return the size value. */ @@ -52,10 +50,8 @@ public Long size() { } /** - * Set the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @param size the size value to set. * @return the PoolPatchProperties object itself. @@ -112,4 +108,46 @@ public PoolPatchProperties withCoolAccess(Boolean coolAccess) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeStringField("qosType", this.qosType == null ? null : this.qosType.toString()); + jsonWriter.writeBooleanField("coolAccess", this.coolAccess); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolPatchProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PoolPatchProperties. + */ + public static PoolPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolPatchProperties deserializedPoolPatchProperties = new PoolPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedPoolPatchProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("qosType".equals(fieldName)) { + deserializedPoolPatchProperties.qosType = QosType.fromString(reader.getString()); + } else if ("coolAccess".equals(fieldName)) { + deserializedPoolPatchProperties.coolAccess = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolPatchProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java index 85147581fc5b3..e481ec9c9c411 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java @@ -6,76 +6,65 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.EncryptionType; import com.azure.resourcemanager.netapp.models.QosType; import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Pool properties. */ @Fluent -public final class PoolProperties { +public final class PoolProperties implements JsonSerializable { /* - * poolId - * * UUID v4 used to identify the Pool */ - @JsonProperty(value = "poolId", access = JsonProperty.Access.WRITE_ONLY) private String poolId; /* - * size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 1099511627776). + * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiple of + * 1099511627776). */ - @JsonProperty(value = "size", required = true) private long size; /* - * serviceLevel - * * The service level of the file system */ - @JsonProperty(value = "serviceLevel", required = true) private ServiceLevel serviceLevel; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * Total throughput of pool in MiB/s */ - @JsonProperty(value = "totalThroughputMibps", access = JsonProperty.Access.WRITE_ONLY) private Float totalThroughputMibps; /* * Utilized throughput of pool in MiB/s */ - @JsonProperty(value = "utilizedThroughputMibps", access = JsonProperty.Access.WRITE_ONLY) private Float utilizedThroughputMibps; /* * The qos type of the pool */ - @JsonProperty(value = "qosType") private QosType qosType; /* * If enabled (true) the pool can contain cool Access enabled volumes. */ - @JsonProperty(value = "coolAccess") private Boolean coolAccess; /* - * encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool. + * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. + * This value can only be set when creating new pool. */ - @JsonProperty(value = "encryptionType") private EncryptionType encryptionType; /** @@ -85,9 +74,7 @@ public PoolProperties() { } /** - * Get the poolId property: poolId - * - * UUID v4 used to identify the Pool. + * Get the poolId property: UUID v4 used to identify the Pool. * * @return the poolId value. */ @@ -96,10 +83,8 @@ public String poolId() { } /** - * Get the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @return the size value. */ @@ -108,10 +93,8 @@ public long size() { } /** - * Set the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @param size the size value to set. * @return the PoolProperties object itself. @@ -122,9 +105,7 @@ public PoolProperties withSize(long size) { } /** - * Get the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Get the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -133,9 +114,7 @@ public ServiceLevel serviceLevel() { } /** - * Set the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Set the serviceLevel property: The service level of the file system. * * @param serviceLevel the serviceLevel value to set. * @return the PoolProperties object itself. @@ -213,10 +192,8 @@ public PoolProperties withCoolAccess(Boolean coolAccess) { } /** - * Get the encryptionType property: encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. - * This value can only be set when creating new pool. + * Get the encryptionType property: Encryption type of the capacity pool, set encryption type for data at rest for + * this pool and all volumes in it. This value can only be set when creating new pool. * * @return the encryptionType value. */ @@ -225,10 +202,8 @@ public EncryptionType encryptionType() { } /** - * Set the encryptionType property: encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. - * This value can only be set when creating new pool. + * Set the encryptionType property: Encryption type of the capacity pool, set encryption type for data at rest for + * this pool and all volumes in it. This value can only be set when creating new pool. * * @param encryptionType the encryptionType value to set. * @return the PoolProperties object itself. @@ -251,4 +226,62 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PoolProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeStringField("serviceLevel", this.serviceLevel == null ? null : this.serviceLevel.toString()); + jsonWriter.writeStringField("qosType", this.qosType == null ? null : this.qosType.toString()); + jsonWriter.writeBooleanField("coolAccess", this.coolAccess); + jsonWriter.writeStringField("encryptionType", + this.encryptionType == null ? null : this.encryptionType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PoolProperties. + */ + public static PoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolProperties deserializedPoolProperties = new PoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedPoolProperties.size = reader.getLong(); + } else if ("serviceLevel".equals(fieldName)) { + deserializedPoolProperties.serviceLevel = ServiceLevel.fromString(reader.getString()); + } else if ("poolId".equals(fieldName)) { + deserializedPoolProperties.poolId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedPoolProperties.provisioningState = reader.getString(); + } else if ("totalThroughputMibps".equals(fieldName)) { + deserializedPoolProperties.totalThroughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("utilizedThroughputMibps".equals(fieldName)) { + deserializedPoolProperties.utilizedThroughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("qosType".equals(fieldName)) { + deserializedPoolProperties.qosType = QosType.fromString(reader.getString()); + } else if ("coolAccess".equals(fieldName)) { + deserializedPoolProperties.coolAccess = reader.getNullable(JsonReader::getBoolean); + } else if ("encryptionType".equals(fieldName)) { + deserializedPoolProperties.encryptionType = EncryptionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java index e8701304c0a5f..288d2ef2f712f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java @@ -5,30 +5,28 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Provides region specific information. */ @Fluent -public final class RegionInfoInner { +public final class RegionInfoInner implements JsonSerializable { /* - * Storage to Network Proximity - * * Provides storage to network proximity information in the region. */ - @JsonProperty(value = "storageToNetworkProximity") private RegionStorageToNetworkProximity storageToNetworkProximity; /* - * Logical availability zone mappings. - * * Provides logical availability zone mappings for the subscription for a region. */ - @JsonProperty(value = "availabilityZoneMappings") private List availabilityZoneMappings; /** @@ -38,9 +36,7 @@ public RegionInfoInner() { } /** - * Get the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. + * Get the storageToNetworkProximity property: Provides storage to network proximity information in the region. * * @return the storageToNetworkProximity value. */ @@ -49,9 +45,7 @@ public RegionStorageToNetworkProximity storageToNetworkProximity() { } /** - * Set the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. + * Set the storageToNetworkProximity property: Provides storage to network proximity information in the region. * * @param storageToNetworkProximity the storageToNetworkProximity value to set. * @return the RegionInfoInner object itself. @@ -62,9 +56,8 @@ public RegionInfoInner withStorageToNetworkProximity(RegionStorageToNetworkProxi } /** - * Get the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. + * Get the availabilityZoneMappings property: Provides logical availability zone mappings for the subscription for a + * region. * * @return the availabilityZoneMappings value. */ @@ -73,9 +66,8 @@ public List availabilityZoneMappings() { } /** - * Set the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. + * Set the availabilityZoneMappings property: Provides logical availability zone mappings for the subscription for a + * region. * * @param availabilityZoneMappings the availabilityZoneMappings value to set. * @return the RegionInfoInner object itself. @@ -96,4 +88,48 @@ public void validate() { availabilityZoneMappings().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storageToNetworkProximity", + this.storageToNetworkProximity == null ? null : this.storageToNetworkProximity.toString()); + jsonWriter.writeArrayField("availabilityZoneMappings", this.availabilityZoneMappings, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegionInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegionInfoInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RegionInfoInner. + */ + public static RegionInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegionInfoInner deserializedRegionInfoInner = new RegionInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storageToNetworkProximity".equals(fieldName)) { + deserializedRegionInfoInner.storageToNetworkProximity + = RegionStorageToNetworkProximity.fromString(reader.getString()); + } else if ("availabilityZoneMappings".equals(fieldName)) { + List availabilityZoneMappings + = reader.readArray(reader1 -> RegionInfoAvailabilityZoneMappingsItem.fromJson(reader1)); + deserializedRegionInfoInner.availabilityZoneMappings = availabilityZoneMappings; + } else { + reader.skipChildren(); + } + } + + return deserializedRegionInfoInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java index 2f692008c6fe0..09ea428594265 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -20,15 +23,28 @@ public final class RegionInfoResourceInner extends ProxyResource { /* * regionInfo properties */ - @JsonProperty(value = "properties") private RegionInfoInner innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of RegionInfoResourceInner class. */ @@ -54,9 +70,37 @@ public SystemData systemData() { } /** - * Get the storageToNetworkProximity property: Storage to Network Proximity + * Get the id property: Fully qualified resource Id for the resource. * - * Provides storage to network proximity information in the region. + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the storageToNetworkProximity property: Provides storage to network proximity information in the region. * * @return the storageToNetworkProximity value. */ @@ -65,9 +109,7 @@ public RegionStorageToNetworkProximity storageToNetworkProximity() { } /** - * Set the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. + * Set the storageToNetworkProximity property: Provides storage to network proximity information in the region. * * @param storageToNetworkProximity the storageToNetworkProximity value to set. * @return the RegionInfoResourceInner object itself. @@ -82,9 +124,8 @@ public RegionStorageToNetworkProximity storageToNetworkProximity() { } /** - * Get the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. + * Get the availabilityZoneMappings property: Provides logical availability zone mappings for the subscription for a + * region. * * @return the availabilityZoneMappings value. */ @@ -93,9 +134,8 @@ public List availabilityZoneMappings() { } /** - * Set the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. + * Set the availabilityZoneMappings property: Provides logical availability zone mappings for the subscription for a + * region. * * @param availabilityZoneMappings the availabilityZoneMappings value to set. * @return the RegionInfoResourceInner object itself. @@ -119,4 +159,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegionInfoResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegionInfoResourceInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RegionInfoResourceInner. + */ + public static RegionInfoResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegionInfoResourceInner deserializedRegionInfoResourceInner = new RegionInfoResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRegionInfoResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRegionInfoResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRegionInfoResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRegionInfoResourceInner.innerProperties = RegionInfoInner.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRegionInfoResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRegionInfoResourceInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java index 44ef76d1a56f3..822fa4ef1277f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java @@ -6,37 +6,42 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.EndpointType; import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Replication properties. */ @Fluent -public final class ReplicationInner { +public final class ReplicationInner implements JsonSerializable { + /* + * UUID v4 used to identify the replication. + */ + private String replicationId; + /* * Indicates whether the local volume is the source or destination for the Volume Replication */ - @JsonProperty(value = "endpointType") private EndpointType endpointType; /* * Schedule */ - @JsonProperty(value = "replicationSchedule") private ReplicationSchedule replicationSchedule; /* * The resource ID of the remote volume. */ - @JsonProperty(value = "remoteVolumeResourceId", required = true) private String remoteVolumeResourceId; /* * The remote region for the other end of the Volume Replication. */ - @JsonProperty(value = "remoteVolumeRegion") private String remoteVolumeRegion; /** @@ -45,6 +50,15 @@ public final class ReplicationInner { public ReplicationInner() { } + /** + * Get the replicationId property: UUID v4 used to identify the replication. + * + * @return the replicationId value. + */ + public String replicationId() { + return this.replicationId; + } + /** * Get the endpointType property: Indicates whether the local volume is the source or destination for the Volume * Replication. @@ -141,4 +155,54 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ReplicationInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("remoteVolumeResourceId", this.remoteVolumeResourceId); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("replicationSchedule", + this.replicationSchedule == null ? null : this.replicationSchedule.toString()); + jsonWriter.writeStringField("remoteVolumeRegion", this.remoteVolumeRegion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ReplicationInner. + */ + public static ReplicationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationInner deserializedReplicationInner = new ReplicationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("remoteVolumeResourceId".equals(fieldName)) { + deserializedReplicationInner.remoteVolumeResourceId = reader.getString(); + } else if ("replicationId".equals(fieldName)) { + deserializedReplicationInner.replicationId = reader.getString(); + } else if ("endpointType".equals(fieldName)) { + deserializedReplicationInner.endpointType = EndpointType.fromString(reader.getString()); + } else if ("replicationSchedule".equals(fieldName)) { + deserializedReplicationInner.replicationSchedule + = ReplicationSchedule.fromString(reader.getString()); + } else if ("remoteVolumeRegion".equals(fieldName)) { + deserializedReplicationInner.remoteVolumeRegion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java index aab387c909f68..7bca2ec9f3993 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java @@ -5,43 +5,42 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.MirrorState; import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Replication status. */ @Fluent -public final class ReplicationStatusInner { +public final class ReplicationStatusInner implements JsonSerializable { /* * Replication health check */ - @JsonProperty(value = "healthy") private Boolean healthy; /* * Status of the mirror relationship */ - @JsonProperty(value = "relationshipStatus") private RelationshipStatus relationshipStatus; /* * The status of the replication */ - @JsonProperty(value = "mirrorState") private MirrorState mirrorState; /* * The progress of the replication */ - @JsonProperty(value = "totalProgress") private String totalProgress; /* * Displays error message if the replication is in an error state */ - @JsonProperty(value = "errorMessage") private String errorMessage; /** @@ -157,4 +156,54 @@ public ReplicationStatusInner withErrorMessage(String errorMessage) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("healthy", this.healthy); + jsonWriter.writeStringField("relationshipStatus", + this.relationshipStatus == null ? null : this.relationshipStatus.toString()); + jsonWriter.writeStringField("mirrorState", this.mirrorState == null ? null : this.mirrorState.toString()); + jsonWriter.writeStringField("totalProgress", this.totalProgress); + jsonWriter.writeStringField("errorMessage", this.errorMessage); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationStatusInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReplicationStatusInner. + */ + public static ReplicationStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationStatusInner deserializedReplicationStatusInner = new ReplicationStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("healthy".equals(fieldName)) { + deserializedReplicationStatusInner.healthy = reader.getNullable(JsonReader::getBoolean); + } else if ("relationshipStatus".equals(fieldName)) { + deserializedReplicationStatusInner.relationshipStatus + = RelationshipStatus.fromString(reader.getString()); + } else if ("mirrorState".equals(fieldName)) { + deserializedReplicationStatusInner.mirrorState = MirrorState.fromString(reader.getString()); + } else if ("totalProgress".equals(fieldName)) { + deserializedReplicationStatusInner.totalProgress = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedReplicationStatusInner.errorMessage = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationStatusInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java index 1fc86c37c24f3..bde47b115f424 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java @@ -5,49 +5,47 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.MirrorState; import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Restore status. */ @Immutable -public final class RestoreStatusInner { +public final class RestoreStatusInner implements JsonSerializable { /* * Restore health status */ - @JsonProperty(value = "healthy", access = JsonProperty.Access.WRITE_ONLY) private Boolean healthy; /* * Status of the restore SnapMirror relationship */ - @JsonProperty(value = "relationshipStatus", access = JsonProperty.Access.WRITE_ONLY) private RelationshipStatus relationshipStatus; /* * The status of the restore */ - @JsonProperty(value = "mirrorState", access = JsonProperty.Access.WRITE_ONLY) private MirrorState mirrorState; /* * Reason for the unhealthy restore relationship */ - @JsonProperty(value = "unhealthyReason", access = JsonProperty.Access.WRITE_ONLY) private String unhealthyReason; /* * Displays error message if the restore is in an error state */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) private String errorMessage; /* * Displays the total bytes transferred */ - @JsonProperty(value = "totalTransferBytes", access = JsonProperty.Access.WRITE_ONLY) private Long totalTransferBytes; /** @@ -117,4 +115,50 @@ public Long totalTransferBytes() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RestoreStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RestoreStatusInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RestoreStatusInner. + */ + public static RestoreStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RestoreStatusInner deserializedRestoreStatusInner = new RestoreStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("healthy".equals(fieldName)) { + deserializedRestoreStatusInner.healthy = reader.getNullable(JsonReader::getBoolean); + } else if ("relationshipStatus".equals(fieldName)) { + deserializedRestoreStatusInner.relationshipStatus + = RelationshipStatus.fromString(reader.getString()); + } else if ("mirrorState".equals(fieldName)) { + deserializedRestoreStatusInner.mirrorState = MirrorState.fromString(reader.getString()); + } else if ("unhealthyReason".equals(fieldName)) { + deserializedRestoreStatusInner.unhealthyReason = reader.getString(); + } else if ("errorMessage".equals(fieldName)) { + deserializedRestoreStatusInner.errorMessage = reader.getString(); + } else if ("totalTransferBytes".equals(fieldName)) { + deserializedRestoreStatusInner.totalTransferBytes = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedRestoreStatusInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java index 95d2773766bc6..0e788a0503295 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java @@ -8,7 +8,10 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; /** @@ -19,21 +22,33 @@ public final class SnapshotInner extends ProxyResource { /* * Resource location */ - @JsonProperty(value = "location", required = true) private String location; /* * Snapshot Properties */ - @JsonProperty(value = "properties") private SnapshotProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of SnapshotInner class. */ @@ -79,9 +94,37 @@ public SystemData systemData() { } /** - * Get the snapshotId property: snapshotId + * Get the id property: Fully qualified resource Id for the resource. * - * UUID v4 used to identify the Snapshot. + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the snapshotId property: UUID v4 used to identify the Snapshot. * * @return the snapshotId value. */ @@ -90,9 +133,7 @@ public String snapshotId() { } /** - * Get the created property: name - * - * The creation date of the snapshot. + * Get the created property: The creation date of the snapshot. * * @return the created value. */ @@ -125,4 +166,52 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(SnapshotInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SnapshotInner. + */ + public static SnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotInner deserializedSnapshotInner = new SnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSnapshotInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSnapshotInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSnapshotInner.innerProperties = SnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java index 994407010b3bb..97bf3f6f96ce7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java @@ -8,11 +8,14 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.DailySchedule; import com.azure.resourcemanager.netapp.models.HourlySchedule; import com.azure.resourcemanager.netapp.models.MonthlySchedule; import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -23,21 +26,33 @@ public final class SnapshotPolicyInner extends Resource { /* * A unique read-only string that changes whenever the resource is updated. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; /* * Snapshot policy Properties */ - @JsonProperty(value = "properties", required = true) private SnapshotPolicyProperties innerProperties = new SnapshotPolicyProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of SnapshotPolicyInner class. */ @@ -71,6 +86,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -229,4 +274,58 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(SnapshotPolicyInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotPolicyInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SnapshotPolicyInner. + */ + public static SnapshotPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotPolicyInner deserializedSnapshotPolicyInner = new SnapshotPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSnapshotPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSnapshotPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSnapshotPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedSnapshotPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSnapshotPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedSnapshotPolicyInner.innerProperties = SnapshotPolicyProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedSnapshotPolicyInner.etag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedSnapshotPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotPolicyInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java index 638df907f1aa7..d0e19d155a4b0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java @@ -5,51 +5,49 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.DailySchedule; import com.azure.resourcemanager.netapp.models.HourlySchedule; import com.azure.resourcemanager.netapp.models.MonthlySchedule; import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Snapshot policy properties. */ @Fluent -public final class SnapshotPolicyProperties { +public final class SnapshotPolicyProperties implements JsonSerializable { /* * Schedule for hourly snapshots */ - @JsonProperty(value = "hourlySchedule") private HourlySchedule hourlySchedule; /* * Schedule for daily snapshots */ - @JsonProperty(value = "dailySchedule") private DailySchedule dailySchedule; /* * Schedule for weekly snapshots */ - @JsonProperty(value = "weeklySchedule") private WeeklySchedule weeklySchedule; /* * Schedule for monthly snapshots */ - @JsonProperty(value = "monthlySchedule") private MonthlySchedule monthlySchedule; /* * The property to decide policy is enabled or not */ - @JsonProperty(value = "enabled") private Boolean enabled; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /** @@ -186,4 +184,54 @@ public void validate() { monthlySchedule().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("hourlySchedule", this.hourlySchedule); + jsonWriter.writeJsonField("dailySchedule", this.dailySchedule); + jsonWriter.writeJsonField("weeklySchedule", this.weeklySchedule); + jsonWriter.writeJsonField("monthlySchedule", this.monthlySchedule); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotPolicyProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotPolicyProperties. + */ + public static SnapshotPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotPolicyProperties deserializedSnapshotPolicyProperties = new SnapshotPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hourlySchedule".equals(fieldName)) { + deserializedSnapshotPolicyProperties.hourlySchedule = HourlySchedule.fromJson(reader); + } else if ("dailySchedule".equals(fieldName)) { + deserializedSnapshotPolicyProperties.dailySchedule = DailySchedule.fromJson(reader); + } else if ("weeklySchedule".equals(fieldName)) { + deserializedSnapshotPolicyProperties.weeklySchedule = WeeklySchedule.fromJson(reader); + } else if ("monthlySchedule".equals(fieldName)) { + deserializedSnapshotPolicyProperties.monthlySchedule = MonthlySchedule.fromJson(reader); + } else if ("enabled".equals(fieldName)) { + deserializedSnapshotPolicyProperties.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("provisioningState".equals(fieldName)) { + deserializedSnapshotPolicyProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotPolicyProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java index 492b02ea0d51c..0b4b3a78f3e37 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Volumes associated with snapshot policy. */ @Fluent -public final class SnapshotPolicyVolumeListInner { +public final class SnapshotPolicyVolumeListInner implements JsonSerializable { /* * List of volumes */ - @JsonProperty(value = "value") private List value; /** @@ -55,4 +58,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotPolicyVolumeListInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotPolicyVolumeListInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotPolicyVolumeListInner. + */ + public static SnapshotPolicyVolumeListInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotPolicyVolumeListInner deserializedSnapshotPolicyVolumeListInner + = new SnapshotPolicyVolumeListInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> VolumeInner.fromJson(reader1)); + deserializedSnapshotPolicyVolumeListInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotPolicyVolumeListInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java index 7cbf82eb5d305..dd6538c2da3dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java @@ -5,34 +5,32 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; /** * Snapshot properties. */ @Immutable -public final class SnapshotProperties { +public final class SnapshotProperties implements JsonSerializable { /* - * snapshotId - * * UUID v4 used to identify the Snapshot */ - @JsonProperty(value = "snapshotId", access = JsonProperty.Access.WRITE_ONLY) private String snapshotId; /* - * name - * * The creation date of the snapshot */ - @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime created; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /** @@ -42,9 +40,7 @@ public SnapshotProperties() { } /** - * Get the snapshotId property: snapshotId - * - * UUID v4 used to identify the Snapshot. + * Get the snapshotId property: UUID v4 used to identify the Snapshot. * * @return the snapshotId value. */ @@ -53,9 +49,7 @@ public String snapshotId() { } /** - * Get the created property: name - * - * The creation date of the snapshot. + * Get the created property: The creation date of the snapshot. * * @return the created value. */ @@ -79,4 +73,44 @@ public String provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotProperties. + */ + public static SnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotProperties deserializedSnapshotProperties = new SnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotId".equals(fieldName)) { + deserializedSnapshotProperties.snapshotId = reader.getString(); + } else if ("created".equals(fieldName)) { + deserializedSnapshotProperties.created = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedSnapshotProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java index 015ed394c0483..0e25d46d007cc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java @@ -7,7 +7,10 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Information regarding Subscription Quota Item. @@ -17,15 +20,28 @@ public final class SubscriptionQuotaItemInner extends ProxyResource { /* * SubscriptionQuotaItem properties */ - @JsonProperty(value = "properties") private SubscriptionQuotaItemProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of SubscriptionQuotaItemInner class. */ @@ -50,6 +66,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * Get the current property: The current quota value. * @@ -78,4 +124,50 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionQuotaItemInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionQuotaItemInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SubscriptionQuotaItemInner. + */ + public static SubscriptionQuotaItemInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionQuotaItemInner deserializedSubscriptionQuotaItemInner = new SubscriptionQuotaItemInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSubscriptionQuotaItemInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSubscriptionQuotaItemInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSubscriptionQuotaItemInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSubscriptionQuotaItemInner.innerProperties + = SubscriptionQuotaItemProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSubscriptionQuotaItemInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionQuotaItemInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java index a88e9609369b1..659af22698866 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemProperties.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * SubscriptionQuotaItem Properties. */ @Immutable -public final class SubscriptionQuotaItemProperties { +public final class SubscriptionQuotaItemProperties implements JsonSerializable { /* * The current quota value. */ - @JsonProperty(value = "current", access = JsonProperty.Access.WRITE_ONLY) private Integer current; /* * The default quota value. */ - @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY) private Integer defaultProperty; /** @@ -55,4 +57,43 @@ public Integer defaultProperty() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionQuotaItemProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionQuotaItemProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubscriptionQuotaItemProperties. + */ + public static SubscriptionQuotaItemProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionQuotaItemProperties deserializedSubscriptionQuotaItemProperties + = new SubscriptionQuotaItemProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("current".equals(fieldName)) { + deserializedSubscriptionQuotaItemProperties.current = reader.getNullable(JsonReader::getInt); + } else if ("default".equals(fieldName)) { + deserializedSubscriptionQuotaItemProperties.defaultProperty + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionQuotaItemProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java index 7b46558dff858..ebf4b727ba237 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java @@ -7,7 +7,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Subvolume Information properties. @@ -17,15 +20,28 @@ public final class SubvolumeInfoInner extends ProxyResource { /* * Subvolume Properties */ - @JsonProperty(value = "properties") private SubvolumeProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of SubvolumeInfoInner class. */ @@ -51,9 +67,37 @@ public SystemData systemData() { } /** - * Get the path property: path + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. * - * Path to the subvolume. + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the path property: Path to the subvolume. * * @return the path value. */ @@ -62,9 +106,7 @@ public String path() { } /** - * Set the path property: path - * - * Path to the subvolume. + * Set the path property: Path to the subvolume. * * @param path the path value to set. * @return the SubvolumeInfoInner object itself. @@ -78,9 +120,7 @@ public SubvolumeInfoInner withPath(String path) { } /** - * Get the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Get the size property: Truncate subvolume to the provided size in bytes. * * @return the size value. */ @@ -89,9 +129,7 @@ public Long size() { } /** - * Set the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Set the size property: Truncate subvolume to the provided size in bytes. * * @param size the size value to set. * @return the SubvolumeInfoInner object itself. @@ -105,9 +143,7 @@ public SubvolumeInfoInner withSize(Long size) { } /** - * Get the parentPath property: name - * - * parent path to the subvolume. + * Get the parentPath property: parent path to the subvolume. * * @return the parentPath value. */ @@ -116,9 +152,7 @@ public String parentPath() { } /** - * Set the parentPath property: name - * - * parent path to the subvolume. + * Set the parentPath property: parent path to the subvolume. * * @param parentPath the parentPath value to set. * @return the SubvolumeInfoInner object itself. @@ -150,4 +184,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubvolumeInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubvolumeInfoInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SubvolumeInfoInner. + */ + public static SubvolumeInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubvolumeInfoInner deserializedSubvolumeInfoInner = new SubvolumeInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSubvolumeInfoInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSubvolumeInfoInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSubvolumeInfoInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSubvolumeInfoInner.innerProperties = SubvolumeProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSubvolumeInfoInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubvolumeInfoInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java index 86ecbfd7e8a1a..4e0d02eee7869 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java @@ -5,36 +5,36 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; /** * Result of the post subvolume and action is to get metadata of the subvolume. */ @Fluent -public final class SubvolumeModelInner { +public final class SubvolumeModelInner implements JsonSerializable { /* * Resource Id */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Resource name */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Resource type */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; /* * It represents the minimal properties of the subvolume. */ - @JsonProperty(value = "properties") private SubvolumeModelProperties innerProperties; /** @@ -80,9 +80,7 @@ private SubvolumeModelProperties innerProperties() { } /** - * Get the path property: path - * - * Path to the subvolume. + * Get the path property: Path to the subvolume. * * @return the path value. */ @@ -91,9 +89,7 @@ public String path() { } /** - * Set the path property: path - * - * Path to the subvolume. + * Set the path property: Path to the subvolume. * * @param path the path value to set. * @return the SubvolumeModelInner object itself. @@ -107,9 +103,7 @@ public SubvolumeModelInner withPath(String path) { } /** - * Get the parentPath property: parentpath - * - * Path to the parent subvolume. + * Get the parentPath property: Path to the parent subvolume. * * @return the parentPath value. */ @@ -118,9 +112,7 @@ public String parentPath() { } /** - * Set the parentPath property: parentpath - * - * Path to the parent subvolume. + * Set the parentPath property: Path to the parent subvolume. * * @param parentPath the parentPath value to set. * @return the SubvolumeModelInner object itself. @@ -134,9 +126,7 @@ public SubvolumeModelInner withParentPath(String parentPath) { } /** - * Get the size property: size - * - * Size of subvolume. + * Get the size property: Size of subvolume. * * @return the size value. */ @@ -145,9 +135,7 @@ public Long size() { } /** - * Set the size property: size - * - * Size of subvolume. + * Set the size property: Size of subvolume. * * @param size the size value to set. * @return the SubvolumeModelInner object itself. @@ -161,9 +149,7 @@ public SubvolumeModelInner withSize(Long size) { } /** - * Get the bytesUsed property: bytesUsed - * - * Bytes used. + * Get the bytesUsed property: Bytes used. * * @return the bytesUsed value. */ @@ -172,9 +158,7 @@ public Long bytesUsed() { } /** - * Set the bytesUsed property: bytesUsed - * - * Bytes used. + * Set the bytesUsed property: Bytes used. * * @param bytesUsed the bytesUsed value to set. * @return the SubvolumeModelInner object itself. @@ -188,9 +172,7 @@ public SubvolumeModelInner withBytesUsed(Long bytesUsed) { } /** - * Get the permissions property: permissions - * - * Permissions of the subvolume. + * Get the permissions property: Permissions of the subvolume. * * @return the permissions value. */ @@ -199,9 +181,7 @@ public String permissions() { } /** - * Set the permissions property: permissions - * - * Permissions of the subvolume. + * Set the permissions property: Permissions of the subvolume. * * @param permissions the permissions value to set. * @return the SubvolumeModelInner object itself. @@ -215,9 +195,7 @@ public SubvolumeModelInner withPermissions(String permissions) { } /** - * Get the creationTimestamp property: creationTimeStamp - * - * Creation time and date. + * Get the creationTimestamp property: Creation time and date. * * @return the creationTimestamp value. */ @@ -226,9 +204,7 @@ public OffsetDateTime creationTimestamp() { } /** - * Set the creationTimestamp property: creationTimeStamp - * - * Creation time and date. + * Set the creationTimestamp property: Creation time and date. * * @param creationTimestamp the creationTimestamp value to set. * @return the SubvolumeModelInner object itself. @@ -242,9 +218,7 @@ public SubvolumeModelInner withCreationTimestamp(OffsetDateTime creationTimestam } /** - * Get the accessedTimestamp property: accessedTimeStamp - * - * Most recent access time and date. + * Get the accessedTimestamp property: Most recent access time and date. * * @return the accessedTimestamp value. */ @@ -253,9 +227,7 @@ public OffsetDateTime accessedTimestamp() { } /** - * Set the accessedTimestamp property: accessedTimeStamp - * - * Most recent access time and date. + * Set the accessedTimestamp property: Most recent access time and date. * * @param accessedTimestamp the accessedTimestamp value to set. * @return the SubvolumeModelInner object itself. @@ -269,9 +241,7 @@ public SubvolumeModelInner withAccessedTimestamp(OffsetDateTime accessedTimestam } /** - * Get the modifiedTimestamp property: modifiedTimeStamp - * - * Most recent modification time and date. + * Get the modifiedTimestamp property: Most recent modification time and date. * * @return the modifiedTimestamp value. */ @@ -280,9 +250,7 @@ public OffsetDateTime modifiedTimestamp() { } /** - * Set the modifiedTimestamp property: modifiedTimeStamp - * - * Most recent modification time and date. + * Set the modifiedTimestamp property: Most recent modification time and date. * * @param modifiedTimestamp the modifiedTimestamp value to set. * @return the SubvolumeModelInner object itself. @@ -296,9 +264,7 @@ public SubvolumeModelInner withModifiedTimestamp(OffsetDateTime modifiedTimestam } /** - * Get the changedTimestamp property: changedTimeStamp - * - * Most recent change time and date. + * Get the changedTimestamp property: Most recent change time and date. * * @return the changedTimestamp value. */ @@ -307,9 +273,7 @@ public OffsetDateTime changedTimestamp() { } /** - * Set the changedTimestamp property: changedTimeStamp - * - * Most recent change time and date. + * Set the changedTimestamp property: Most recent change time and date. * * @param changedTimestamp the changedTimestamp value to set. * @return the SubvolumeModelInner object itself. @@ -355,4 +319,46 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubvolumeModelInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubvolumeModelInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SubvolumeModelInner. + */ + public static SubvolumeModelInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubvolumeModelInner deserializedSubvolumeModelInner = new SubvolumeModelInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSubvolumeModelInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSubvolumeModelInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSubvolumeModelInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSubvolumeModelInner.innerProperties = SubvolumeModelProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubvolumeModelInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java index 9bb3ac5bf1481..b380f449593ba 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java @@ -5,90 +5,68 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * Properties which represents actual subvolume model which is stored as a file in the system. */ @Fluent -public final class SubvolumeModelProperties { +public final class SubvolumeModelProperties implements JsonSerializable { /* - * path - * * Path to the subvolume */ - @JsonProperty(value = "path") private String path; /* - * parentpath - * * Path to the parent subvolume */ - @JsonProperty(value = "parentPath") private String parentPath; /* - * size - * * Size of subvolume */ - @JsonProperty(value = "size") private Long size; /* - * bytesUsed - * * Bytes used */ - @JsonProperty(value = "bytesUsed") private Long bytesUsed; /* - * permissions - * * Permissions of the subvolume */ - @JsonProperty(value = "permissions") private String permissions; /* - * creationTimeStamp - * * Creation time and date */ - @JsonProperty(value = "creationTimeStamp") private OffsetDateTime creationTimestamp; /* - * accessedTimeStamp - * * Most recent access time and date */ - @JsonProperty(value = "accessedTimeStamp") private OffsetDateTime accessedTimestamp; /* - * modifiedTimeStamp - * * Most recent modification time and date */ - @JsonProperty(value = "modifiedTimeStamp") private OffsetDateTime modifiedTimestamp; /* - * changedTimeStamp - * * Most recent change time and date */ - @JsonProperty(value = "changedTimeStamp") private OffsetDateTime changedTimestamp; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState") private String provisioningState; /** @@ -98,9 +76,7 @@ public SubvolumeModelProperties() { } /** - * Get the path property: path - * - * Path to the subvolume. + * Get the path property: Path to the subvolume. * * @return the path value. */ @@ -109,9 +85,7 @@ public String path() { } /** - * Set the path property: path - * - * Path to the subvolume. + * Set the path property: Path to the subvolume. * * @param path the path value to set. * @return the SubvolumeModelProperties object itself. @@ -122,9 +96,7 @@ public SubvolumeModelProperties withPath(String path) { } /** - * Get the parentPath property: parentpath - * - * Path to the parent subvolume. + * Get the parentPath property: Path to the parent subvolume. * * @return the parentPath value. */ @@ -133,9 +105,7 @@ public String parentPath() { } /** - * Set the parentPath property: parentpath - * - * Path to the parent subvolume. + * Set the parentPath property: Path to the parent subvolume. * * @param parentPath the parentPath value to set. * @return the SubvolumeModelProperties object itself. @@ -146,9 +116,7 @@ public SubvolumeModelProperties withParentPath(String parentPath) { } /** - * Get the size property: size - * - * Size of subvolume. + * Get the size property: Size of subvolume. * * @return the size value. */ @@ -157,9 +125,7 @@ public Long size() { } /** - * Set the size property: size - * - * Size of subvolume. + * Set the size property: Size of subvolume. * * @param size the size value to set. * @return the SubvolumeModelProperties object itself. @@ -170,9 +136,7 @@ public SubvolumeModelProperties withSize(Long size) { } /** - * Get the bytesUsed property: bytesUsed - * - * Bytes used. + * Get the bytesUsed property: Bytes used. * * @return the bytesUsed value. */ @@ -181,9 +145,7 @@ public Long bytesUsed() { } /** - * Set the bytesUsed property: bytesUsed - * - * Bytes used. + * Set the bytesUsed property: Bytes used. * * @param bytesUsed the bytesUsed value to set. * @return the SubvolumeModelProperties object itself. @@ -194,9 +156,7 @@ public SubvolumeModelProperties withBytesUsed(Long bytesUsed) { } /** - * Get the permissions property: permissions - * - * Permissions of the subvolume. + * Get the permissions property: Permissions of the subvolume. * * @return the permissions value. */ @@ -205,9 +165,7 @@ public String permissions() { } /** - * Set the permissions property: permissions - * - * Permissions of the subvolume. + * Set the permissions property: Permissions of the subvolume. * * @param permissions the permissions value to set. * @return the SubvolumeModelProperties object itself. @@ -218,9 +176,7 @@ public SubvolumeModelProperties withPermissions(String permissions) { } /** - * Get the creationTimestamp property: creationTimeStamp - * - * Creation time and date. + * Get the creationTimestamp property: Creation time and date. * * @return the creationTimestamp value. */ @@ -229,9 +185,7 @@ public OffsetDateTime creationTimestamp() { } /** - * Set the creationTimestamp property: creationTimeStamp - * - * Creation time and date. + * Set the creationTimestamp property: Creation time and date. * * @param creationTimestamp the creationTimestamp value to set. * @return the SubvolumeModelProperties object itself. @@ -242,9 +196,7 @@ public SubvolumeModelProperties withCreationTimestamp(OffsetDateTime creationTim } /** - * Get the accessedTimestamp property: accessedTimeStamp - * - * Most recent access time and date. + * Get the accessedTimestamp property: Most recent access time and date. * * @return the accessedTimestamp value. */ @@ -253,9 +205,7 @@ public OffsetDateTime accessedTimestamp() { } /** - * Set the accessedTimestamp property: accessedTimeStamp - * - * Most recent access time and date. + * Set the accessedTimestamp property: Most recent access time and date. * * @param accessedTimestamp the accessedTimestamp value to set. * @return the SubvolumeModelProperties object itself. @@ -266,9 +216,7 @@ public SubvolumeModelProperties withAccessedTimestamp(OffsetDateTime accessedTim } /** - * Get the modifiedTimestamp property: modifiedTimeStamp - * - * Most recent modification time and date. + * Get the modifiedTimestamp property: Most recent modification time and date. * * @return the modifiedTimestamp value. */ @@ -277,9 +225,7 @@ public OffsetDateTime modifiedTimestamp() { } /** - * Set the modifiedTimestamp property: modifiedTimeStamp - * - * Most recent modification time and date. + * Set the modifiedTimestamp property: Most recent modification time and date. * * @param modifiedTimestamp the modifiedTimestamp value to set. * @return the SubvolumeModelProperties object itself. @@ -290,9 +236,7 @@ public SubvolumeModelProperties withModifiedTimestamp(OffsetDateTime modifiedTim } /** - * Get the changedTimestamp property: changedTimeStamp - * - * Most recent change time and date. + * Get the changedTimestamp property: Most recent change time and date. * * @return the changedTimestamp value. */ @@ -301,9 +245,7 @@ public OffsetDateTime changedTimestamp() { } /** - * Set the changedTimestamp property: changedTimeStamp - * - * Most recent change time and date. + * Set the changedTimestamp property: Most recent change time and date. * * @param changedTimestamp the changedTimestamp value to set. * @return the SubvolumeModelProperties object itself. @@ -340,4 +282,83 @@ public SubvolumeModelProperties withProvisioningState(String provisioningState) */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeStringField("parentPath", this.parentPath); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeNumberField("bytesUsed", this.bytesUsed); + jsonWriter.writeStringField("permissions", this.permissions); + jsonWriter.writeStringField("creationTimeStamp", + this.creationTimestamp == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTimestamp)); + jsonWriter.writeStringField("accessedTimeStamp", + this.accessedTimestamp == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.accessedTimestamp)); + jsonWriter.writeStringField("modifiedTimeStamp", + this.modifiedTimestamp == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.modifiedTimestamp)); + jsonWriter.writeStringField("changedTimeStamp", + this.changedTimestamp == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.changedTimestamp)); + jsonWriter.writeStringField("provisioningState", this.provisioningState); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubvolumeModelProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubvolumeModelProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubvolumeModelProperties. + */ + public static SubvolumeModelProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubvolumeModelProperties deserializedSubvolumeModelProperties = new SubvolumeModelProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedSubvolumeModelProperties.path = reader.getString(); + } else if ("parentPath".equals(fieldName)) { + deserializedSubvolumeModelProperties.parentPath = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedSubvolumeModelProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("bytesUsed".equals(fieldName)) { + deserializedSubvolumeModelProperties.bytesUsed = reader.getNullable(JsonReader::getLong); + } else if ("permissions".equals(fieldName)) { + deserializedSubvolumeModelProperties.permissions = reader.getString(); + } else if ("creationTimeStamp".equals(fieldName)) { + deserializedSubvolumeModelProperties.creationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("accessedTimeStamp".equals(fieldName)) { + deserializedSubvolumeModelProperties.accessedTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("modifiedTimeStamp".equals(fieldName)) { + deserializedSubvolumeModelProperties.modifiedTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("changedTimeStamp".equals(fieldName)) { + deserializedSubvolumeModelProperties.changedTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedSubvolumeModelProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubvolumeModelProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java index a978bbd80d27c..c1b57826eff6a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java @@ -5,27 +5,25 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Parameters with which a subvolume can be updated. */ @Fluent -public final class SubvolumePatchParams { +public final class SubvolumePatchParams implements JsonSerializable { /* - * size - * * Truncate subvolume to the provided size in bytes */ - @JsonProperty(value = "size") private Long size; /* - * path - * * path to the subvolume */ - @JsonProperty(value = "path") private String path; /** @@ -35,9 +33,7 @@ public SubvolumePatchParams() { } /** - * Get the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Get the size property: Truncate subvolume to the provided size in bytes. * * @return the size value. */ @@ -46,9 +42,7 @@ public Long size() { } /** - * Set the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Set the size property: Truncate subvolume to the provided size in bytes. * * @param size the size value to set. * @return the SubvolumePatchParams object itself. @@ -59,9 +53,7 @@ public SubvolumePatchParams withSize(Long size) { } /** - * Get the path property: path - * - * path to the subvolume. + * Get the path property: path to the subvolume. * * @return the path value. */ @@ -70,9 +62,7 @@ public String path() { } /** - * Set the path property: path - * - * path to the subvolume. + * Set the path property: path to the subvolume. * * @param path the path value to set. * @return the SubvolumePatchParams object itself. @@ -89,4 +79,43 @@ public SubvolumePatchParams withPath(String path) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeStringField("path", this.path); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubvolumePatchParams from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubvolumePatchParams if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubvolumePatchParams. + */ + public static SubvolumePatchParams fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubvolumePatchParams deserializedSubvolumePatchParams = new SubvolumePatchParams(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedSubvolumePatchParams.size = reader.getNullable(JsonReader::getLong); + } else if ("path".equals(fieldName)) { + deserializedSubvolumePatchParams.path = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubvolumePatchParams; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java index 2dd6c1d7e9419..48acd807a2856 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java @@ -5,41 +5,35 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * This represents path associated with the subvolume. */ @Fluent -public final class SubvolumeProperties { +public final class SubvolumeProperties implements JsonSerializable { /* - * path - * * Path to the subvolume */ - @JsonProperty(value = "path") private String path; /* - * size - * * Truncate subvolume to the provided size in bytes */ - @JsonProperty(value = "size") private Long size; /* - * name - * * parent path to the subvolume */ - @JsonProperty(value = "parentPath") private String parentPath; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /** @@ -49,9 +43,7 @@ public SubvolumeProperties() { } /** - * Get the path property: path - * - * Path to the subvolume. + * Get the path property: Path to the subvolume. * * @return the path value. */ @@ -60,9 +52,7 @@ public String path() { } /** - * Set the path property: path - * - * Path to the subvolume. + * Set the path property: Path to the subvolume. * * @param path the path value to set. * @return the SubvolumeProperties object itself. @@ -73,9 +63,7 @@ public SubvolumeProperties withPath(String path) { } /** - * Get the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Get the size property: Truncate subvolume to the provided size in bytes. * * @return the size value. */ @@ -84,9 +72,7 @@ public Long size() { } /** - * Set the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Set the size property: Truncate subvolume to the provided size in bytes. * * @param size the size value to set. * @return the SubvolumeProperties object itself. @@ -97,9 +83,7 @@ public SubvolumeProperties withSize(Long size) { } /** - * Get the parentPath property: name - * - * parent path to the subvolume. + * Get the parentPath property: parent path to the subvolume. * * @return the parentPath value. */ @@ -108,9 +92,7 @@ public String parentPath() { } /** - * Set the parentPath property: name - * - * parent path to the subvolume. + * Set the parentPath property: parent path to the subvolume. * * @param parentPath the parentPath value to set. * @return the SubvolumeProperties object itself. @@ -136,4 +118,48 @@ public String provisioningState() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeStringField("parentPath", this.parentPath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubvolumeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubvolumeProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SubvolumeProperties. + */ + public static SubvolumeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubvolumeProperties deserializedSubvolumeProperties = new SubvolumeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedSubvolumeProperties.path = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedSubvolumeProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("parentPath".equals(fieldName)) { + deserializedSubvolumeProperties.parentPath = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedSubvolumeProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubvolumeProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java index dbac4e94c36bc..f54926851f3b1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java @@ -5,44 +5,43 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Volume group resource for create. */ @Fluent -public final class VolumeGroupDetailsInner { +public final class VolumeGroupDetailsInner implements JsonSerializable { /* * Resource location */ - @JsonProperty(value = "location") private String location; /* * Resource Id */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Resource name */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Resource type */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; /* * Volume group properties */ - @JsonProperty(value = "properties") private VolumeGroupProperties innerProperties; /** @@ -172,4 +171,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupDetailsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupDetailsInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupDetailsInner. + */ + public static VolumeGroupDetailsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupDetailsInner deserializedVolumeGroupDetailsInner = new VolumeGroupDetailsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedVolumeGroupDetailsInner.location = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedVolumeGroupDetailsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeGroupDetailsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeGroupDetailsInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVolumeGroupDetailsInner.innerProperties = VolumeGroupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupDetailsInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java index ae65ab431a6bf..984780c89b8d0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java @@ -5,42 +5,41 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Volume group resource. */ @Fluent -public final class VolumeGroupInner { +public final class VolumeGroupInner implements JsonSerializable { /* * Resource location */ - @JsonProperty(value = "location") private String location; /* * Resource Id */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Resource name */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Resource type */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; /* * Volume group properties */ - @JsonProperty(value = "properties") private VolumeGroupListProperties innerProperties; /** @@ -147,4 +146,49 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupInner. + */ + public static VolumeGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupInner deserializedVolumeGroupInner = new VolumeGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedVolumeGroupInner.location = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedVolumeGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeGroupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVolumeGroupInner.innerProperties = VolumeGroupListProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java index ae84ab34f2468..2da08512ab4ef 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Volume group properties. */ @Fluent -public final class VolumeGroupListProperties { +public final class VolumeGroupListProperties implements JsonSerializable { /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * Volume group details */ - @JsonProperty(value = "groupMetaData") private VolumeGroupMetadata groupMetadata; /** @@ -70,4 +72,42 @@ public void validate() { groupMetadata().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("groupMetaData", this.groupMetadata); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupListProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupListProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupListProperties. + */ + public static VolumeGroupListProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupListProperties deserializedVolumeGroupListProperties = new VolumeGroupListProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedVolumeGroupListProperties.provisioningState = reader.getString(); + } else if ("groupMetaData".equals(fieldName)) { + deserializedVolumeGroupListProperties.groupMetadata = VolumeGroupMetadata.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupListProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java index 31377a977c571..1807b94351ef8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java @@ -5,32 +5,33 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.VolumeGroupMetadata; import com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Volume group properties. */ @Fluent -public final class VolumeGroupProperties { +public final class VolumeGroupProperties implements JsonSerializable { /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* * Volume group details */ - @JsonProperty(value = "groupMetaData") private VolumeGroupMetadata groupMetadata; /* * List of volumes from group */ - @JsonProperty(value = "volumes") private List volumes; /** @@ -101,4 +102,47 @@ public void validate() { volumes().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("groupMetaData", this.groupMetadata); + jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupProperties. + */ + public static VolumeGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupProperties deserializedVolumeGroupProperties = new VolumeGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedVolumeGroupProperties.provisioningState = reader.getString(); + } else if ("groupMetaData".equals(fieldName)) { + deserializedVolumeGroupProperties.groupMetadata = VolumeGroupMetadata.fromJson(reader); + } else if ("volumes".equals(fieldName)) { + List volumes + = reader.readArray(reader1 -> VolumeGroupVolumeProperties.fromJson(reader1)); + deserializedVolumeGroupProperties.volumes = volumes; + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java index 2649e4016a1b9..95cbbded36358 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java @@ -8,6 +8,9 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; @@ -22,7 +25,7 @@ import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -34,27 +37,38 @@ public final class VolumeInner extends Resource { /* * A unique read-only string that changes whenever the resource is updated. */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; /* * Availability Zone */ - @JsonProperty(value = "zones") private List zones; /* * Volume properties */ - @JsonProperty(value = "properties", required = true) private VolumeProperties innerProperties = new VolumeProperties(); /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of VolumeInner class. */ @@ -108,6 +122,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -127,9 +171,7 @@ public VolumeInner withTags(Map tags) { } /** - * Get the fileSystemId property: FileSystem ID - * - * Unique FileSystem Identifier. + * Get the fileSystemId property: Unique FileSystem Identifier. * * @return the fileSystemId value. */ @@ -138,9 +180,7 @@ public String fileSystemId() { } /** - * Get the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Get the creationToken property: A unique file path for the volume. Used when creating mount targets. * * @return the creationToken value. */ @@ -149,9 +189,7 @@ public String creationToken() { } /** - * Set the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Set the creationToken property: A unique file path for the volume. Used when creating mount targets. * * @param creationToken the creationToken value to set. * @return the VolumeInner object itself. @@ -165,9 +203,7 @@ public VolumeInner withCreationToken(String creationToken) { } /** - * Get the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Get the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -176,9 +212,7 @@ public ServiceLevel serviceLevel() { } /** - * Set the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Set the serviceLevel property: The service level of the file system. * * @param serviceLevel the serviceLevel value to set. * @return the VolumeInner object itself. @@ -192,11 +226,10 @@ public VolumeInner withServiceLevel(ServiceLevel serviceLevel) { } /** - * Get the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @return the usageThreshold value. */ @@ -205,11 +238,10 @@ public long usageThreshold() { } /** - * Set the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeInner object itself. @@ -223,9 +255,7 @@ public VolumeInner withUsageThreshold(long usageThreshold) { } /** - * Get the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Get the exportPolicy property: Set of export policy rules. * * @return the exportPolicy value. */ @@ -234,9 +264,7 @@ public VolumePropertiesExportPolicy exportPolicy() { } /** - * Set the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Set the exportPolicy property: Set of export policy rules. * * @param exportPolicy the exportPolicy value to set. * @return the VolumeInner object itself. @@ -250,9 +278,7 @@ public VolumeInner withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { } /** - * Get the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * * @return the protocolTypes value. */ @@ -261,9 +287,7 @@ public List protocolTypes() { } /** - * Set the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * * @param protocolTypes the protocolTypes value to set. * @return the VolumeInner object itself. @@ -286,9 +310,7 @@ public String provisioningState() { } /** - * Get the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot. + * Get the snapshotId property: Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -297,9 +319,7 @@ public String snapshotId() { } /** - * Set the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot. + * Set the snapshotId property: Resource identifier used to identify the Snapshot. * * @param snapshotId the snapshotId value to set. * @return the VolumeInner object itself. @@ -338,9 +358,7 @@ public VolumeInner withDeleteBaseSnapshot(Boolean deleteBaseSnapshot) { } /** - * Get the backupId property: Backup ID - * - * Resource identifier used to identify the Backup. + * Get the backupId property: Resource identifier used to identify the Backup. * * @return the backupId value. */ @@ -349,9 +367,7 @@ public String backupId() { } /** - * Set the backupId property: Backup ID - * - * Resource identifier used to identify the Backup. + * Set the backupId property: Resource identifier used to identify the Backup. * * @param backupId the backupId value to set. * @return the VolumeInner object itself. @@ -365,9 +381,7 @@ public VolumeInner withBackupId(String backupId) { } /** - * Get the baremetalTenantId property: Baremetal Tenant ID - * - * Unique Baremetal Tenant Identifier. + * Get the baremetalTenantId property: Unique Baremetal Tenant Identifier. * * @return the baremetalTenantId value. */ @@ -401,9 +415,7 @@ public VolumeInner withSubnetId(String subnetId) { } /** - * Get the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Get the networkFeatures property: Network features available to the volume, or current state of update. * * @return the networkFeatures value. */ @@ -412,9 +424,7 @@ public NetworkFeatures networkFeatures() { } /** - * Set the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Set the networkFeatures property: Network features available to the volume, or current state of update. * * @param networkFeatures the networkFeatures value to set. * @return the VolumeInner object itself. @@ -428,9 +438,8 @@ public VolumeInner withNetworkFeatures(NetworkFeatures networkFeatures) { } /** - * Get the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for the the group of volumes sharing networking resources. + * Get the networkSiblingSetId property: Network Sibling Set ID for the the group of volumes sharing networking + * resources. * * @return the networkSiblingSetId value. */ @@ -439,9 +448,7 @@ public String networkSiblingSetId() { } /** - * Get the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information for the volume. + * Get the storageToNetworkProximity property: Provides storage to network proximity information for the volume. * * @return the storageToNetworkProximity value. */ @@ -450,9 +457,7 @@ public VolumeStorageToNetworkProximity storageToNetworkProximity() { } /** - * Get the mountTargets property: mountTargets - * - * List of mount targets. + * Get the mountTargets property: List of mount targets. * * @return the mountTargets value. */ @@ -486,9 +491,8 @@ public VolumeInner withVolumeType(String volumeType) { } /** - * Get the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Get the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @return the dataProtection value. */ @@ -497,9 +501,8 @@ public VolumePropertiesDataProtection dataProtection() { } /** - * Set the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Set the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @param dataProtection the dataProtection value to set. * @return the VolumeInner object itself. @@ -636,9 +639,8 @@ public VolumeInner withSmbEncryption(Boolean smbEncryption) { } /** - * Get the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @return the smbAccessBasedEnumeration value. */ @@ -647,9 +649,8 @@ public SmbAccessBasedEnumeration smbAccessBasedEnumeration() { } /** - * Set the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @param smbAccessBasedEnumeration the smbAccessBasedEnumeration value to set. * @return the VolumeInner object itself. @@ -663,9 +664,8 @@ public VolumeInner withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration smbAc } /** - * Get the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @return the smbNonBrowsable value. */ @@ -674,9 +674,8 @@ public SmbNonBrowsable smbNonBrowsable() { } /** - * Set the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @param smbNonBrowsable the smbNonBrowsable value to set. * @return the VolumeInner object itself. @@ -960,9 +959,8 @@ public FileAccessLogs fileAccessLogs() { } /** - * Get the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * Get the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * * @return the avsDataStore value. */ @@ -971,9 +969,8 @@ public AvsDataStore avsDataStore() { } /** - * Set the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * Set the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * * @param avsDataStore the avsDataStore value to set. * @return the VolumeInner object itself. @@ -987,9 +984,7 @@ public VolumeInner withAvsDataStore(AvsDataStore avsDataStore) { } /** - * Get the dataStoreResourceId property: dataStoreResourceId - * - * Data store resource unique identifier. + * Get the dataStoreResourceId property: Data store resource unique identifier. * * @return the dataStoreResourceId value. */ @@ -1180,9 +1175,7 @@ public Boolean encrypted() { } /** - * Get the placementRules property: Volume placement rules - * - * Application specific placement rules for the particular volume. + * Get the placementRules property: Application specific placement rules for the particular volume. * * @return the placementRules value. */ @@ -1191,9 +1184,7 @@ public List placementRules() { } /** - * Set the placementRules property: Volume placement rules - * - * Application specific placement rules for the particular volume. + * Set the placementRules property: Application specific placement rules for the particular volume. * * @param placementRules the placementRules value to set. * @return the VolumeInner object itself. @@ -1230,10 +1221,8 @@ public VolumeInner withEnableSubvolumes(EnableSubvolumes enableSubvolumes) { } /** - * Get the provisionedAvailabilityZone property: Provisioned Availability Zone - * - * The availability zone where the volume is provisioned. This refers to the logical availability zone where the - * volume resides. + * Get the provisionedAvailabilityZone property: The availability zone where the volume is provisioned. This refers + * to the logical availability zone where the volume resides. * * @return the provisionedAvailabilityZone value. */ @@ -1242,9 +1231,7 @@ public String provisionedAvailabilityZone() { } /** - * Get the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * Get the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume. * * @return the isLargeVolume value. */ @@ -1253,9 +1240,7 @@ public Boolean isLargeVolume() { } /** - * Set the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * Set the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume. * * @param isLargeVolume the isLargeVolume value to set. * @return the VolumeInner object itself. @@ -1269,9 +1254,7 @@ public VolumeInner withIsLargeVolume(Boolean isLargeVolume) { } /** - * Get the originatingResourceId property: Originating Resource Id - * - * Id of the snapshot or backup that the volume is restored from. + * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * * @return the originatingResourceId value. */ @@ -1294,4 +1277,62 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(VolumeInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeInner. + */ + public static VolumeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeInner deserializedVolumeInner = new VolumeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVolumeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedVolumeInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVolumeInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedVolumeInner.innerProperties = VolumeProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedVolumeInner.etag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedVolumeInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedVolumeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java index 7fc0546664d0c..d49129157bd92 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java @@ -5,122 +5,116 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.List; /** * Patchable volume properties. */ @Fluent -public final class VolumePatchProperties { +public final class VolumePatchProperties implements JsonSerializable { /* - * serviceLevel - * * The service level of the file system */ - @JsonProperty(value = "serviceLevel") private ServiceLevel serviceLevel; /* - * usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. Specified in bytes. + * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For + * regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range + * 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples + * of 1 GiB. */ - @JsonProperty(value = "usageThreshold") private Long usageThreshold; /* - * exportPolicy - * * Set of export policy rules */ - @JsonProperty(value = "exportPolicy") private VolumePatchPropertiesExportPolicy exportPolicy; /* - * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + * Set of protocol types, default NFSv3, CIFS for SMB protocol + */ + private List protocolTypes; + + /* + * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for + * manual qosType volume */ - @JsonProperty(value = "throughputMibps") private Float throughputMibps; /* - * DataProtection - * * DataProtection type volumes include an object containing details of the replication */ - @JsonProperty(value = "dataProtection") private VolumePatchPropertiesDataProtection dataProtection; /* * Specifies if default quota is enabled for the volume. */ - @JsonProperty(value = "isDefaultQuotaEnabled") private Boolean isDefaultQuotaEnabled; /* * Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . */ - @JsonProperty(value = "defaultUserQuotaInKiBs") private Long defaultUserQuotaInKiBs; /* * Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ - @JsonProperty(value = "defaultGroupQuotaInKiBs") private Long defaultGroupQuotaInKiBs; /* - * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set + * group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), + * write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other + * users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other + * users. */ - @JsonProperty(value = "unixPermissions") private String unixPermissions; /* * Specifies whether Cool Access(tiering) is enabled for the volume. */ - @JsonProperty(value = "coolAccess") private Boolean coolAccess; /* * Specifies the number of days after which data that is not accessed by clients will be tiered. */ - @JsonProperty(value = "coolnessPeriod") private Integer coolnessPeriod; /* - * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: - * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. - * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. - * Never - No client-driven data is pulled from cool tier to standard storage. + * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on + * the read pattern for cool access enabled volumes. The possible values for this field are: + * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random + * reads. + * Never - No client-driven data is pulled from cool tier to standard storage. */ - @JsonProperty(value = "coolAccessRetrievalPolicy") private CoolAccessRetrievalPolicy coolAccessRetrievalPolicy; /* - * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots. + * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the + * volume's snapshots. */ - @JsonProperty(value = "snapshotDirectoryVisible") private Boolean snapshotDirectoryVisible; /* - * smbAccessBasedEnumeration - * * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume */ - @JsonProperty(value = "smbAccessBasedEnumeration") private SmbAccessBasedEnumeration smbAccessBasedEnumeration; /* - * smbNonBrowsable - * * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume */ - @JsonProperty(value = "smbNonBrowsable") private SmbNonBrowsable smbNonBrowsable; /** @@ -130,9 +124,7 @@ public VolumePatchProperties() { } /** - * Get the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Get the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -141,9 +133,7 @@ public ServiceLevel serviceLevel() { } /** - * Set the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Set the serviceLevel property: The service level of the file system. * * @param serviceLevel the serviceLevel value to set. * @return the VolumePatchProperties object itself. @@ -154,11 +144,10 @@ public VolumePatchProperties withServiceLevel(ServiceLevel serviceLevel) { } /** - * Get the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @return the usageThreshold value. */ @@ -167,11 +156,10 @@ public Long usageThreshold() { } /** - * Set the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumePatchProperties object itself. @@ -182,9 +170,7 @@ public VolumePatchProperties withUsageThreshold(Long usageThreshold) { } /** - * Get the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Get the exportPolicy property: Set of export policy rules. * * @return the exportPolicy value. */ @@ -193,9 +179,7 @@ public VolumePatchPropertiesExportPolicy exportPolicy() { } /** - * Set the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Set the exportPolicy property: Set of export policy rules. * * @param exportPolicy the exportPolicy value to set. * @return the VolumePatchProperties object itself. @@ -205,6 +189,26 @@ public VolumePatchProperties withExportPolicy(VolumePatchPropertiesExportPolicy return this; } + /** + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @param protocolTypes the protocolTypes value to set. + * @return the VolumePatchProperties object itself. + */ + public VolumePatchProperties withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + /** * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this volume and this will * be accepted as input only for manual qosType volume. @@ -228,9 +232,8 @@ public VolumePatchProperties withThroughputMibps(Float throughputMibps) { } /** - * Get the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Get the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @return the dataProtection value. */ @@ -239,9 +242,8 @@ public VolumePatchPropertiesDataProtection dataProtection() { } /** - * Set the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Set the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @param dataProtection the dataProtection value to set. * @return the VolumePatchProperties object itself. @@ -440,9 +442,8 @@ public VolumePatchProperties withSnapshotDirectoryVisible(Boolean snapshotDirect } /** - * Get the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @return the smbAccessBasedEnumeration value. */ @@ -451,9 +452,8 @@ public SmbAccessBasedEnumeration smbAccessBasedEnumeration() { } /** - * Set the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @param smbAccessBasedEnumeration the smbAccessBasedEnumeration value to set. * @return the VolumePatchProperties object itself. @@ -464,9 +464,8 @@ public VolumePatchProperties withSmbAccessBasedEnumeration(SmbAccessBasedEnumera } /** - * Get the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @return the smbNonBrowsable value. */ @@ -475,9 +474,8 @@ public SmbNonBrowsable smbNonBrowsable() { } /** - * Set the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @param smbNonBrowsable the smbNonBrowsable value to set. * @return the VolumePatchProperties object itself. @@ -500,4 +498,95 @@ public void validate() { dataProtection().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("serviceLevel", this.serviceLevel == null ? null : this.serviceLevel.toString()); + jsonWriter.writeNumberField("usageThreshold", this.usageThreshold); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("throughputMibps", this.throughputMibps); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeBooleanField("isDefaultQuotaEnabled", this.isDefaultQuotaEnabled); + jsonWriter.writeNumberField("defaultUserQuotaInKiBs", this.defaultUserQuotaInKiBs); + jsonWriter.writeNumberField("defaultGroupQuotaInKiBs", this.defaultGroupQuotaInKiBs); + jsonWriter.writeStringField("unixPermissions", this.unixPermissions); + jsonWriter.writeBooleanField("coolAccess", this.coolAccess); + jsonWriter.writeNumberField("coolnessPeriod", this.coolnessPeriod); + jsonWriter.writeStringField("coolAccessRetrievalPolicy", + this.coolAccessRetrievalPolicy == null ? null : this.coolAccessRetrievalPolicy.toString()); + jsonWriter.writeBooleanField("snapshotDirectoryVisible", this.snapshotDirectoryVisible); + jsonWriter.writeStringField("smbAccessBasedEnumeration", + this.smbAccessBasedEnumeration == null ? null : this.smbAccessBasedEnumeration.toString()); + jsonWriter.writeStringField("smbNonBrowsable", + this.smbNonBrowsable == null ? null : this.smbNonBrowsable.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumePatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumePatchProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumePatchProperties. + */ + public static VolumePatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumePatchProperties deserializedVolumePatchProperties = new VolumePatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serviceLevel".equals(fieldName)) { + deserializedVolumePatchProperties.serviceLevel = ServiceLevel.fromString(reader.getString()); + } else if ("usageThreshold".equals(fieldName)) { + deserializedVolumePatchProperties.usageThreshold = reader.getNullable(JsonReader::getLong); + } else if ("exportPolicy".equals(fieldName)) { + deserializedVolumePatchProperties.exportPolicy = VolumePatchPropertiesExportPolicy.fromJson(reader); + } else if ("protocolTypes".equals(fieldName)) { + List protocolTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedVolumePatchProperties.protocolTypes = protocolTypes; + } else if ("throughputMibps".equals(fieldName)) { + deserializedVolumePatchProperties.throughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("dataProtection".equals(fieldName)) { + deserializedVolumePatchProperties.dataProtection + = VolumePatchPropertiesDataProtection.fromJson(reader); + } else if ("isDefaultQuotaEnabled".equals(fieldName)) { + deserializedVolumePatchProperties.isDefaultQuotaEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("defaultUserQuotaInKiBs".equals(fieldName)) { + deserializedVolumePatchProperties.defaultUserQuotaInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("defaultGroupQuotaInKiBs".equals(fieldName)) { + deserializedVolumePatchProperties.defaultGroupQuotaInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("unixPermissions".equals(fieldName)) { + deserializedVolumePatchProperties.unixPermissions = reader.getString(); + } else if ("coolAccess".equals(fieldName)) { + deserializedVolumePatchProperties.coolAccess = reader.getNullable(JsonReader::getBoolean); + } else if ("coolnessPeriod".equals(fieldName)) { + deserializedVolumePatchProperties.coolnessPeriod = reader.getNullable(JsonReader::getInt); + } else if ("coolAccessRetrievalPolicy".equals(fieldName)) { + deserializedVolumePatchProperties.coolAccessRetrievalPolicy + = CoolAccessRetrievalPolicy.fromString(reader.getString()); + } else if ("snapshotDirectoryVisible".equals(fieldName)) { + deserializedVolumePatchProperties.snapshotDirectoryVisible + = reader.getNullable(JsonReader::getBoolean); + } else if ("smbAccessBasedEnumeration".equals(fieldName)) { + deserializedVolumePatchProperties.smbAccessBasedEnumeration + = SmbAccessBasedEnumeration.fromString(reader.getString()); + } else if ("smbNonBrowsable".equals(fieldName)) { + deserializedVolumePatchProperties.smbNonBrowsable = SmbNonBrowsable.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumePatchProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java index 36fe6b083f28e..33a24953a6460 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java @@ -6,6 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.EnableSubvolumes; @@ -20,383 +24,306 @@ import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * Volume properties. */ @Fluent -public final class VolumeProperties { +public final class VolumeProperties implements JsonSerializable { /* - * FileSystem ID - * * Unique FileSystem Identifier. */ - @JsonProperty(value = "fileSystemId", access = JsonProperty.Access.WRITE_ONLY) private String fileSystemId; /* - * Creation Token or File Path - * * A unique file path for the volume. Used when creating mount targets */ - @JsonProperty(value = "creationToken", required = true) private String creationToken; /* - * serviceLevel - * * The service level of the file system */ - @JsonProperty(value = "serviceLevel") private ServiceLevel serviceLevel; /* - * usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. Specified in bytes. + * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. For + * regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, valid values are in the range + * 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values expressed in bytes as multiples + * of 1 GiB. */ - @JsonProperty(value = "usageThreshold", required = true) private long usageThreshold; /* - * exportPolicy - * * Set of export policy rules */ - @JsonProperty(value = "exportPolicy") private VolumePropertiesExportPolicy exportPolicy; /* - * protocolTypes - * * Set of protocol types, default NFSv3, CIFS for SMB protocol */ - @JsonProperty(value = "protocolTypes") private List protocolTypes; /* * Azure lifecycle management */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* - * Snapshot ID - * * Resource identifier used to identify the Snapshot. */ - @JsonProperty(value = "snapshotId") private String snapshotId; /* - * If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false + * If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create + * operation has finished. Defaults to false */ - @JsonProperty(value = "deleteBaseSnapshot") private Boolean deleteBaseSnapshot; /* - * Backup ID - * * Resource identifier used to identify the Backup. */ - @JsonProperty(value = "backupId") private String backupId; /* - * Baremetal Tenant ID - * * Unique Baremetal Tenant Identifier. */ - @JsonProperty(value = "baremetalTenantId", access = JsonProperty.Access.WRITE_ONLY) private String baremetalTenantId; /* * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes */ - @JsonProperty(value = "subnetId", required = true) private String subnetId; /* - * Network features - * * Network features available to the volume, or current state of update. */ - @JsonProperty(value = "networkFeatures") private NetworkFeatures networkFeatures; /* - * Network Sibling Set ID - * * Network Sibling Set ID for the the group of volumes sharing networking resources. */ - @JsonProperty(value = "networkSiblingSetId", access = JsonProperty.Access.WRITE_ONLY) private String networkSiblingSetId; /* - * Storage to Network Proximity - * * Provides storage to network proximity information for the volume. */ - @JsonProperty(value = "storageToNetworkProximity", access = JsonProperty.Access.WRITE_ONLY) private VolumeStorageToNetworkProximity storageToNetworkProximity; /* - * mountTargets - * * List of mount targets */ - @JsonProperty(value = "mountTargets", access = JsonProperty.Access.WRITE_ONLY) private List mountTargets; /* * What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection */ - @JsonProperty(value = "volumeType") private String volumeType; /* - * DataProtection - * * DataProtection type volumes include an object containing details of the replication */ - @JsonProperty(value = "dataProtection") private VolumePropertiesDataProtection dataProtection; /* * Restoring */ - @JsonProperty(value = "isRestoring") private Boolean isRestoring; /* - * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + * If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the + * volume's snapshots (defaults to true). */ - @JsonProperty(value = "snapshotDirectoryVisible") private Boolean snapshotDirectoryVisible; /* * Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later */ - @JsonProperty(value = "kerberosEnabled") private Boolean kerberosEnabled; /* * The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol */ - @JsonProperty(value = "securityStyle") private SecurityStyle securityStyle; /* - * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later + * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger + * version 2020-08-01 or later */ - @JsonProperty(value = "smbEncryption") private Boolean smbEncryption; /* - * smbAccessBasedEnumeration - * * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume */ - @JsonProperty(value = "smbAccessBasedEnumeration") private SmbAccessBasedEnumeration smbAccessBasedEnumeration; /* - * smbNonBrowsable - * * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume */ - @JsonProperty(value = "smbNonBrowsable") private SmbNonBrowsable smbNonBrowsable; /* * Enables continuously available share property for smb volume. Only applicable for SMB volume */ - @JsonProperty(value = "smbContinuouslyAvailable") private Boolean smbContinuouslyAvailable; /* - * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume + * Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for + * manual qosType volume */ - @JsonProperty(value = "throughputMibps") private Float throughputMibps; /* * Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel */ - @JsonProperty(value = "actualThroughputMibps", access = JsonProperty.Access.WRITE_ONLY) private Float actualThroughputMibps; /* - * Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + * Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = + * 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' */ - @JsonProperty(value = "encryptionKeySource") private EncryptionKeySource encryptionKeySource; /* - * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable + * if encryptionKeySource = 'Microsoft.KeyVault'. */ - @JsonProperty(value = "keyVaultPrivateEndpointResourceId") private String keyVaultPrivateEndpointResourceId; /* * Specifies whether LDAP is enabled or not for a given NFS volume. */ - @JsonProperty(value = "ldapEnabled") private Boolean ldapEnabled; /* * Specifies whether Cool Access(tiering) is enabled for the volume. */ - @JsonProperty(value = "coolAccess") private Boolean coolAccess; /* * Specifies the number of days after which data that is not accessed by clients will be tiered. */ - @JsonProperty(value = "coolnessPeriod") private Integer coolnessPeriod; /* - * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: - * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. - * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. - * Never - No client-driven data is pulled from cool tier to standard storage. + * coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on + * the read pattern for cool access enabled volumes. The possible values for this field are: + * Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + * OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random + * reads. + * Never - No client-driven data is pulled from cool tier to standard storage. */ - @JsonProperty(value = "coolAccessRetrievalPolicy") private CoolAccessRetrievalPolicy coolAccessRetrievalPolicy; /* - * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + * UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set + * group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), + * write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other + * users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other + * users. */ - @JsonProperty(value = "unixPermissions") private String unixPermissions; /* - * When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + * When a volume is being restored from another volume's snapshot, will show the percentage completion of this + * cloning process. When this value is empty/null there is no cloning process currently happening on this volume. + * This value will update every 5 minutes during cloning. */ - @JsonProperty(value = "cloneProgress", access = JsonProperty.Access.WRITE_ONLY) private Integer cloneProgress; /* - * Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + * Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present + * on the volume. */ - @JsonProperty(value = "fileAccessLogs", access = JsonProperty.Access.WRITE_ONLY) private FileAccessLogs fileAccessLogs; /* - * avsDataStore - * * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose */ - @JsonProperty(value = "avsDataStore") private AvsDataStore avsDataStore; /* - * dataStoreResourceId - * * Data store resource unique identifier */ - @JsonProperty(value = "dataStoreResourceId", access = JsonProperty.Access.WRITE_ONLY) private List dataStoreResourceId; /* * Specifies if default quota is enabled for the volume. */ - @JsonProperty(value = "isDefaultQuotaEnabled") private Boolean isDefaultQuotaEnabled; /* * Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . */ - @JsonProperty(value = "defaultUserQuotaInKiBs") private Long defaultUserQuotaInKiBs; /* * Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. */ - @JsonProperty(value = "defaultGroupQuotaInKiBs") private Long defaultGroupQuotaInKiBs; /* - * Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + * Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if + * volume quota is more than 4TiB. */ - @JsonProperty(value = "maximumNumberOfFiles", access = JsonProperty.Access.WRITE_ONLY) private Long maximumNumberOfFiles; /* * Volume Group Name */ - @JsonProperty(value = "volumeGroupName", access = JsonProperty.Access.WRITE_ONLY) private String volumeGroupName; /* * Pool Resource Id used in case of creating a volume through volume group */ - @JsonProperty(value = "capacityPoolResourceId") private String capacityPoolResourceId; /* * Proximity placement group associated with the volume */ - @JsonProperty(value = "proximityPlacementGroup") private String proximityPlacementGroup; /* * T2 network information */ - @JsonProperty(value = "t2Network", access = JsonProperty.Access.WRITE_ONLY) private String t2Network; /* - * Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log + * Volume spec name is the application specific designation or identifier for the particular volume in a volume + * group for e.g. data, log */ - @JsonProperty(value = "volumeSpecName") private String volumeSpecName; /* * Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. */ - @JsonProperty(value = "encrypted", access = JsonProperty.Access.WRITE_ONLY) private Boolean encrypted; /* - * Volume placement rules - * * Application specific placement rules for the particular volume */ - @JsonProperty(value = "placementRules") private List placementRules; /* * Flag indicating whether subvolume operations are enabled on the volume */ - @JsonProperty(value = "enableSubvolumes") private EnableSubvolumes enableSubvolumes; /* - * Provisioned Availability Zone - * - * The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + * The availability zone where the volume is provisioned. This refers to the logical availability zone where the + * volume resides. */ - @JsonProperty(value = "provisionedAvailabilityZone", access = JsonProperty.Access.WRITE_ONLY) private String provisionedAvailabilityZone; /* - * Is Large Volume - * * Specifies whether volume is a Large Volume or Regular Volume. */ - @JsonProperty(value = "isLargeVolume") private Boolean isLargeVolume; /* - * Originating Resource Id - * * Id of the snapshot or backup that the volume is restored from. */ - @JsonProperty(value = "originatingResourceId", access = JsonProperty.Access.WRITE_ONLY) private String originatingResourceId; /** @@ -406,9 +333,7 @@ public VolumeProperties() { } /** - * Get the fileSystemId property: FileSystem ID - * - * Unique FileSystem Identifier. + * Get the fileSystemId property: Unique FileSystem Identifier. * * @return the fileSystemId value. */ @@ -417,9 +342,7 @@ public String fileSystemId() { } /** - * Get the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Get the creationToken property: A unique file path for the volume. Used when creating mount targets. * * @return the creationToken value. */ @@ -428,9 +351,7 @@ public String creationToken() { } /** - * Set the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Set the creationToken property: A unique file path for the volume. Used when creating mount targets. * * @param creationToken the creationToken value to set. * @return the VolumeProperties object itself. @@ -441,9 +362,7 @@ public VolumeProperties withCreationToken(String creationToken) { } /** - * Get the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Get the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -452,9 +371,7 @@ public ServiceLevel serviceLevel() { } /** - * Set the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Set the serviceLevel property: The service level of the file system. * * @param serviceLevel the serviceLevel value to set. * @return the VolumeProperties object itself. @@ -465,11 +382,10 @@ public VolumeProperties withServiceLevel(ServiceLevel serviceLevel) { } /** - * Get the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @return the usageThreshold value. */ @@ -478,11 +394,10 @@ public long usageThreshold() { } /** - * Set the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeProperties object itself. @@ -493,9 +408,7 @@ public VolumeProperties withUsageThreshold(long usageThreshold) { } /** - * Get the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Get the exportPolicy property: Set of export policy rules. * * @return the exportPolicy value. */ @@ -504,9 +417,7 @@ public VolumePropertiesExportPolicy exportPolicy() { } /** - * Set the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Set the exportPolicy property: Set of export policy rules. * * @param exportPolicy the exportPolicy value to set. * @return the VolumeProperties object itself. @@ -517,9 +428,7 @@ public VolumeProperties withExportPolicy(VolumePropertiesExportPolicy exportPoli } /** - * Get the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * * @return the protocolTypes value. */ @@ -528,9 +437,7 @@ public List protocolTypes() { } /** - * Set the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * * @param protocolTypes the protocolTypes value to set. * @return the VolumeProperties object itself. @@ -550,9 +457,7 @@ public String provisioningState() { } /** - * Get the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot. + * Get the snapshotId property: Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -561,9 +466,7 @@ public String snapshotId() { } /** - * Set the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot. + * Set the snapshotId property: Resource identifier used to identify the Snapshot. * * @param snapshotId the snapshotId value to set. * @return the VolumeProperties object itself. @@ -596,9 +499,7 @@ public VolumeProperties withDeleteBaseSnapshot(Boolean deleteBaseSnapshot) { } /** - * Get the backupId property: Backup ID - * - * Resource identifier used to identify the Backup. + * Get the backupId property: Resource identifier used to identify the Backup. * * @return the backupId value. */ @@ -607,9 +508,7 @@ public String backupId() { } /** - * Set the backupId property: Backup ID - * - * Resource identifier used to identify the Backup. + * Set the backupId property: Resource identifier used to identify the Backup. * * @param backupId the backupId value to set. * @return the VolumeProperties object itself. @@ -620,9 +519,7 @@ public VolumeProperties withBackupId(String backupId) { } /** - * Get the baremetalTenantId property: Baremetal Tenant ID - * - * Unique Baremetal Tenant Identifier. + * Get the baremetalTenantId property: Unique Baremetal Tenant Identifier. * * @return the baremetalTenantId value. */ @@ -653,9 +550,7 @@ public VolumeProperties withSubnetId(String subnetId) { } /** - * Get the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Get the networkFeatures property: Network features available to the volume, or current state of update. * * @return the networkFeatures value. */ @@ -664,9 +559,7 @@ public NetworkFeatures networkFeatures() { } /** - * Set the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Set the networkFeatures property: Network features available to the volume, or current state of update. * * @param networkFeatures the networkFeatures value to set. * @return the VolumeProperties object itself. @@ -677,9 +570,8 @@ public VolumeProperties withNetworkFeatures(NetworkFeatures networkFeatures) { } /** - * Get the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for the the group of volumes sharing networking resources. + * Get the networkSiblingSetId property: Network Sibling Set ID for the the group of volumes sharing networking + * resources. * * @return the networkSiblingSetId value. */ @@ -688,9 +580,7 @@ public String networkSiblingSetId() { } /** - * Get the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information for the volume. + * Get the storageToNetworkProximity property: Provides storage to network proximity information for the volume. * * @return the storageToNetworkProximity value. */ @@ -699,9 +589,7 @@ public VolumeStorageToNetworkProximity storageToNetworkProximity() { } /** - * Get the mountTargets property: mountTargets - * - * List of mount targets. + * Get the mountTargets property: List of mount targets. * * @return the mountTargets value. */ @@ -732,9 +620,8 @@ public VolumeProperties withVolumeType(String volumeType) { } /** - * Get the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Get the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @return the dataProtection value. */ @@ -743,9 +630,8 @@ public VolumePropertiesDataProtection dataProtection() { } /** - * Set the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Set the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @param dataProtection the dataProtection value to set. * @return the VolumeProperties object itself. @@ -864,9 +750,8 @@ public VolumeProperties withSmbEncryption(Boolean smbEncryption) { } /** - * Get the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @return the smbAccessBasedEnumeration value. */ @@ -875,9 +760,8 @@ public SmbAccessBasedEnumeration smbAccessBasedEnumeration() { } /** - * Set the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @param smbAccessBasedEnumeration the smbAccessBasedEnumeration value to set. * @return the VolumeProperties object itself. @@ -888,9 +772,8 @@ public VolumeProperties withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration } /** - * Get the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @return the smbNonBrowsable value. */ @@ -899,9 +782,8 @@ public SmbNonBrowsable smbNonBrowsable() { } /** - * Set the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @param smbNonBrowsable the smbNonBrowsable value to set. * @return the VolumeProperties object itself. @@ -1155,9 +1037,8 @@ public FileAccessLogs fileAccessLogs() { } /** - * Get the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * Get the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * * @return the avsDataStore value. */ @@ -1166,9 +1047,8 @@ public AvsDataStore avsDataStore() { } /** - * Set the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * Set the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * * @param avsDataStore the avsDataStore value to set. * @return the VolumeProperties object itself. @@ -1179,9 +1059,7 @@ public VolumeProperties withAvsDataStore(AvsDataStore avsDataStore) { } /** - * Get the dataStoreResourceId property: dataStoreResourceId - * - * Data store resource unique identifier. + * Get the dataStoreResourceId property: Data store resource unique identifier. * * @return the dataStoreResourceId value. */ @@ -1354,9 +1232,7 @@ public Boolean encrypted() { } /** - * Get the placementRules property: Volume placement rules - * - * Application specific placement rules for the particular volume. + * Get the placementRules property: Application specific placement rules for the particular volume. * * @return the placementRules value. */ @@ -1365,9 +1241,7 @@ public List placementRules() { } /** - * Set the placementRules property: Volume placement rules - * - * Application specific placement rules for the particular volume. + * Set the placementRules property: Application specific placement rules for the particular volume. * * @param placementRules the placementRules value to set. * @return the VolumeProperties object itself. @@ -1398,10 +1272,8 @@ public VolumeProperties withEnableSubvolumes(EnableSubvolumes enableSubvolumes) } /** - * Get the provisionedAvailabilityZone property: Provisioned Availability Zone - * - * The availability zone where the volume is provisioned. This refers to the logical availability zone where the - * volume resides. + * Get the provisionedAvailabilityZone property: The availability zone where the volume is provisioned. This refers + * to the logical availability zone where the volume resides. * * @return the provisionedAvailabilityZone value. */ @@ -1410,9 +1282,7 @@ public String provisionedAvailabilityZone() { } /** - * Get the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * Get the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume. * * @return the isLargeVolume value. */ @@ -1421,9 +1291,7 @@ public Boolean isLargeVolume() { } /** - * Set the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * Set the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume. * * @param isLargeVolume the isLargeVolume value to set. * @return the VolumeProperties object itself. @@ -1434,9 +1302,7 @@ public VolumeProperties withIsLargeVolume(Boolean isLargeVolume) { } /** - * Get the originatingResourceId property: Originating Resource Id - * - * Id of the snapshot or backup that the volume is restored from. + * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * * @return the originatingResourceId value. */ @@ -1473,4 +1339,202 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(VolumeProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("creationToken", this.creationToken); + jsonWriter.writeLongField("usageThreshold", this.usageThreshold); + jsonWriter.writeStringField("subnetId", this.subnetId); + jsonWriter.writeStringField("serviceLevel", this.serviceLevel == null ? null : this.serviceLevel.toString()); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("snapshotId", this.snapshotId); + jsonWriter.writeBooleanField("deleteBaseSnapshot", this.deleteBaseSnapshot); + jsonWriter.writeStringField("backupId", this.backupId); + jsonWriter.writeStringField("networkFeatures", + this.networkFeatures == null ? null : this.networkFeatures.toString()); + jsonWriter.writeStringField("volumeType", this.volumeType); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeBooleanField("isRestoring", this.isRestoring); + jsonWriter.writeBooleanField("snapshotDirectoryVisible", this.snapshotDirectoryVisible); + jsonWriter.writeBooleanField("kerberosEnabled", this.kerberosEnabled); + jsonWriter.writeStringField("securityStyle", this.securityStyle == null ? null : this.securityStyle.toString()); + jsonWriter.writeBooleanField("smbEncryption", this.smbEncryption); + jsonWriter.writeStringField("smbAccessBasedEnumeration", + this.smbAccessBasedEnumeration == null ? null : this.smbAccessBasedEnumeration.toString()); + jsonWriter.writeStringField("smbNonBrowsable", + this.smbNonBrowsable == null ? null : this.smbNonBrowsable.toString()); + jsonWriter.writeBooleanField("smbContinuouslyAvailable", this.smbContinuouslyAvailable); + jsonWriter.writeNumberField("throughputMibps", this.throughputMibps); + jsonWriter.writeStringField("encryptionKeySource", + this.encryptionKeySource == null ? null : this.encryptionKeySource.toString()); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + jsonWriter.writeBooleanField("ldapEnabled", this.ldapEnabled); + jsonWriter.writeBooleanField("coolAccess", this.coolAccess); + jsonWriter.writeNumberField("coolnessPeriod", this.coolnessPeriod); + jsonWriter.writeStringField("coolAccessRetrievalPolicy", + this.coolAccessRetrievalPolicy == null ? null : this.coolAccessRetrievalPolicy.toString()); + jsonWriter.writeStringField("unixPermissions", this.unixPermissions); + jsonWriter.writeStringField("avsDataStore", this.avsDataStore == null ? null : this.avsDataStore.toString()); + jsonWriter.writeBooleanField("isDefaultQuotaEnabled", this.isDefaultQuotaEnabled); + jsonWriter.writeNumberField("defaultUserQuotaInKiBs", this.defaultUserQuotaInKiBs); + jsonWriter.writeNumberField("defaultGroupQuotaInKiBs", this.defaultGroupQuotaInKiBs); + jsonWriter.writeStringField("capacityPoolResourceId", this.capacityPoolResourceId); + jsonWriter.writeStringField("proximityPlacementGroup", this.proximityPlacementGroup); + jsonWriter.writeStringField("volumeSpecName", this.volumeSpecName); + jsonWriter.writeArrayField("placementRules", this.placementRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("enableSubvolumes", + this.enableSubvolumes == null ? null : this.enableSubvolumes.toString()); + jsonWriter.writeBooleanField("isLargeVolume", this.isLargeVolume); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeProperties. + */ + public static VolumeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeProperties deserializedVolumeProperties = new VolumeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationToken".equals(fieldName)) { + deserializedVolumeProperties.creationToken = reader.getString(); + } else if ("usageThreshold".equals(fieldName)) { + deserializedVolumeProperties.usageThreshold = reader.getLong(); + } else if ("subnetId".equals(fieldName)) { + deserializedVolumeProperties.subnetId = reader.getString(); + } else if ("fileSystemId".equals(fieldName)) { + deserializedVolumeProperties.fileSystemId = reader.getString(); + } else if ("serviceLevel".equals(fieldName)) { + deserializedVolumeProperties.serviceLevel = ServiceLevel.fromString(reader.getString()); + } else if ("exportPolicy".equals(fieldName)) { + deserializedVolumeProperties.exportPolicy = VolumePropertiesExportPolicy.fromJson(reader); + } else if ("protocolTypes".equals(fieldName)) { + List protocolTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedVolumeProperties.protocolTypes = protocolTypes; + } else if ("provisioningState".equals(fieldName)) { + deserializedVolumeProperties.provisioningState = reader.getString(); + } else if ("snapshotId".equals(fieldName)) { + deserializedVolumeProperties.snapshotId = reader.getString(); + } else if ("deleteBaseSnapshot".equals(fieldName)) { + deserializedVolumeProperties.deleteBaseSnapshot = reader.getNullable(JsonReader::getBoolean); + } else if ("backupId".equals(fieldName)) { + deserializedVolumeProperties.backupId = reader.getString(); + } else if ("baremetalTenantId".equals(fieldName)) { + deserializedVolumeProperties.baremetalTenantId = reader.getString(); + } else if ("networkFeatures".equals(fieldName)) { + deserializedVolumeProperties.networkFeatures = NetworkFeatures.fromString(reader.getString()); + } else if ("networkSiblingSetId".equals(fieldName)) { + deserializedVolumeProperties.networkSiblingSetId = reader.getString(); + } else if ("storageToNetworkProximity".equals(fieldName)) { + deserializedVolumeProperties.storageToNetworkProximity + = VolumeStorageToNetworkProximity.fromString(reader.getString()); + } else if ("mountTargets".equals(fieldName)) { + List mountTargets + = reader.readArray(reader1 -> MountTargetProperties.fromJson(reader1)); + deserializedVolumeProperties.mountTargets = mountTargets; + } else if ("volumeType".equals(fieldName)) { + deserializedVolumeProperties.volumeType = reader.getString(); + } else if ("dataProtection".equals(fieldName)) { + deserializedVolumeProperties.dataProtection = VolumePropertiesDataProtection.fromJson(reader); + } else if ("isRestoring".equals(fieldName)) { + deserializedVolumeProperties.isRestoring = reader.getNullable(JsonReader::getBoolean); + } else if ("snapshotDirectoryVisible".equals(fieldName)) { + deserializedVolumeProperties.snapshotDirectoryVisible = reader.getNullable(JsonReader::getBoolean); + } else if ("kerberosEnabled".equals(fieldName)) { + deserializedVolumeProperties.kerberosEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("securityStyle".equals(fieldName)) { + deserializedVolumeProperties.securityStyle = SecurityStyle.fromString(reader.getString()); + } else if ("smbEncryption".equals(fieldName)) { + deserializedVolumeProperties.smbEncryption = reader.getNullable(JsonReader::getBoolean); + } else if ("smbAccessBasedEnumeration".equals(fieldName)) { + deserializedVolumeProperties.smbAccessBasedEnumeration + = SmbAccessBasedEnumeration.fromString(reader.getString()); + } else if ("smbNonBrowsable".equals(fieldName)) { + deserializedVolumeProperties.smbNonBrowsable = SmbNonBrowsable.fromString(reader.getString()); + } else if ("smbContinuouslyAvailable".equals(fieldName)) { + deserializedVolumeProperties.smbContinuouslyAvailable = reader.getNullable(JsonReader::getBoolean); + } else if ("throughputMibps".equals(fieldName)) { + deserializedVolumeProperties.throughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("actualThroughputMibps".equals(fieldName)) { + deserializedVolumeProperties.actualThroughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("encryptionKeySource".equals(fieldName)) { + deserializedVolumeProperties.encryptionKeySource + = EncryptionKeySource.fromString(reader.getString()); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedVolumeProperties.keyVaultPrivateEndpointResourceId = reader.getString(); + } else if ("ldapEnabled".equals(fieldName)) { + deserializedVolumeProperties.ldapEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("coolAccess".equals(fieldName)) { + deserializedVolumeProperties.coolAccess = reader.getNullable(JsonReader::getBoolean); + } else if ("coolnessPeriod".equals(fieldName)) { + deserializedVolumeProperties.coolnessPeriod = reader.getNullable(JsonReader::getInt); + } else if ("coolAccessRetrievalPolicy".equals(fieldName)) { + deserializedVolumeProperties.coolAccessRetrievalPolicy + = CoolAccessRetrievalPolicy.fromString(reader.getString()); + } else if ("unixPermissions".equals(fieldName)) { + deserializedVolumeProperties.unixPermissions = reader.getString(); + } else if ("cloneProgress".equals(fieldName)) { + deserializedVolumeProperties.cloneProgress = reader.getNullable(JsonReader::getInt); + } else if ("fileAccessLogs".equals(fieldName)) { + deserializedVolumeProperties.fileAccessLogs = FileAccessLogs.fromString(reader.getString()); + } else if ("avsDataStore".equals(fieldName)) { + deserializedVolumeProperties.avsDataStore = AvsDataStore.fromString(reader.getString()); + } else if ("dataStoreResourceId".equals(fieldName)) { + List dataStoreResourceId = reader.readArray(reader1 -> reader1.getString()); + deserializedVolumeProperties.dataStoreResourceId = dataStoreResourceId; + } else if ("isDefaultQuotaEnabled".equals(fieldName)) { + deserializedVolumeProperties.isDefaultQuotaEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("defaultUserQuotaInKiBs".equals(fieldName)) { + deserializedVolumeProperties.defaultUserQuotaInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("defaultGroupQuotaInKiBs".equals(fieldName)) { + deserializedVolumeProperties.defaultGroupQuotaInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("maximumNumberOfFiles".equals(fieldName)) { + deserializedVolumeProperties.maximumNumberOfFiles = reader.getNullable(JsonReader::getLong); + } else if ("volumeGroupName".equals(fieldName)) { + deserializedVolumeProperties.volumeGroupName = reader.getString(); + } else if ("capacityPoolResourceId".equals(fieldName)) { + deserializedVolumeProperties.capacityPoolResourceId = reader.getString(); + } else if ("proximityPlacementGroup".equals(fieldName)) { + deserializedVolumeProperties.proximityPlacementGroup = reader.getString(); + } else if ("t2Network".equals(fieldName)) { + deserializedVolumeProperties.t2Network = reader.getString(); + } else if ("volumeSpecName".equals(fieldName)) { + deserializedVolumeProperties.volumeSpecName = reader.getString(); + } else if ("encrypted".equals(fieldName)) { + deserializedVolumeProperties.encrypted = reader.getNullable(JsonReader::getBoolean); + } else if ("placementRules".equals(fieldName)) { + List placementRules + = reader.readArray(reader1 -> PlacementKeyValuePairs.fromJson(reader1)); + deserializedVolumeProperties.placementRules = placementRules; + } else if ("enableSubvolumes".equals(fieldName)) { + deserializedVolumeProperties.enableSubvolumes = EnableSubvolumes.fromString(reader.getString()); + } else if ("provisionedAvailabilityZone".equals(fieldName)) { + deserializedVolumeProperties.provisionedAvailabilityZone = reader.getString(); + } else if ("isLargeVolume".equals(fieldName)) { + deserializedVolumeProperties.isLargeVolume = reader.getNullable(JsonReader::getBoolean); + } else if ("originatingResourceId".equals(fieldName)) { + deserializedVolumeProperties.originatingResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java index afd55fd99ca5f..b325e4c0c76f4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.ProvisioningState; import com.azure.resourcemanager.netapp.models.Type; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -20,15 +23,28 @@ public final class VolumeQuotaRuleInner extends Resource { /* * Volume Quota Rule Properties */ - @JsonProperty(value = "properties") private VolumeQuotaRulesProperties innerProperties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of VolumeQuotaRuleInner class. */ @@ -53,6 +69,36 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -104,9 +150,7 @@ public VolumeQuotaRuleInner withQuotaSizeInKiBs(Long quotaSizeInKiBs) { } /** - * Get the quotaType property: quotaType - * - * Type of quota. + * Get the quotaType property: Type of quota. * * @return the quotaType value. */ @@ -115,9 +159,7 @@ public Type quotaType() { } /** - * Set the quotaType property: quotaType - * - * Type of quota. + * Set the quotaType property: Type of quota. * * @param quotaType the quotaType value to set. * @return the VolumeQuotaRuleInner object itself. @@ -167,4 +209,56 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeQuotaRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeQuotaRuleInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeQuotaRuleInner. + */ + public static VolumeQuotaRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeQuotaRuleInner deserializedVolumeQuotaRuleInner = new VolumeQuotaRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVolumeQuotaRuleInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeQuotaRuleInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeQuotaRuleInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedVolumeQuotaRuleInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVolumeQuotaRuleInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedVolumeQuotaRuleInner.innerProperties = VolumeQuotaRulesProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedVolumeQuotaRuleInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeQuotaRuleInner; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java index e1be124cd4da5..832ca6f6d73d2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java @@ -5,39 +5,38 @@ package com.azure.resourcemanager.netapp.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.ProvisioningState; import com.azure.resourcemanager.netapp.models.Type; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Volume Quota Rule properties. */ @Fluent -public final class VolumeQuotaRulesProperties { +public final class VolumeQuotaRulesProperties implements JsonSerializable { /* * Gets the status of the VolumeQuotaRule at the time the operation was called. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; /* * Size of quota */ - @JsonProperty(value = "quotaSizeInKiBs") private Long quotaSizeInKiBs; /* - * quotaType - * * Type of quota */ - @JsonProperty(value = "quotaType") private Type quotaType; /* - * UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running + * UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ + * command for the user or group and SID can be found by running */ - @JsonProperty(value = "quotaTarget") private String quotaTarget; /** @@ -76,9 +75,7 @@ public VolumeQuotaRulesProperties withQuotaSizeInKiBs(Long quotaSizeInKiBs) { } /** - * Get the quotaType property: quotaType - * - * Type of quota. + * Get the quotaType property: Type of quota. * * @return the quotaType value. */ @@ -87,9 +84,7 @@ public Type quotaType() { } /** - * Set the quotaType property: quotaType - * - * Type of quota. + * Set the quotaType property: Type of quota. * * @param quotaType the quotaType value to set. * @return the VolumeQuotaRulesProperties object itself. @@ -130,4 +125,49 @@ public VolumeQuotaRulesProperties withQuotaTarget(String quotaTarget) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("quotaSizeInKiBs", this.quotaSizeInKiBs); + jsonWriter.writeStringField("quotaType", this.quotaType == null ? null : this.quotaType.toString()); + jsonWriter.writeStringField("quotaTarget", this.quotaTarget); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeQuotaRulesProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeQuotaRulesProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeQuotaRulesProperties. + */ + public static VolumeQuotaRulesProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeQuotaRulesProperties deserializedVolumeQuotaRulesProperties = new VolumeQuotaRulesProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedVolumeQuotaRulesProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("quotaSizeInKiBs".equals(fieldName)) { + deserializedVolumeQuotaRulesProperties.quotaSizeInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("quotaType".equals(fieldName)) { + deserializedVolumeQuotaRulesProperties.quotaType = Type.fromString(reader.getString()); + } else if ("quotaTarget".equals(fieldName)) { + deserializedVolumeQuotaRulesProperties.quotaTarget = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeQuotaRulesProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java index 57e5d6d92363f..5f9a155815c46 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java @@ -1495,9 +1495,7 @@ public void renewCredentials(String resourceGroupName, String accountName, Conte /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1525,9 +1523,7 @@ private Mono> listBySubscriptionNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1555,9 +1551,7 @@ private Mono> listBySubscriptionNextSinglePage /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1583,9 +1577,7 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java index 0d00e47f6d93a..f9a1f02eaca91 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java @@ -1213,9 +1213,7 @@ public void delete(String resourceGroupName, String accountName, String backupVa /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1242,9 +1240,7 @@ private Mono> listByNetAppAccountNextSinglePageA /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java index fcedd54396d45..0f9d1f231acb7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java @@ -1707,9 +1707,7 @@ public void delete(String resourceGroupName, String accountName, String backupVa /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1735,9 +1733,7 @@ private Mono> listByVaultNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java index e2a601815bfb5..b058462d6aa2e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java @@ -409,7 +409,7 @@ public BackupsUnderAccountsClient getBackupsUnderAccounts() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-11-01"; + this.apiVersion = "2024-03-01"; this.operations = new OperationsClientImpl(this); this.netAppResources = new NetAppResourcesClientImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(this); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java index c97dfe9209b42..16cf5b75f16fc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java @@ -336,9 +336,7 @@ public RegionInfoResourceInner get(String location) { /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -363,9 +361,7 @@ private Mono> listNextSinglePageAsync(Str /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java index 86afd4437b011..95447e41440c9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java @@ -1199,9 +1199,7 @@ public void delete(String resourceGroupName, String accountName, String poolName /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1227,9 +1225,7 @@ private Mono> listNextSinglePageAsync(String ne /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java index a541643c1e0e8..371b33d316972 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java @@ -19,6 +19,10 @@ public final class ReplicationImpl implements Replication { this.serviceManager = serviceManager; } + public String replicationId() { + return this.innerModel().replicationId(); + } + public EndpointType endpointType() { return this.innerModel().endpointType(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java index 1f8d43783661b..1dfc6e581f013 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java @@ -1672,9 +1672,7 @@ public SubvolumeModelInner getMetadata(String resourceGroupName, String accountN /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1700,9 +1698,7 @@ private Mono> listByVolumeNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java index d97513e8331c6..d902141e74c1e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java @@ -616,8 +616,13 @@ public VolumeImpl withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { } public VolumeImpl withProtocolTypes(List protocolTypes) { - this.innerModel().withProtocolTypes(protocolTypes); - return this; + if (isInCreateMode()) { + this.innerModel().withProtocolTypes(protocolTypes); + return this; + } else { + this.updateBody.withProtocolTypes(protocolTypes); + return this; + } } public VolumeImpl withSnapshotId(String snapshotId) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java index 919e901dd4aa4..4744d8568247b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java @@ -6143,9 +6143,7 @@ public void revertRelocation(String resourceGroupName, String accountName, Strin /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -6170,9 +6168,7 @@ private Mono> listNextSinglePageAsync(String nextLink /** * Get the next page of items. * - * @param nextLink The URL to get the next list of items - * - * The nextLink parameter. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java index 0b2c7e6bb58e1..ae9df7ff7be4b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Encryption settings. */ @Fluent -public final class AccountEncryption { +public final class AccountEncryption implements JsonSerializable { /* - * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault */ - @JsonProperty(value = "keySource") private KeySource keySource; /* * Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'. */ - @JsonProperty(value = "keyVaultProperties") private KeyVaultProperties keyVaultProperties; /* * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. */ - @JsonProperty(value = "identity") private EncryptionIdentity identity; /** @@ -115,4 +116,46 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keySource", this.keySource == null ? null : this.keySource.toString()); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccountEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccountEncryption if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AccountEncryption. + */ + public static AccountEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccountEncryption deserializedAccountEncryption = new AccountEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keySource".equals(fieldName)) { + deserializedAccountEncryption.keySource = KeySource.fromString(reader.getString()); + } else if ("keyVaultProperties".equals(fieldName)) { + deserializedAccountEncryption.keyVaultProperties = KeyVaultProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedAccountEncryption.identity = EncryptionIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAccountEncryption; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java index a68cef8ec2e95..368b53e2a24ca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java @@ -5,150 +5,139 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Active Directory. */ @Fluent -public final class ActiveDirectory { +public final class ActiveDirectory implements JsonSerializable { /* * Id of the Active Directory */ - @JsonProperty(value = "activeDirectoryId") private String activeDirectoryId; /* * A domain user account with permission to create machine accounts */ - @JsonProperty(value = "username") private String username; /* * Plain text password of Active Directory domain administrator, value is masked in the response */ - @JsonProperty(value = "password") private String password; /* * Name of the Active Directory domain */ - @JsonProperty(value = "domain") private String domain; /* * Comma separated list of DNS server IP addresses (IPv4 only) for the Active Directory domain */ - @JsonProperty(value = "dns") private String dns; /* * Status of the Active Directory */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private ActiveDirectoryStatus status; /* * Any details in regards to the Status of the Active Directory */ - @JsonProperty(value = "statusDetails", access = JsonProperty.Access.WRITE_ONLY) private String statusDetails; /* - * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes + * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount + * volumes */ - @JsonProperty(value = "smbServerName") private String smbServerName; /* * The Organizational Unit (OU) within the Windows Active Directory */ - @JsonProperty(value = "organizationalUnit") private String organizationalUnit; /* * The Active Directory site the service will limit Domain Controller discovery to */ - @JsonProperty(value = "site") private String site; /* - * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier + * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without + * domain specifier */ - @JsonProperty(value = "backupOperators") private List backupOperators; /* - * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier + * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without + * domain specifier */ - @JsonProperty(value = "administrators") private List administrators; /* - * kdc server IP addresses for the active directory machine. This optional parameter is used only while creating kerberos volume. + * kdc server IP addresses for the active directory machine. This optional parameter is used only while creating + * kerberos volume. */ - @JsonProperty(value = "kdcIP") private String kdcIp; /* * Name of the active directory machine. This optional parameter is used only while creating kerberos volume */ - @JsonProperty(value = "adName") private String adName; /* - * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol with LDAP user-mapping volumes. + * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded Active Directory + * Certificate Service's self-signed root CA certificate, this optional parameter is used only for dual protocol + * with LDAP user-mapping volumes. */ - @JsonProperty(value = "serverRootCACertificate") private String serverRootCACertificate; /* * If enabled, AES encryption will be enabled for SMB communication. */ - @JsonProperty(value = "aesEncryption") private Boolean aesEncryption; /* * Specifies whether or not the LDAP traffic needs to be signed. */ - @JsonProperty(value = "ldapSigning") private Boolean ldapSigning; /* - * Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier + * Domain Users in the Active directory to be given SeSecurityPrivilege privilege (Needed for SMB Continuously + * available shares for SQL). A list of unique usernames without domain specifier */ - @JsonProperty(value = "securityOperators") private List securityOperators; /* * Specifies whether or not the LDAP traffic needs to be secured via TLS. */ - @JsonProperty(value = "ldapOverTLS") private Boolean ldapOverTls; /* - * If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. + * If enabled, NFS client local users can also (in addition to LDAP users) access the NFS volumes. */ - @JsonProperty(value = "allowLocalNfsUsersWithLdap") private Boolean allowLocalNfsUsersWithLdap; /* * If enabled, Traffic between the SMB server to Domain Controller (DC) will be encrypted. */ - @JsonProperty(value = "encryptDCConnections") private Boolean encryptDCConnections; /* * LDAP Search scope options */ - @JsonProperty(value = "ldapSearchScope") private LdapSearchScopeOpt ldapSearchScope; /* - * Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 addresses can be passed. + * Comma separated list of IPv4 addresses of preferred servers for LDAP client. At most two comma separated IPv4 + * addresses can be passed. */ - @JsonProperty(value = "preferredServersForLdapClient") private String preferredServersForLdapClient; /** @@ -633,4 +622,110 @@ public void validate() { ldapSearchScope().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("activeDirectoryId", this.activeDirectoryId); + jsonWriter.writeStringField("username", this.username); + jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeStringField("dns", this.dns); + jsonWriter.writeStringField("smbServerName", this.smbServerName); + jsonWriter.writeStringField("organizationalUnit", this.organizationalUnit); + jsonWriter.writeStringField("site", this.site); + jsonWriter.writeArrayField("backupOperators", this.backupOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("administrators", this.administrators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("kdcIP", this.kdcIp); + jsonWriter.writeStringField("adName", this.adName); + jsonWriter.writeStringField("serverRootCACertificate", this.serverRootCACertificate); + jsonWriter.writeBooleanField("aesEncryption", this.aesEncryption); + jsonWriter.writeBooleanField("ldapSigning", this.ldapSigning); + jsonWriter.writeArrayField("securityOperators", this.securityOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("ldapOverTLS", this.ldapOverTls); + jsonWriter.writeBooleanField("allowLocalNfsUsersWithLdap", this.allowLocalNfsUsersWithLdap); + jsonWriter.writeBooleanField("encryptDCConnections", this.encryptDCConnections); + jsonWriter.writeJsonField("ldapSearchScope", this.ldapSearchScope); + jsonWriter.writeStringField("preferredServersForLdapClient", this.preferredServersForLdapClient); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectory from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectory if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ActiveDirectory. + */ + public static ActiveDirectory fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectory deserializedActiveDirectory = new ActiveDirectory(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("activeDirectoryId".equals(fieldName)) { + deserializedActiveDirectory.activeDirectoryId = reader.getString(); + } else if ("username".equals(fieldName)) { + deserializedActiveDirectory.username = reader.getString(); + } else if ("password".equals(fieldName)) { + deserializedActiveDirectory.password = reader.getString(); + } else if ("domain".equals(fieldName)) { + deserializedActiveDirectory.domain = reader.getString(); + } else if ("dns".equals(fieldName)) { + deserializedActiveDirectory.dns = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedActiveDirectory.status = ActiveDirectoryStatus.fromString(reader.getString()); + } else if ("statusDetails".equals(fieldName)) { + deserializedActiveDirectory.statusDetails = reader.getString(); + } else if ("smbServerName".equals(fieldName)) { + deserializedActiveDirectory.smbServerName = reader.getString(); + } else if ("organizationalUnit".equals(fieldName)) { + deserializedActiveDirectory.organizationalUnit = reader.getString(); + } else if ("site".equals(fieldName)) { + deserializedActiveDirectory.site = reader.getString(); + } else if ("backupOperators".equals(fieldName)) { + List backupOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectory.backupOperators = backupOperators; + } else if ("administrators".equals(fieldName)) { + List administrators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectory.administrators = administrators; + } else if ("kdcIP".equals(fieldName)) { + deserializedActiveDirectory.kdcIp = reader.getString(); + } else if ("adName".equals(fieldName)) { + deserializedActiveDirectory.adName = reader.getString(); + } else if ("serverRootCACertificate".equals(fieldName)) { + deserializedActiveDirectory.serverRootCACertificate = reader.getString(); + } else if ("aesEncryption".equals(fieldName)) { + deserializedActiveDirectory.aesEncryption = reader.getNullable(JsonReader::getBoolean); + } else if ("ldapSigning".equals(fieldName)) { + deserializedActiveDirectory.ldapSigning = reader.getNullable(JsonReader::getBoolean); + } else if ("securityOperators".equals(fieldName)) { + List securityOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectory.securityOperators = securityOperators; + } else if ("ldapOverTLS".equals(fieldName)) { + deserializedActiveDirectory.ldapOverTls = reader.getNullable(JsonReader::getBoolean); + } else if ("allowLocalNfsUsersWithLdap".equals(fieldName)) { + deserializedActiveDirectory.allowLocalNfsUsersWithLdap = reader.getNullable(JsonReader::getBoolean); + } else if ("encryptDCConnections".equals(fieldName)) { + deserializedActiveDirectory.encryptDCConnections = reader.getNullable(JsonReader::getBoolean); + } else if ("ldapSearchScope".equals(fieldName)) { + deserializedActiveDirectory.ldapSearchScope = LdapSearchScopeOpt.fromJson(reader); + } else if ("preferredServersForLdapClient".equals(fieldName)) { + deserializedActiveDirectory.preferredServersForLdapClient = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectory; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java index 2c06f1a14a190..a27420efea46b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -52,7 +51,6 @@ public ActiveDirectoryStatus() { * @param name a name to look for. * @return the corresponding ActiveDirectoryStatus. */ - @JsonCreator public static ActiveDirectoryStatus fromString(String name) { return fromString(name, ActiveDirectoryStatus.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java index 4bf81e7f607da..325a150f340a2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public ApplicationType() { * @param name a name to look for. * @return the corresponding ApplicationType. */ - @JsonCreator public static ApplicationType fromString(String name) { return fromString(name, ApplicationType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java index f50feecac3fdb..92f695197997a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Authorize request. */ @Fluent -public final class AuthorizeRequest { +public final class AuthorizeRequest implements JsonSerializable { /* * Resource id of the remote volume */ - @JsonProperty(value = "remoteVolumeResourceId") private String remoteVolumeResourceId; /** @@ -51,4 +54,40 @@ public AuthorizeRequest withRemoteVolumeResourceId(String remoteVolumeResourceId */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("remoteVolumeResourceId", this.remoteVolumeResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AuthorizeRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AuthorizeRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AuthorizeRequest. + */ + public static AuthorizeRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AuthorizeRequest deserializedAuthorizeRequest = new AuthorizeRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("remoteVolumeResourceId".equals(fieldName)) { + deserializedAuthorizeRequest.remoteVolumeResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAuthorizeRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java index 90ed71680a690..c5592910eb4aa 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -39,7 +38,6 @@ public AvsDataStore() { * @param name a name to look for. * @return the corresponding AvsDataStore. */ - @JsonCreator public static AvsDataStore fromString(String name) { return fromString(name, AvsDataStore.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java index b3e82fc922993..03f8e64bd2267 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java @@ -42,18 +42,14 @@ public interface Backup { SystemData systemData(); /** - * Gets the backupId property: backupId - * - * UUID v4 used to identify the Backup. + * Gets the backupId property: UUID v4 used to identify the Backup. * * @return the backupId value. */ String backupId(); /** - * Gets the creationDate property: creationDate - * - * The creation date of the backup. + * Gets the creationDate property: The creation date of the backup. * * @return the creationDate value. */ @@ -81,9 +77,7 @@ public interface Backup { String label(); /** - * Gets the backupType property: backupType - * - * Type of backup Manual or Scheduled. + * Gets the backupType property: Type of backup Manual or Scheduled. * * @return the backupType value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java index 10b95c292fe38..900e96a9088ea 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Backup patch. */ @Fluent -public final class BackupPatch { +public final class BackupPatch implements JsonSerializable { /* * Backup Patch Properties */ - @JsonProperty(value = "properties") private BackupPatchProperties innerProperties; /** @@ -67,4 +70,40 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupPatch. + */ + public static BackupPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupPatch deserializedBackupPatch = new BackupPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedBackupPatch.innerProperties = BackupPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupPatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java index 322ece1823e22..0ab293211fff0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPoliciesList.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Backup Policies. */ @Fluent -public final class BackupPoliciesList { +public final class BackupPoliciesList implements JsonSerializable { /* * A list of backup policies */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupPoliciesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupPoliciesList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupPoliciesList. + */ + public static BackupPoliciesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupPoliciesList deserializedBackupPoliciesList = new BackupPoliciesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> BackupPolicyInner.fromJson(reader1)); + deserializedBackupPoliciesList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedBackupPoliciesList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java index a0269adbc99e2..2ebc99d883ac2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -19,9 +22,23 @@ public final class BackupPolicyPatch extends Resource { /* * Backup policy Properties */ - @JsonProperty(value = "properties") private BackupPolicyProperties innerProperties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of BackupPolicyPatch class. */ @@ -37,6 +54,36 @@ private BackupPolicyProperties innerProperties() { return this.innerProperties; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -193,4 +240,54 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupPolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupPolicyPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupPolicyPatch. + */ + public static BackupPolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupPolicyPatch deserializedBackupPolicyPatch = new BackupPolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBackupPolicyPatch.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBackupPolicyPatch.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBackupPolicyPatch.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedBackupPolicyPatch.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupPolicyPatch.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedBackupPolicyPatch.innerProperties = BackupPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupPolicyPatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java index 7d9d9c7836f57..83d9c9692d8ee 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java @@ -6,30 +6,32 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Restore payload for Single File Backup Restore. */ @Fluent -public final class BackupRestoreFiles { +public final class BackupRestoreFiles implements JsonSerializable { /* * List of files to be restored */ - @JsonProperty(value = "fileList", required = true) private List fileList; /* - * Destination folder where the files will be restored. The path name should start with a forward slash. If it is omitted from request then restore is done at the root folder of the destination volume by default + * Destination folder where the files will be restored. The path name should start with a forward slash. If it is + * omitted from request then restore is done at the root folder of the destination volume by default */ - @JsonProperty(value = "restoreFilePath") private String restoreFilePath; /* * Resource Id of the destination volume on which the files need to be restored */ - @JsonProperty(value = "destinationVolumeId", required = true) private String destinationVolumeId; /** @@ -122,4 +124,48 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(BackupRestoreFiles.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("fileList", this.fileList, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("destinationVolumeId", this.destinationVolumeId); + jsonWriter.writeStringField("restoreFilePath", this.restoreFilePath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupRestoreFiles from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupRestoreFiles if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupRestoreFiles. + */ + public static BackupRestoreFiles fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupRestoreFiles deserializedBackupRestoreFiles = new BackupRestoreFiles(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fileList".equals(fieldName)) { + List fileList = reader.readArray(reader1 -> reader1.getString()); + deserializedBackupRestoreFiles.fileList = fileList; + } else if ("destinationVolumeId".equals(fieldName)) { + deserializedBackupRestoreFiles.destinationVolumeId = reader.getString(); + } else if ("restoreFilePath".equals(fieldName)) { + deserializedBackupRestoreFiles.restoreFilePath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupRestoreFiles; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java index 840e5383705be..973074cd16b05 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -39,7 +38,6 @@ public BackupType() { * @param name a name to look for. * @return the corresponding BackupType. */ - @JsonCreator public static BackupType fromString(String name) { return fromString(name, BackupType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java index 0a25d4bb2e7f3..83a2bc4cb87d1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java @@ -5,20 +5,21 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; /** * Backup Vault information. */ @Fluent -public final class BackupVaultPatch { +public final class BackupVaultPatch implements JsonSerializable { /* * Resource tags */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** @@ -54,4 +55,41 @@ public BackupVaultPatch withTags(Map tags) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupVaultPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupVaultPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupVaultPatch. + */ + public static BackupVaultPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupVaultPatch deserializedBackupVaultPatch = new BackupVaultPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedBackupVaultPatch.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedBackupVaultPatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java index 81bc9513ab556..bdd9e6b9b7e57 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultsList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Backup Vaults. */ @Fluent -public final class BackupVaultsList { +public final class BackupVaultsList implements JsonSerializable { /* * A list of Backup Vaults */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupVaultsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupVaultsList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupVaultsList. + */ + public static BackupVaultsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupVaultsList deserializedBackupVaultsList = new BackupVaultsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> BackupVaultInner.fromJson(reader1)); + deserializedBackupVaultsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBackupVaultsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupVaultsList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java index 3bdae065250b0..40fcc8ab8162d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Backups. */ @Fluent -public final class BackupsList { +public final class BackupsList implements JsonSerializable { /* * A list of Backups */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupsList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the BackupsList. + */ + public static BackupsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupsList deserializedBackupsList = new BackupsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> BackupInner.fromJson(reader1)); + deserializedBackupsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBackupsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupsList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java index 1ed2f88b24a31..0ed235aa4b52b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Migrate Backups Request. */ @Fluent -public final class BackupsMigrationRequest { +public final class BackupsMigrationRequest implements JsonSerializable { /* * The ResourceId of the Backup Vault */ - @JsonProperty(value = "backupVaultId", required = true) private String backupVaultId; /** @@ -59,4 +62,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(BackupsMigrationRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("backupVaultId", this.backupVaultId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BackupsMigrationRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BackupsMigrationRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the BackupsMigrationRequest. + */ + public static BackupsMigrationRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BackupsMigrationRequest deserializedBackupsMigrationRequest = new BackupsMigrationRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backupVaultId".equals(fieldName)) { + deserializedBackupsMigrationRequest.backupVaultId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBackupsMigrationRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java index 618f6b87bb475..051e5320420a3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Break file locks request. */ @Fluent -public final class BreakFileLocksRequest { +public final class BreakFileLocksRequest implements JsonSerializable { /* * To clear file locks on a volume for a particular client */ - @JsonProperty(value = "clientIp") private String clientIp; /* - * Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want to process, set to true. + * Break File locks could be a disruptive operation for application as locks on the volume will be broken, if want + * to process, set to true. */ - @JsonProperty(value = "confirmRunningDisruptiveOperation") private Boolean confirmRunningDisruptiveOperation; /** @@ -79,4 +82,44 @@ public BreakFileLocksRequest withConfirmRunningDisruptiveOperation(Boolean confi */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("clientIp", this.clientIp); + jsonWriter.writeBooleanField("confirmRunningDisruptiveOperation", this.confirmRunningDisruptiveOperation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BreakFileLocksRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BreakFileLocksRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BreakFileLocksRequest. + */ + public static BreakFileLocksRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BreakFileLocksRequest deserializedBreakFileLocksRequest = new BreakFileLocksRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clientIp".equals(fieldName)) { + deserializedBreakFileLocksRequest.clientIp = reader.getString(); + } else if ("confirmRunningDisruptiveOperation".equals(fieldName)) { + deserializedBreakFileLocksRequest.confirmRunningDisruptiveOperation + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedBreakFileLocksRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java index a01530588c9fe..092eefe736bc7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Break replication request. */ @Fluent -public final class BreakReplicationRequest { +public final class BreakReplicationRequest implements JsonSerializable { /* * If replication is in status transferring and you want to force break the replication, set to true */ - @JsonProperty(value = "forceBreakReplication") private Boolean forceBreakReplication; /** @@ -53,4 +56,41 @@ public BreakReplicationRequest withForceBreakReplication(Boolean forceBreakRepli */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("forceBreakReplication", this.forceBreakReplication); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BreakReplicationRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BreakReplicationRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the BreakReplicationRequest. + */ + public static BreakReplicationRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BreakReplicationRequest deserializedBreakReplicationRequest = new BreakReplicationRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("forceBreakReplication".equals(fieldName)) { + deserializedBreakReplicationRequest.forceBreakReplication + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedBreakReplicationRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java index c5aa833b09b05..439aa151a768e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java @@ -64,28 +64,22 @@ public interface CapacityPool { SystemData systemData(); /** - * Gets the poolId property: poolId - * - * UUID v4 used to identify the Pool. + * Gets the poolId property: UUID v4 used to identify the Pool. * * @return the poolId value. */ String poolId(); /** - * Gets the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Gets the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @return the size value. */ long size(); /** - * Gets the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Gets the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -127,10 +121,8 @@ public interface CapacityPool { Boolean coolAccess(); /** - * Gets the encryptionType property: encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. - * This value can only be set when creating new pool. + * Gets the encryptionType property: Encryption type of the capacity pool, set encryption type for data at rest for + * this pool and all volumes in it. This value can only be set when creating new pool. * * @return the encryptionType value. */ @@ -222,15 +214,11 @@ interface WithParentResource { */ interface WithSize { /** - * Specifies the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776).. - * - * @param size size + * Specifies the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks + * (value must be multiple of 1099511627776).. * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * @param size Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * @return the next definition stage. */ WithServiceLevel withSize(long size); @@ -241,13 +229,9 @@ interface WithSize { */ interface WithServiceLevel { /** - * Specifies the serviceLevel property: serviceLevel + * Specifies the serviceLevel property: The service level of the file system. * - * The service level of the file system. - * - * @param serviceLevel serviceLevel - * - * The service level of the file system. + * @param serviceLevel The service level of the file system. * @return the next definition stage. */ WithCreate withServiceLevel(ServiceLevel serviceLevel); @@ -319,15 +303,11 @@ interface WithCoolAccess { */ interface WithEncryptionType { /** - * Specifies the encryptionType property: encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes - * in it. This value can only be set when creating new pool.. + * Specifies the encryptionType property: Encryption type of the capacity pool, set encryption type for data + * at rest for this pool and all volumes in it. This value can only be set when creating new pool.. * - * @param encryptionType encryptionType - * - * Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes - * in it. This value can only be set when creating new pool. + * @param encryptionType Encryption type of the capacity pool, set encryption type for data at rest for this + * pool and all volumes in it. This value can only be set when creating new pool. * @return the next definition stage. */ WithCreate withEncryptionType(EncryptionType encryptionType); @@ -384,15 +364,11 @@ interface WithTags { */ interface WithSize { /** - * Specifies the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776).. - * - * @param size size + * Specifies the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks + * (value must be multiple of 1099511627776).. * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * @param size Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * @return the next definition stage. */ Update withSize(Long size); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java index 39716538a8b91..b8beaecd1fecf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of capacity pool resources. */ @Fluent -public final class CapacityPoolList { +public final class CapacityPoolList implements JsonSerializable { /* * List of Capacity pools */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapacityPoolList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapacityPoolList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the CapacityPoolList. + */ + public static CapacityPoolList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapacityPoolList deserializedCapacityPoolList = new CapacityPoolList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CapacityPoolInner.fromJson(reader1)); + deserializedCapacityPoolList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCapacityPoolList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCapacityPoolList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java index a165a9d87d38e..1e26a5180a8c3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** @@ -18,9 +21,23 @@ public final class CapacityPoolPatch extends Resource { /* * Capacity pool properties */ - @JsonProperty(value = "properties") private PoolPatchProperties innerProperties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of CapacityPoolPatch class. */ @@ -36,6 +53,36 @@ private PoolPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -55,10 +102,8 @@ public CapacityPoolPatch withTags(Map tags) { } /** - * Get the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Get the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @return the size value. */ @@ -67,10 +112,8 @@ public Long size() { } /** - * Set the size property: size - * - * Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of - * 1099511627776). + * Set the size property: Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be + * multiple of 1099511627776). * * @param size the size value to set. * @return the CapacityPoolPatch object itself. @@ -139,4 +182,54 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapacityPoolPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapacityPoolPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CapacityPoolPatch. + */ + public static CapacityPoolPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapacityPoolPatch deserializedCapacityPoolPatch = new CapacityPoolPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCapacityPoolPatch.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCapacityPoolPatch.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCapacityPoolPatch.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedCapacityPoolPatch.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCapacityPoolPatch.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedCapacityPoolPatch.innerProperties = PoolPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCapacityPoolPatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java index 6aec34851148d..41084ce0c7435 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -51,7 +50,6 @@ public CheckNameResourceTypes() { * @param name a name to look for. * @return the corresponding CheckNameResourceTypes. */ - @JsonCreator public static CheckNameResourceTypes fromString(String name) { return fromString(name, CheckNameResourceTypes.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java index 78abb3536fa75..50a25430c76a3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -51,7 +50,6 @@ public CheckQuotaNameResourceTypes() { * @param name a name to look for. * @return the corresponding CheckQuotaNameResourceTypes. */ - @JsonCreator public static CheckQuotaNameResourceTypes fromString(String name) { return fromString(name, CheckQuotaNameResourceTypes.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java index 05a1d231f0f10..42ee47fe74cf6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public ChownMode() { * @param name a name to look for. * @return the corresponding ChownMode. */ - @JsonCreator public static ChownMode fromString(String name) { return fromString(name, ChownMode.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java index 09ed20bbdf118..0834ef66df54e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public CoolAccessRetrievalPolicy() { * @param name a name to look for. * @return the corresponding CoolAccessRetrievalPolicy. */ - @JsonCreator public static CoolAccessRetrievalPolicy fromString(String name) { return fromString(name, CoolAccessRetrievalPolicy.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java index d428248803636..e5f6673e518d5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DailySchedule.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Daily Schedule properties. */ @Fluent -public final class DailySchedule { +public final class DailySchedule implements JsonSerializable { /* * Daily snapshot count to keep */ - @JsonProperty(value = "snapshotsToKeep") private Integer snapshotsToKeep; /* * Indicates which hour in UTC timezone a snapshot should be taken */ - @JsonProperty(value = "hour") private Integer hour; /* * Indicates which minute snapshot should be taken */ - @JsonProperty(value = "minute") private Integer minute; /* * Resource size in bytes, current storage usage for the volume in bytes */ - @JsonProperty(value = "usedBytes") private Long usedBytes; /** @@ -129,4 +129,49 @@ public DailySchedule withUsedBytes(Long usedBytes) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + jsonWriter.writeNumberField("usedBytes", this.usedBytes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DailySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DailySchedule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DailySchedule. + */ + public static DailySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DailySchedule deserializedDailySchedule = new DailySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedDailySchedule.snapshotsToKeep = reader.getNullable(JsonReader::getInt); + } else if ("hour".equals(fieldName)) { + deserializedDailySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedDailySchedule.minute = reader.getNullable(JsonReader::getInt); + } else if ("usedBytes".equals(fieldName)) { + deserializedDailySchedule.usedBytes = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedDailySchedule; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java index 00e9574c7db54..2294e9ee374cd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Dimension.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Dimension of blobs, possibly be blob type or access tier. */ @Fluent -public final class Dimension { +public final class Dimension implements JsonSerializable { /* * Display name of dimension. */ - @JsonProperty(value = "name") private String name; /* * Display name of dimension. */ - @JsonProperty(value = "displayName") private String displayName; /** @@ -77,4 +79,43 @@ public Dimension withDisplayName(String displayName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Dimension from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Dimension if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Dimension. + */ + public static Dimension fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Dimension deserializedDimension = new Dimension(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDimension.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedDimension.displayName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDimension; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java index 7ffc07e082430..38e2c3968f83b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public EnableSubvolumes() { * @param name a name to look for. * @return the corresponding EnableSubvolumes. */ - @JsonCreator public static EnableSubvolumes fromString(String name) { return fromString(name, EnableSubvolumes.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java index 02772b9aec34c..2fd76144f3646 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Identity used to authenticate with key vault. */ @Fluent -public final class EncryptionIdentity { +public final class EncryptionIdentity implements JsonSerializable { /* * The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* - * The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + * The ARM resource identifier of the user assigned identity used to authenticate with key vault. Applicable if + * identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. */ - @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; /** @@ -71,4 +74,42 @@ public EncryptionIdentity withUserAssignedIdentity(String userAssignedIdentity) */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EncryptionIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EncryptionIdentity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EncryptionIdentity. + */ + public static EncryptionIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EncryptionIdentity deserializedEncryptionIdentity = new EncryptionIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedEncryptionIdentity.principalId = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedEncryptionIdentity.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEncryptionIdentity; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java index b707368a32bba..24ba83dc86e7e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public EncryptionKeySource() { * @param name a name to look for. * @return the corresponding EncryptionKeySource. */ - @JsonCreator public static EncryptionKeySource fromString(String name) { return fromString(name, EncryptionKeySource.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java index 4ae46c168a1b9..29506d52055eb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -40,7 +39,6 @@ public EncryptionType() { * @param name a name to look for. * @return the corresponding EncryptionType. */ - @JsonCreator public static EncryptionType fromString(String name) { return fromString(name, EncryptionType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java index 4ce55742a9393..6306c4f72454e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public EndpointType() { * @param name a name to look for. * @return the corresponding EndpointType. */ - @JsonCreator public static EndpointType fromString(String name) { return fromString(name, EndpointType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java index 736032f667b71..c47c26d6ceec7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java @@ -5,101 +5,91 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Volume Export Policy Rule. */ @Fluent -public final class ExportPolicyRule { +public final class ExportPolicyRule implements JsonSerializable { /* * Order index */ - @JsonProperty(value = "ruleIndex") private Integer ruleIndex; /* * Read only access */ - @JsonProperty(value = "unixReadOnly") private Boolean unixReadOnly; /* * Read and write access */ - @JsonProperty(value = "unixReadWrite") private Boolean unixReadWrite; /* * Kerberos5 Read only access. To be use with swagger version 2020-05-01 or later */ - @JsonProperty(value = "kerberos5ReadOnly") private Boolean kerberos5ReadOnly; /* * Kerberos5 Read and write access. To be use with swagger version 2020-05-01 or later */ - @JsonProperty(value = "kerberos5ReadWrite") private Boolean kerberos5ReadWrite; /* * Kerberos5i Read only access. To be use with swagger version 2020-05-01 or later */ - @JsonProperty(value = "kerberos5iReadOnly") private Boolean kerberos5IReadOnly; /* * Kerberos5i Read and write access. To be use with swagger version 2020-05-01 or later */ - @JsonProperty(value = "kerberos5iReadWrite") private Boolean kerberos5IReadWrite; /* * Kerberos5p Read only access. To be use with swagger version 2020-05-01 or later */ - @JsonProperty(value = "kerberos5pReadOnly") private Boolean kerberos5PReadOnly; /* * Kerberos5p Read and write access. To be use with swagger version 2020-05-01 or later */ - @JsonProperty(value = "kerberos5pReadWrite") private Boolean kerberos5PReadWrite; /* * Allows CIFS protocol */ - @JsonProperty(value = "cifs") private Boolean cifs; /* * Allows NFSv3 protocol. Enable only for NFSv3 type volumes */ - @JsonProperty(value = "nfsv3") private Boolean nfsv3; /* * Allows NFSv4.1 protocol. Enable only for NFSv4.1 type volumes */ - @JsonProperty(value = "nfsv41") private Boolean nfsv41; /* * Client ingress specification as comma separated string with IPv4 CIDRs, IPv4 host addresses and host names */ - @JsonProperty(value = "allowedClients") private String allowedClients; /* * Has root access to volume */ - @JsonProperty(value = "hasRootAccess") private Boolean hasRootAccess; /* - * This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. + * This parameter specifies who is authorized to change the ownership of a file. restricted - Only root user can + * change the ownership of the file. unrestricted - Non-root users can change ownership of files that they own. */ - @JsonProperty(value = "chownMode") private ChownMode chownMode; /** @@ -433,4 +423,82 @@ public ExportPolicyRule withChownMode(ChownMode chownMode) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("ruleIndex", this.ruleIndex); + jsonWriter.writeBooleanField("unixReadOnly", this.unixReadOnly); + jsonWriter.writeBooleanField("unixReadWrite", this.unixReadWrite); + jsonWriter.writeBooleanField("kerberos5ReadOnly", this.kerberos5ReadOnly); + jsonWriter.writeBooleanField("kerberos5ReadWrite", this.kerberos5ReadWrite); + jsonWriter.writeBooleanField("kerberos5iReadOnly", this.kerberos5IReadOnly); + jsonWriter.writeBooleanField("kerberos5iReadWrite", this.kerberos5IReadWrite); + jsonWriter.writeBooleanField("kerberos5pReadOnly", this.kerberos5PReadOnly); + jsonWriter.writeBooleanField("kerberos5pReadWrite", this.kerberos5PReadWrite); + jsonWriter.writeBooleanField("cifs", this.cifs); + jsonWriter.writeBooleanField("nfsv3", this.nfsv3); + jsonWriter.writeBooleanField("nfsv41", this.nfsv41); + jsonWriter.writeStringField("allowedClients", this.allowedClients); + jsonWriter.writeBooleanField("hasRootAccess", this.hasRootAccess); + jsonWriter.writeStringField("chownMode", this.chownMode == null ? null : this.chownMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportPolicyRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportPolicyRule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ExportPolicyRule. + */ + public static ExportPolicyRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportPolicyRule deserializedExportPolicyRule = new ExportPolicyRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleIndex".equals(fieldName)) { + deserializedExportPolicyRule.ruleIndex = reader.getNullable(JsonReader::getInt); + } else if ("unixReadOnly".equals(fieldName)) { + deserializedExportPolicyRule.unixReadOnly = reader.getNullable(JsonReader::getBoolean); + } else if ("unixReadWrite".equals(fieldName)) { + deserializedExportPolicyRule.unixReadWrite = reader.getNullable(JsonReader::getBoolean); + } else if ("kerberos5ReadOnly".equals(fieldName)) { + deserializedExportPolicyRule.kerberos5ReadOnly = reader.getNullable(JsonReader::getBoolean); + } else if ("kerberos5ReadWrite".equals(fieldName)) { + deserializedExportPolicyRule.kerberos5ReadWrite = reader.getNullable(JsonReader::getBoolean); + } else if ("kerberos5iReadOnly".equals(fieldName)) { + deserializedExportPolicyRule.kerberos5IReadOnly = reader.getNullable(JsonReader::getBoolean); + } else if ("kerberos5iReadWrite".equals(fieldName)) { + deserializedExportPolicyRule.kerberos5IReadWrite = reader.getNullable(JsonReader::getBoolean); + } else if ("kerberos5pReadOnly".equals(fieldName)) { + deserializedExportPolicyRule.kerberos5PReadOnly = reader.getNullable(JsonReader::getBoolean); + } else if ("kerberos5pReadWrite".equals(fieldName)) { + deserializedExportPolicyRule.kerberos5PReadWrite = reader.getNullable(JsonReader::getBoolean); + } else if ("cifs".equals(fieldName)) { + deserializedExportPolicyRule.cifs = reader.getNullable(JsonReader::getBoolean); + } else if ("nfsv3".equals(fieldName)) { + deserializedExportPolicyRule.nfsv3 = reader.getNullable(JsonReader::getBoolean); + } else if ("nfsv41".equals(fieldName)) { + deserializedExportPolicyRule.nfsv41 = reader.getNullable(JsonReader::getBoolean); + } else if ("allowedClients".equals(fieldName)) { + deserializedExportPolicyRule.allowedClients = reader.getString(); + } else if ("hasRootAccess".equals(fieldName)) { + deserializedExportPolicyRule.hasRootAccess = reader.getNullable(JsonReader::getBoolean); + } else if ("chownMode".equals(fieldName)) { + deserializedExportPolicyRule.chownMode = ChownMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedExportPolicyRule; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java index beb23545bc494..c1b0c39dbd62b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public FileAccessLogs() { * @param name a name to look for. * @return the corresponding FileAccessLogs. */ - @JsonCreator public static FileAccessLogs fromString(String name) { return fromString(name, FileAccessLogs.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java index 24f08f1442353..3ed40fd1abfe8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java @@ -6,23 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * File path availability request content - availability is based on the name and the subnetId. */ @Fluent -public final class FilePathAvailabilityRequest { +public final class FilePathAvailabilityRequest implements JsonSerializable { /* * File path to verify. */ - @JsonProperty(value = "name", required = true) private String name; /* * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes */ - @JsonProperty(value = "subnetId", required = true) private String subnetId; /** @@ -92,4 +94,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(FilePathAvailabilityRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("subnetId", this.subnetId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FilePathAvailabilityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FilePathAvailabilityRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FilePathAvailabilityRequest. + */ + public static FilePathAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FilePathAvailabilityRequest deserializedFilePathAvailabilityRequest = new FilePathAvailabilityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedFilePathAvailabilityRequest.name = reader.getString(); + } else if ("subnetId".equals(fieldName)) { + deserializedFilePathAvailabilityRequest.subnetId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFilePathAvailabilityRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java index e471bcdbb1f95..b5831bbe47afe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Get group Id list for LDAP User request. */ @Fluent -public final class GetGroupIdListForLdapUserRequest { +public final class GetGroupIdListForLdapUserRequest implements JsonSerializable { /* * username is required to fetch the group to which user is part of */ - @JsonProperty(value = "username", required = true) private String username; /** @@ -59,4 +62,42 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(GetGroupIdListForLdapUserRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("username", this.username); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GetGroupIdListForLdapUserRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GetGroupIdListForLdapUserRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GetGroupIdListForLdapUserRequest. + */ + public static GetGroupIdListForLdapUserRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GetGroupIdListForLdapUserRequest deserializedGetGroupIdListForLdapUserRequest + = new GetGroupIdListForLdapUserRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedGetGroupIdListForLdapUserRequest.username = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGetGroupIdListForLdapUserRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java index 8e6f82c033b08..1698ad73291d5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Hourly Schedule properties. */ @Fluent -public final class HourlySchedule { +public final class HourlySchedule implements JsonSerializable { /* * Hourly snapshot count to keep */ - @JsonProperty(value = "snapshotsToKeep") private Integer snapshotsToKeep; /* * Indicates which minute snapshot should be taken */ - @JsonProperty(value = "minute") private Integer minute; /* * Resource size in bytes, current storage usage for the volume in bytes */ - @JsonProperty(value = "usedBytes") private Long usedBytes; /** @@ -103,4 +104,46 @@ public HourlySchedule withUsedBytes(Long usedBytes) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("minute", this.minute); + jsonWriter.writeNumberField("usedBytes", this.usedBytes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HourlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HourlySchedule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the HourlySchedule. + */ + public static HourlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HourlySchedule deserializedHourlySchedule = new HourlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedHourlySchedule.snapshotsToKeep = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedHourlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else if ("usedBytes".equals(fieldName)) { + deserializedHourlySchedule.usedBytes = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedHourlySchedule; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java index 25ebf55d1d32e..c4b18c16ab167 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -38,7 +37,6 @@ public InAvailabilityReasonType() { * @param name a name to look for. * @return the corresponding InAvailabilityReasonType. */ - @JsonCreator public static InAvailabilityReasonType fromString(String name) { return fromString(name, InAvailabilityReasonType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java index 99e996cad0fab..64098d923873b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public KeySource() { * @param name a name to look for. * @return the corresponding KeySource. */ - @JsonCreator public static KeySource fromString(String name) { return fromString(name, KeySource.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java index be742c2d7f42a..3320b7fad9636 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java @@ -6,41 +6,40 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Properties of key vault. */ @Fluent -public final class KeyVaultProperties { +public final class KeyVaultProperties implements JsonSerializable { /* * UUID v4 used to identify the Azure Key Vault configuration */ - @JsonProperty(value = "keyVaultId", access = JsonProperty.Access.WRITE_ONLY) private String keyVaultId; /* * The Uri of KeyVault. */ - @JsonProperty(value = "keyVaultUri", required = true) private String keyVaultUri; /* * The name of KeyVault key. */ - @JsonProperty(value = "keyName", required = true) private String keyName; /* * The resource ID of KeyVault. */ - @JsonProperty(value = "keyVaultResourceId", required = true) private String keyVaultResourceId; /* * Status of the KeyVault connection. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private KeyVaultStatus status; /** @@ -141,12 +140,54 @@ public void validate() { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property keyName in model KeyVaultProperties")); } - if (keyVaultResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultResourceId in model KeyVaultProperties")); - } } private static final ClientLogger LOGGER = new ClientLogger(KeyVaultProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("keyName", this.keyName); + jsonWriter.writeStringField("keyVaultResourceId", this.keyVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the KeyVaultProperties. + */ + public static KeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultProperties deserializedKeyVaultProperties = new KeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedKeyVaultProperties.keyVaultUri = reader.getString(); + } else if ("keyName".equals(fieldName)) { + deserializedKeyVaultProperties.keyName = reader.getString(); + } else if ("keyVaultId".equals(fieldName)) { + deserializedKeyVaultProperties.keyVaultId = reader.getString(); + } else if ("keyVaultResourceId".equals(fieldName)) { + deserializedKeyVaultProperties.keyVaultResourceId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedKeyVaultProperties.status = KeyVaultStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java index e4a178b53bd0f..74730ce895e43 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -52,7 +51,6 @@ public KeyVaultStatus() { * @param name a name to look for. * @return the corresponding KeyVaultStatus. */ - @JsonCreator public static KeyVaultStatus fromString(String name) { return fromString(name, KeyVaultStatus.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java index 679785cfc5c46..5029cf0919b59 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * LDAP search scope. */ @Fluent -public final class LdapSearchScopeOpt { +public final class LdapSearchScopeOpt implements JsonSerializable { /* * This specifies the user DN, which overrides the base DN for user lookups. */ - @JsonProperty(value = "userDN") private String userDN; /* * This specifies the group DN, which overrides the base DN for group lookups. */ - @JsonProperty(value = "groupDN") private String groupDN; /* * This specifies the custom LDAP search filter to be used when looking up group membership from LDAP server. */ - @JsonProperty(value = "groupMembershipFilter") private String groupMembershipFilter; /** @@ -105,4 +106,46 @@ public LdapSearchScopeOpt withGroupMembershipFilter(String groupMembershipFilter */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userDN", this.userDN); + jsonWriter.writeStringField("groupDN", this.groupDN); + jsonWriter.writeStringField("groupMembershipFilter", this.groupMembershipFilter); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LdapSearchScopeOpt from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LdapSearchScopeOpt if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LdapSearchScopeOpt. + */ + public static LdapSearchScopeOpt fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LdapSearchScopeOpt deserializedLdapSearchScopeOpt = new LdapSearchScopeOpt(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userDN".equals(fieldName)) { + deserializedLdapSearchScopeOpt.userDN = reader.getString(); + } else if ("groupDN".equals(fieldName)) { + deserializedLdapSearchScopeOpt.groupDN = reader.getString(); + } else if ("groupMembershipFilter".equals(fieldName)) { + deserializedLdapSearchScopeOpt.groupMembershipFilter = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLdapSearchScopeOpt; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java index b151064a1aa4f..d8cea8b062f86 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListReplications.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List Replications. */ @Fluent -public final class ListReplications { +public final class ListReplications implements JsonSerializable { /* * A list of replications */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ListReplications from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ListReplications if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ListReplications. + */ + public static ListReplications fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ListReplications deserializedListReplications = new ListReplications(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ReplicationInner.fromJson(reader1)); + deserializedListReplications.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedListReplications; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java index 260b9682224e9..1ec0dc420473f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LogSpecification.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Log Definition of a single resource metric. */ @Fluent -public final class LogSpecification { +public final class LogSpecification implements JsonSerializable { /* * Name of log specification. */ - @JsonProperty(value = "name") private String name; /* * Display name of log specification. */ - @JsonProperty(value = "displayName") private String displayName; /** @@ -77,4 +79,43 @@ public LogSpecification withDisplayName(String displayName) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogSpecification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogSpecification if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LogSpecification. + */ + public static LogSpecification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogSpecification deserializedLogSpecification = new LogSpecification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedLogSpecification.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedLogSpecification.displayName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLogSpecification; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java index 52302fe979ada..711a7f80487d3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentity.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; import java.util.UUID; @@ -15,30 +18,30 @@ * Managed service identity (system assigned and/or user assigned identities). */ @Fluent -public final class ManagedServiceIdentity { +public final class ManagedServiceIdentity implements JsonSerializable { /* - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; /* * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ - @JsonProperty(value = "type", required = true) private ManagedServiceIdentityType type; /* - * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will + * be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** @@ -135,4 +138,53 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedServiceIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedServiceIdentity. + */ + public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); + } else if ("principalId".equals(fieldName)) { + deserializedManagedServiceIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("tenantId".equals(fieldName)) { + deserializedManagedServiceIdentity.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedServiceIdentity; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java index 79ee9d792b766..1717ea1a947a5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ManagedServiceIdentityType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -48,7 +47,6 @@ public ManagedServiceIdentityType() { * @param name a name to look for. * @return the corresponding ManagedServiceIdentityType. */ - @JsonCreator public static ManagedServiceIdentityType fromString(String name) { return fromString(name, ManagedServiceIdentityType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java index 55cd66bfda20b..24e9a6047b56b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricAggregationType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -32,7 +31,6 @@ public MetricAggregationType() { * @param name a name to look for. * @return the corresponding MetricAggregationType. */ - @JsonCreator public static MetricAggregationType fromString(String name) { return fromString(name, MetricAggregationType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java index 666a16e9a43c5..d9d36042d6d54 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MetricSpecification.java @@ -5,108 +5,96 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Metric specification of operation. */ @Fluent -public final class MetricSpecification { +public final class MetricSpecification implements JsonSerializable { /* * Name of metric specification. */ - @JsonProperty(value = "name") private String name; /* * Display name of metric specification. */ - @JsonProperty(value = "displayName") private String displayName; /* * Display description of metric specification. */ - @JsonProperty(value = "displayDescription") private String displayDescription; /* * Unit could be Bytes or Count. */ - @JsonProperty(value = "unit") private String unit; /* * Support metric aggregation type. */ - @JsonProperty(value = "supportedAggregationTypes") private List supportedAggregationTypes; /* * The supported time grain types for the metrics. */ - @JsonProperty(value = "supportedTimeGrainTypes") private List supportedTimeGrainTypes; /* * The internal metric name. */ - @JsonProperty(value = "internalMetricName") private String internalMetricName; /* * Whether or not the service is using regional MDM accounts. */ - @JsonProperty(value = "enableRegionalMdmAccount") private Boolean enableRegionalMdmAccount; /* * The source MDM account. */ - @JsonProperty(value = "sourceMdmAccount") private String sourceMdmAccount; /* * The source MDM namespace. */ - @JsonProperty(value = "sourceMdmNamespace") private String sourceMdmNamespace; /* * Dimensions of blobs, including blob type and access tier. */ - @JsonProperty(value = "dimensions") private List dimensions; /* * Aggregation type could be Average. */ - @JsonProperty(value = "aggregationType") private String aggregationType; /* * The property to decide fill gap with zero or not. */ - @JsonProperty(value = "fillGapWithZero") private Boolean fillGapWithZero; /* * The category this metric specification belong to, could be Capacity. */ - @JsonProperty(value = "category") private String category; /* * Account Resource Id. */ - @JsonProperty(value = "resourceIdDimensionNameOverride") private String resourceIdDimensionNameOverride; /* * Whether the metric is internal. */ - @JsonProperty(value = "isInternal") private Boolean isInternal; /** @@ -445,4 +433,92 @@ public void validate() { dimensions().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("displayDescription", this.displayDescription); + jsonWriter.writeStringField("unit", this.unit); + jsonWriter.writeArrayField("supportedAggregationTypes", this.supportedAggregationTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("supportedTimeGrainTypes", this.supportedTimeGrainTypes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("internalMetricName", this.internalMetricName); + jsonWriter.writeBooleanField("enableRegionalMdmAccount", this.enableRegionalMdmAccount); + jsonWriter.writeStringField("sourceMdmAccount", this.sourceMdmAccount); + jsonWriter.writeStringField("sourceMdmNamespace", this.sourceMdmNamespace); + jsonWriter.writeArrayField("dimensions", this.dimensions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("aggregationType", this.aggregationType); + jsonWriter.writeBooleanField("fillGapWithZero", this.fillGapWithZero); + jsonWriter.writeStringField("category", this.category); + jsonWriter.writeStringField("resourceIdDimensionNameOverride", this.resourceIdDimensionNameOverride); + jsonWriter.writeBooleanField("isInternal", this.isInternal); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MetricSpecification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MetricSpecification if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MetricSpecification. + */ + public static MetricSpecification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MetricSpecification deserializedMetricSpecification = new MetricSpecification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedMetricSpecification.name = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedMetricSpecification.displayName = reader.getString(); + } else if ("displayDescription".equals(fieldName)) { + deserializedMetricSpecification.displayDescription = reader.getString(); + } else if ("unit".equals(fieldName)) { + deserializedMetricSpecification.unit = reader.getString(); + } else if ("supportedAggregationTypes".equals(fieldName)) { + List supportedAggregationTypes + = reader.readArray(reader1 -> MetricAggregationType.fromString(reader1.getString())); + deserializedMetricSpecification.supportedAggregationTypes = supportedAggregationTypes; + } else if ("supportedTimeGrainTypes".equals(fieldName)) { + List supportedTimeGrainTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedMetricSpecification.supportedTimeGrainTypes = supportedTimeGrainTypes; + } else if ("internalMetricName".equals(fieldName)) { + deserializedMetricSpecification.internalMetricName = reader.getString(); + } else if ("enableRegionalMdmAccount".equals(fieldName)) { + deserializedMetricSpecification.enableRegionalMdmAccount + = reader.getNullable(JsonReader::getBoolean); + } else if ("sourceMdmAccount".equals(fieldName)) { + deserializedMetricSpecification.sourceMdmAccount = reader.getString(); + } else if ("sourceMdmNamespace".equals(fieldName)) { + deserializedMetricSpecification.sourceMdmNamespace = reader.getString(); + } else if ("dimensions".equals(fieldName)) { + List dimensions = reader.readArray(reader1 -> Dimension.fromJson(reader1)); + deserializedMetricSpecification.dimensions = dimensions; + } else if ("aggregationType".equals(fieldName)) { + deserializedMetricSpecification.aggregationType = reader.getString(); + } else if ("fillGapWithZero".equals(fieldName)) { + deserializedMetricSpecification.fillGapWithZero = reader.getNullable(JsonReader::getBoolean); + } else if ("category".equals(fieldName)) { + deserializedMetricSpecification.category = reader.getString(); + } else if ("resourceIdDimensionNameOverride".equals(fieldName)) { + deserializedMetricSpecification.resourceIdDimensionNameOverride = reader.getString(); + } else if ("isInternal".equals(fieldName)) { + deserializedMetricSpecification.isInternal = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMetricSpecification; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java index 2e88067f935cc..7ffd1fc156b3b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MirrorState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public MirrorState() { * @param name a name to look for. * @return the corresponding MirrorState. */ - @JsonCreator public static MirrorState fromString(String name) { return fromString(name, MirrorState.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java index dbda3ccc09c37..4ba806ed649e7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/MonthlySchedule.java @@ -5,41 +5,40 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Monthly Schedule properties. */ @Fluent -public final class MonthlySchedule { +public final class MonthlySchedule implements JsonSerializable { /* * Monthly snapshot count to keep */ - @JsonProperty(value = "snapshotsToKeep") private Integer snapshotsToKeep; /* * Indicates which days of the month snapshot should be taken. A comma delimited string. */ - @JsonProperty(value = "daysOfMonth") private String daysOfMonth; /* * Indicates which hour in UTC timezone a snapshot should be taken */ - @JsonProperty(value = "hour") private Integer hour; /* * Indicates which minute snapshot should be taken */ - @JsonProperty(value = "minute") private Integer minute; /* * Resource size in bytes, current storage usage for the volume in bytes */ - @JsonProperty(value = "usedBytes") private Long usedBytes; /** @@ -157,4 +156,52 @@ public MonthlySchedule withUsedBytes(Long usedBytes) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeStringField("daysOfMonth", this.daysOfMonth); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + jsonWriter.writeNumberField("usedBytes", this.usedBytes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonthlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonthlySchedule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MonthlySchedule. + */ + public static MonthlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonthlySchedule deserializedMonthlySchedule = new MonthlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedMonthlySchedule.snapshotsToKeep = reader.getNullable(JsonReader::getInt); + } else if ("daysOfMonth".equals(fieldName)) { + deserializedMonthlySchedule.daysOfMonth = reader.getString(); + } else if ("hour".equals(fieldName)) { + deserializedMonthlySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedMonthlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else if ("usedBytes".equals(fieldName)) { + deserializedMonthlySchedule.usedBytes = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedMonthlySchedule; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java index c65b657d7389c..de6198739d57c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of NetApp account resources. */ @Fluent -public final class NetAppAccountList { +public final class NetAppAccountList implements JsonSerializable { /* * Multiple NetApp accounts */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetAppAccountList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetAppAccountList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetAppAccountList. + */ + public static NetAppAccountList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetAppAccountList deserializedNetAppAccountList = new NetAppAccountList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> NetAppAccountInner.fromJson(reader1)); + deserializedNetAppAccountList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetAppAccountList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetAppAccountList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java index 551c73c4e8f0f..9627cfbc42f14 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccountPatch.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.AccountProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -19,15 +22,28 @@ public final class NetAppAccountPatch extends Resource { /* * NetApp Account properties */ - @JsonProperty(value = "properties") private AccountProperties innerProperties; /* * The identity used for the resource. */ - @JsonProperty(value = "identity") private ManagedServiceIdentity identity; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of NetAppAccountPatch class. */ @@ -63,6 +79,36 @@ public NetAppAccountPatch withIdentity(ManagedServiceIdentity identity) { return this; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -159,4 +205,57 @@ public void validate() { identity().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetAppAccountPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetAppAccountPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetAppAccountPatch. + */ + public static NetAppAccountPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetAppAccountPatch deserializedNetAppAccountPatch = new NetAppAccountPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetAppAccountPatch.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetAppAccountPatch.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNetAppAccountPatch.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNetAppAccountPatch.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedNetAppAccountPatch.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedNetAppAccountPatch.innerProperties = AccountProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNetAppAccountPatch.identity = ManagedServiceIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetAppAccountPatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java index 5af054d77ac3d..2cea4a62c9a1a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkFeatures.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -49,7 +48,6 @@ public NetworkFeatures() { * @param name a name to look for. * @return the corresponding NetworkFeatures. */ - @JsonCreator public static NetworkFeatures fromString(String name) { return fromString(name, NetworkFeatures.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java index 7a81728e3c8d1..723cfd3ec2bd2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSet.java @@ -12,18 +12,16 @@ */ public interface NetworkSiblingSet { /** - * Gets the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + * Gets the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources + * in a subnet. * * @return the networkSiblingSetId value. */ String networkSiblingSetId(); /** - * Gets the subnetId property: Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * Gets the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes. Example * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. * * @return the subnetId value. @@ -31,18 +29,15 @@ public interface NetworkSiblingSet { String subnetId(); /** - * Gets the networkSiblingSetStateId property: Network sibling set state Id - * - * Network sibling set state Id identifying the current state of the sibling set. + * Gets the networkSiblingSetStateId property: Network sibling set state Id identifying the current state of the + * sibling set. * * @return the networkSiblingSetStateId value. */ String networkSiblingSetStateId(); /** - * Gets the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Gets the networkFeatures property: Network features available to the volume, or current state of update. * * @return the networkFeatures value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java index bec663fdb885c..2c72033913428 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetworkSiblingSetProvisioningState.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public NetworkSiblingSetProvisioningState() { * @param name a name to look for. * @return the corresponding NetworkSiblingSetProvisioningState. */ - @JsonCreator public static NetworkSiblingSetProvisioningState fromString(String name) { return fromString(name, NetworkSiblingSetProvisioningState.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java index 90f17b9849d1b..18d6642d99ce8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NicInfo.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** @@ -14,17 +18,15 @@ * NIC information and list of volumes for which the NIC has the primary mount ip address. */ @Fluent -public final class NicInfo { +public final class NicInfo implements JsonSerializable { /* * ipAddress */ - @JsonProperty(value = "ipAddress", access = JsonProperty.Access.WRITE_ONLY) private String ipAddress; /* * Volume resource Ids */ - @JsonProperty(value = "volumeResourceIds") private List volumeResourceIds; /** @@ -69,4 +71,44 @@ public NicInfo withVolumeResourceIds(List volumeResourceIds) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("volumeResourceIds", this.volumeResourceIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NicInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NicInfo if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the NicInfo. + */ + public static NicInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NicInfo deserializedNicInfo = new NicInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddress".equals(fieldName)) { + deserializedNicInfo.ipAddress = reader.getString(); + } else if ("volumeResourceIds".equals(fieldName)) { + List volumeResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedNicInfo.volumeResourceIds = volumeResourceIds; + } else { + reader.skipChildren(); + } + } + + return deserializedNicInfo; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java index d5caf9ee561c7..ddd5f2f1da057 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Display metadata associated with the operation. */ @Fluent -public final class OperationDisplay { +public final class OperationDisplay implements JsonSerializable { /* * Service provider: Microsoft NetApp. */ - @JsonProperty(value = "provider") private String provider; /* * Resource on which the operation is performed etc. */ - @JsonProperty(value = "resource") private String resource; /* * Type of operation: get, read, delete, etc. */ - @JsonProperty(value = "operation") private String operation; /* * Operation description. */ - @JsonProperty(value = "description") private String description; /** @@ -129,4 +129,49 @@ public OperationDisplay withDescription(String description) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provider", this.provider); + jsonWriter.writeStringField("resource", this.resource); + jsonWriter.writeStringField("operation", this.operation); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java index 2174fe5ebbaf7..aeb694cf27747 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OperationListResult.java @@ -5,8 +5,12 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -14,11 +18,10 @@ * next set of results. */ @Fluent -public final class OperationListResult { +public final class OperationListResult implements JsonSerializable { /* * List of Storage operations supported by the Storage resource provider. */ - @JsonProperty(value = "value") private List value; /** @@ -57,4 +60,41 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java index dd0c08a426d32..8c5eae503ce69 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java @@ -6,23 +6,25 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Application specific parameters for the placement of volumes in the volume group. */ @Fluent -public final class PlacementKeyValuePairs { +public final class PlacementKeyValuePairs implements JsonSerializable { /* * Key for an application specific parameter for the placement of volumes in the volume group */ - @JsonProperty(value = "key", required = true) private String key; /* * Value for an application specific parameter for the placement of volumes in the volume group */ - @JsonProperty(value = "value", required = true) private String value; /** @@ -90,4 +92,44 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PlacementKeyValuePairs.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlacementKeyValuePairs from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlacementKeyValuePairs if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PlacementKeyValuePairs. + */ + public static PlacementKeyValuePairs fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlacementKeyValuePairs deserializedPlacementKeyValuePairs = new PlacementKeyValuePairs(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedPlacementKeyValuePairs.key = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedPlacementKeyValuePairs.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPlacementKeyValuePairs; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java index 3f2015d440cc0..95ccf9b12f53c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java @@ -6,17 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Pool change request. */ @Fluent -public final class PoolChangeRequest { +public final class PoolChangeRequest implements JsonSerializable { /* * Resource id of the pool to move volume to */ - @JsonProperty(value = "newPoolResourceId", required = true) private String newPoolResourceId; /** @@ -59,4 +62,41 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(PoolChangeRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("newPoolResourceId", this.newPoolResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PoolChangeRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PoolChangeRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PoolChangeRequest. + */ + public static PoolChangeRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PoolChangeRequest deserializedPoolChangeRequest = new PoolChangeRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("newPoolResourceId".equals(fieldName)) { + deserializedPoolChangeRequest.newPoolResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPoolChangeRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java index e087d87c98ee6..9c5edaf61771e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java @@ -4,9 +4,6 @@ package com.azure.resourcemanager.netapp.models; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - /** * Gets the status of the VolumeQuotaRule at the time the operation was called. */ @@ -61,7 +58,6 @@ public enum ProvisioningState { * @param value the serialized value to parse. * @return the parsed ProvisioningState object, or null if unable to parse. */ - @JsonCreator public static ProvisioningState fromString(String value) { if (value == null) { return null; @@ -78,7 +74,6 @@ public static ProvisioningState fromString(String value) { /** * {@inheritDoc} */ - @JsonValue @Override public String toString() { return this.value; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java index 7b6c03021187f..027a63c6d570e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QosType.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public QosType() { * @param name a name to look for. * @return the corresponding QosType. */ - @JsonCreator public static QosType fromString(String name) { return fromString(name, QosType.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java index eb0782ffb45ad..30395ef6d32a4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java @@ -6,7 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * QueryNetworkSiblingSetRequest @@ -14,21 +18,17 @@ * Network sibling set query. */ @Fluent -public final class QueryNetworkSiblingSetRequest { +public final class QueryNetworkSiblingSetRequest implements JsonSerializable { /* - * Network Sibling Set ID - * * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. */ - @JsonProperty(value = "networkSiblingSetId", required = true) private String networkSiblingSetId; /* - * Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/ + * subnets/{mySubnet} */ - @JsonProperty(value = "subnetId", required = true) private String subnetId; /** @@ -38,9 +38,8 @@ public QueryNetworkSiblingSetRequest() { } /** - * Get the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + * Get the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources + * in a subnet. * * @return the networkSiblingSetId value. */ @@ -49,9 +48,8 @@ public String networkSiblingSetId() { } /** - * Set the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + * Set the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources + * in a subnet. * * @param networkSiblingSetId the networkSiblingSetId value to set. * @return the QueryNetworkSiblingSetRequest object itself. @@ -62,9 +60,8 @@ public QueryNetworkSiblingSetRequest withNetworkSiblingSetId(String networkSibli } /** - * Get the subnetId property: Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes. Example * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. * * @return the subnetId value. @@ -74,9 +71,8 @@ public String subnetId() { } /** - * Set the subnetId property: Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes. Example * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. * * @param subnetId the subnetId value to set. @@ -106,4 +102,45 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(QueryNetworkSiblingSetRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkSiblingSetId", this.networkSiblingSetId); + jsonWriter.writeStringField("subnetId", this.subnetId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QueryNetworkSiblingSetRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QueryNetworkSiblingSetRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the QueryNetworkSiblingSetRequest. + */ + public static QueryNetworkSiblingSetRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QueryNetworkSiblingSetRequest deserializedQueryNetworkSiblingSetRequest + = new QueryNetworkSiblingSetRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkSiblingSetId".equals(fieldName)) { + deserializedQueryNetworkSiblingSetRequest.networkSiblingSetId = reader.getString(); + } else if ("subnetId".equals(fieldName)) { + deserializedQueryNetworkSiblingSetRequest.subnetId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedQueryNetworkSiblingSetRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java index 9f6c5e195ea3e..cfb32f64a6b59 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java @@ -6,29 +6,30 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Quota availability request content. */ @Fluent -public final class QuotaAvailabilityRequest { +public final class QuotaAvailabilityRequest implements JsonSerializable { /* * Name of the resource to verify. */ - @JsonProperty(value = "name", required = true) private String name; /* * Resource type used for verification. */ - @JsonProperty(value = "type", required = true) private CheckQuotaNameResourceTypes type; /* * Resource group name. */ - @JsonProperty(value = "resourceGroup", required = true) private String resourceGroup; /** @@ -119,4 +120,48 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(QuotaAvailabilityRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QuotaAvailabilityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QuotaAvailabilityRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the QuotaAvailabilityRequest. + */ + public static QuotaAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QuotaAvailabilityRequest deserializedQuotaAvailabilityRequest = new QuotaAvailabilityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedQuotaAvailabilityRequest.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedQuotaAvailabilityRequest.type + = CheckQuotaNameResourceTypes.fromString(reader.getString()); + } else if ("resourceGroup".equals(fieldName)) { + deserializedQuotaAvailabilityRequest.resourceGroup = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedQuotaAvailabilityRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java index 07255b001d935..fef12c5ef6a46 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Re-establish request object supplied in the body of the operation. */ @Fluent -public final class ReestablishReplicationRequest { +public final class ReestablishReplicationRequest implements JsonSerializable { /* * Resource id of the source volume for the replication */ - @JsonProperty(value = "sourceVolumeId") private String sourceVolumeId; /** @@ -51,4 +54,41 @@ public ReestablishReplicationRequest withSourceVolumeId(String sourceVolumeId) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sourceVolumeId", this.sourceVolumeId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReestablishReplicationRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReestablishReplicationRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ReestablishReplicationRequest. + */ + public static ReestablishReplicationRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReestablishReplicationRequest deserializedReestablishReplicationRequest + = new ReestablishReplicationRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sourceVolumeId".equals(fieldName)) { + deserializedReestablishReplicationRequest.sourceVolumeId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReestablishReplicationRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java index 8d9cc1d1bd2db..c3b81938dbb14 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java @@ -12,18 +12,15 @@ */ public interface RegionInfo { /** - * Gets the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. + * Gets the storageToNetworkProximity property: Provides storage to network proximity information in the region. * * @return the storageToNetworkProximity value. */ RegionStorageToNetworkProximity storageToNetworkProximity(); /** - * Gets the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. + * Gets the availabilityZoneMappings property: Provides logical availability zone mappings for the subscription for + * a region. * * @return the availabilityZoneMappings value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java index 918ead354a2db..0a85e06f1ae6f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java @@ -5,23 +5,26 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The RegionInfoAvailabilityZoneMappingsItem model. */ @Fluent -public final class RegionInfoAvailabilityZoneMappingsItem { +public final class RegionInfoAvailabilityZoneMappingsItem + implements JsonSerializable { /* * Logical availability zone. */ - @JsonProperty(value = "availabilityZone") private String availabilityZone; /* * Available availability zone */ - @JsonProperty(value = "isAvailable") private Boolean isAvailable; /** @@ -77,4 +80,45 @@ public RegionInfoAvailabilityZoneMappingsItem withIsAvailable(Boolean isAvailabl */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("availabilityZone", this.availabilityZone); + jsonWriter.writeBooleanField("isAvailable", this.isAvailable); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegionInfoAvailabilityZoneMappingsItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegionInfoAvailabilityZoneMappingsItem if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RegionInfoAvailabilityZoneMappingsItem. + */ + public static RegionInfoAvailabilityZoneMappingsItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegionInfoAvailabilityZoneMappingsItem deserializedRegionInfoAvailabilityZoneMappingsItem + = new RegionInfoAvailabilityZoneMappingsItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("availabilityZone".equals(fieldName)) { + deserializedRegionInfoAvailabilityZoneMappingsItem.availabilityZone = reader.getString(); + } else if ("isAvailable".equals(fieldName)) { + deserializedRegionInfoAvailabilityZoneMappingsItem.isAvailable + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedRegionInfoAvailabilityZoneMappingsItem; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java index 2b38b85fc6c4c..64d7180d87f64 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java @@ -41,18 +41,15 @@ public interface RegionInfoResource { SystemData systemData(); /** - * Gets the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information in the region. + * Gets the storageToNetworkProximity property: Provides storage to network proximity information in the region. * * @return the storageToNetworkProximity value. */ RegionStorageToNetworkProximity storageToNetworkProximity(); /** - * Gets the availabilityZoneMappings property: Logical availability zone mappings. - * - * Provides logical availability zone mappings for the subscription for a region. + * Gets the availabilityZoneMappings property: Provides logical availability zone mappings for the subscription for + * a region. * * @return the availabilityZoneMappings value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java index 4532e186625bb..45350f12398cb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionInfosList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of regionInfo resources. */ @Fluent -public final class RegionInfosList { +public final class RegionInfosList implements JsonSerializable { /* * A list of regionInfo resources */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegionInfosList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegionInfosList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RegionInfosList. + */ + public static RegionInfosList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegionInfosList deserializedRegionInfosList = new RegionInfosList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RegionInfoResourceInner.fromJson(reader1)); + deserializedRegionInfosList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRegionInfosList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRegionInfosList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java index c9ef87a13aecb..354914f08b4fd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -69,7 +68,6 @@ public RegionStorageToNetworkProximity() { * @param name a name to look for. * @return the corresponding RegionStorageToNetworkProximity. */ - @JsonCreator public static RegionStorageToNetworkProximity fromString(String name) { return fromString(name, RegionStorageToNetworkProximity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java index 830b2531dee9f..2e347844f6f29 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelationshipStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -47,7 +46,6 @@ public RelationshipStatus() { * @param name a name to look for. * @return the corresponding RelationshipStatus. */ - @JsonCreator public static RelationshipStatus fromString(String name) { return fromString(name, RelationshipStatus.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java index ecc166da5b48b..88d4b2400e7d0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Relocate volume request. */ @Fluent -public final class RelocateVolumeRequest { +public final class RelocateVolumeRequest implements JsonSerializable { /* * New creation token for the volume that controls the mount point name */ - @JsonProperty(value = "creationToken") private String creationToken; /** @@ -51,4 +54,40 @@ public RelocateVolumeRequest withCreationToken(String creationToken) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("creationToken", this.creationToken); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RelocateVolumeRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RelocateVolumeRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RelocateVolumeRequest. + */ + public static RelocateVolumeRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RelocateVolumeRequest deserializedRelocateVolumeRequest = new RelocateVolumeRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationToken".equals(fieldName)) { + deserializedRelocateVolumeRequest.creationToken = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRelocateVolumeRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java index 2c805152607f4..b88c82cb04a1b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Replication.java @@ -10,6 +10,13 @@ * An immutable client-side representation of Replication. */ public interface Replication { + /** + * Gets the replicationId property: UUID v4 used to identify the replication. + * + * @return the replicationId value. + */ + String replicationId(); + /** * Gets the endpointType property: Indicates whether the local volume is the source or destination for the Volume * Replication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java index 560612e864c3e..8448453d57a5a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java @@ -6,41 +6,40 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Replication properties. */ @Fluent -public final class ReplicationObject { +public final class ReplicationObject implements JsonSerializable { /* * Id */ - @JsonProperty(value = "replicationId", access = JsonProperty.Access.WRITE_ONLY) private String replicationId; /* * Indicates whether the local volume is the source or destination for the Volume Replication */ - @JsonProperty(value = "endpointType") private EndpointType endpointType; /* * Schedule */ - @JsonProperty(value = "replicationSchedule") private ReplicationSchedule replicationSchedule; /* * The resource ID of the remote volume. */ - @JsonProperty(value = "remoteVolumeResourceId", required = true) private String remoteVolumeResourceId; /* * The remote region for the other end of the Volume Replication. */ - @JsonProperty(value = "remoteVolumeRegion") private String remoteVolumeRegion; /** @@ -154,4 +153,54 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ReplicationObject.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("remoteVolumeResourceId", this.remoteVolumeResourceId); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("replicationSchedule", + this.replicationSchedule == null ? null : this.replicationSchedule.toString()); + jsonWriter.writeStringField("remoteVolumeRegion", this.remoteVolumeRegion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ReplicationObject from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ReplicationObject if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ReplicationObject. + */ + public static ReplicationObject fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ReplicationObject deserializedReplicationObject = new ReplicationObject(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("remoteVolumeResourceId".equals(fieldName)) { + deserializedReplicationObject.remoteVolumeResourceId = reader.getString(); + } else if ("replicationId".equals(fieldName)) { + deserializedReplicationObject.replicationId = reader.getString(); + } else if ("endpointType".equals(fieldName)) { + deserializedReplicationObject.endpointType = EndpointType.fromString(reader.getString()); + } else if ("replicationSchedule".equals(fieldName)) { + deserializedReplicationObject.replicationSchedule + = ReplicationSchedule.fromString(reader.getString()); + } else if ("remoteVolumeRegion".equals(fieldName)) { + deserializedReplicationObject.remoteVolumeRegion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedReplicationObject; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java index b71e15a5b81d6..624f0d36e57cb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -42,7 +41,6 @@ public ReplicationSchedule() { * @param name a name to look for. * @return the corresponding ReplicationSchedule. */ - @JsonCreator public static ReplicationSchedule fromString(String name) { return fromString(name, ReplicationSchedule.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java index 7f424842983f8..5d4e7624932fd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java @@ -6,29 +6,30 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Resource name availability request content. */ @Fluent -public final class ResourceNameAvailabilityRequest { +public final class ResourceNameAvailabilityRequest implements JsonSerializable { /* * Resource name to verify. */ - @JsonProperty(value = "name", required = true) private String name; /* * Resource type used for verification. */ - @JsonProperty(value = "type", required = true) private CheckNameResourceTypes type; /* * Resource group name. */ - @JsonProperty(value = "resourceGroup", required = true) private String resourceGroup; /** @@ -121,4 +122,49 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(ResourceNameAvailabilityRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceNameAvailabilityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceNameAvailabilityRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceNameAvailabilityRequest. + */ + public static ResourceNameAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceNameAvailabilityRequest deserializedResourceNameAvailabilityRequest + = new ResourceNameAvailabilityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceNameAvailabilityRequest.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedResourceNameAvailabilityRequest.type + = CheckNameResourceTypes.fromString(reader.getString()); + } else if ("resourceGroup".equals(fieldName)) { + deserializedResourceNameAvailabilityRequest.resourceGroup = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceNameAvailabilityRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java index 5a1b0fcc92149..d53ddff042623 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -37,7 +36,6 @@ public SecurityStyle() { * @param name a name to look for. * @return the corresponding SecurityStyle. */ - @JsonCreator public static SecurityStyle fromString(String name) { return fromString(name, SecurityStyle.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java index c0308e5cdd776..50199244bda44 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -49,7 +48,6 @@ public ServiceLevel() { * @param name a name to look for. * @return the corresponding ServiceLevel. */ - @JsonCreator public static ServiceLevel fromString(String name) { return fromString(name, ServiceLevel.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java index 7a91ae1a86d3a..ad02853967716 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * One property of operation, include metric specifications. */ @Fluent -public final class ServiceSpecification { +public final class ServiceSpecification implements JsonSerializable { /* * Metric specifications of operation. */ - @JsonProperty(value = "metricSpecifications") private List metricSpecifications; /* * Log specification of operation. */ - @JsonProperty(value = "logSpecifications") private List logSpecifications; /** @@ -84,4 +86,49 @@ public void validate() { logSpecifications().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("metricSpecifications", this.metricSpecifications, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("logSpecifications", this.logSpecifications, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceSpecification from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceSpecification if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceSpecification. + */ + public static ServiceSpecification fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceSpecification deserializedServiceSpecification = new ServiceSpecification(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("metricSpecifications".equals(fieldName)) { + List metricSpecifications + = reader.readArray(reader1 -> MetricSpecification.fromJson(reader1)); + deserializedServiceSpecification.metricSpecifications = metricSpecifications; + } else if ("logSpecifications".equals(fieldName)) { + List logSpecifications + = reader.readArray(reader1 -> LogSpecification.fromJson(reader1)); + deserializedServiceSpecification.logSpecifications = logSpecifications; + } else { + reader.skipChildren(); + } + } + + return deserializedServiceSpecification; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java index c15525e3d4eb2..63b566c83ce4d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -39,7 +38,6 @@ public SmbAccessBasedEnumeration() { * @param name a name to look for. * @return the corresponding SmbAccessBasedEnumeration. */ - @JsonCreator public static SmbAccessBasedEnumeration fromString(String name) { return fromString(name, SmbAccessBasedEnumeration.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java index ccbc67e8f0d80..bd0fe37428a9f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -39,7 +38,6 @@ public SmbNonBrowsable() { * @param name a name to look for. * @return the corresponding SmbNonBrowsable. */ - @JsonCreator public static SmbNonBrowsable fromString(String name) { return fromString(name, SmbNonBrowsable.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java index 1798242cf1ee6..881878f268720 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java @@ -50,18 +50,14 @@ public interface Snapshot { SystemData systemData(); /** - * Gets the snapshotId property: snapshotId - * - * UUID v4 used to identify the Snapshot. + * Gets the snapshotId property: UUID v4 used to identify the Snapshot. * * @return the snapshotId value. */ String snapshotId(); /** - * Gets the created property: name - * - * The creation date of the snapshot. + * Gets the created property: The creation date of the snapshot. * * @return the created value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java index 7f533beaf985f..0c50b83239f01 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPoliciesList.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Snapshot Policies. */ @Fluent -public final class SnapshotPoliciesList { +public final class SnapshotPoliciesList implements JsonSerializable { /* * A list of snapshot policies */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotPoliciesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotPoliciesList if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotPoliciesList. + */ + public static SnapshotPoliciesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotPoliciesList deserializedSnapshotPoliciesList = new SnapshotPoliciesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SnapshotPolicyInner.fromJson(reader1)); + deserializedSnapshotPoliciesList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotPoliciesList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java index 70cef92e2dd9f..6d94a8214ed20 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java @@ -5,51 +5,47 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * Snapshot policy Details for create and update. */ @Fluent -public final class SnapshotPolicyPatch { +public final class SnapshotPolicyPatch implements JsonSerializable { /* * Resource location */ - @JsonProperty(value = "location") private String location; /* * Resource Id */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* * Resource name */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Resource type */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; /* * Resource tags */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Snapshot Policy properties */ - @JsonProperty(value = "properties") private SnapshotPolicyProperties innerProperties; /** @@ -268,4 +264,53 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotPolicyPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotPolicyPatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotPolicyPatch. + */ + public static SnapshotPolicyPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotPolicyPatch deserializedSnapshotPolicyPatch = new SnapshotPolicyPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedSnapshotPolicyPatch.location = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedSnapshotPolicyPatch.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSnapshotPolicyPatch.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSnapshotPolicyPatch.type = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSnapshotPolicyPatch.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedSnapshotPolicyPatch.innerProperties = SnapshotPolicyProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotPolicyPatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java index 0e49ff1b380a5..ce2cff030e0b8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java @@ -6,24 +6,26 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Restore payload for Single File Snapshot Restore. */ @Fluent -public final class SnapshotRestoreFiles { +public final class SnapshotRestoreFiles implements JsonSerializable { /* * List of files to be restored */ - @JsonProperty(value = "filePaths", required = true) private List filePaths; /* * Destination folder where the files will be restored */ - @JsonProperty(value = "destinationPath") private String destinationPath; /** @@ -85,4 +87,45 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(SnapshotRestoreFiles.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("filePaths", this.filePaths, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("destinationPath", this.destinationPath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotRestoreFiles from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotRestoreFiles if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SnapshotRestoreFiles. + */ + public static SnapshotRestoreFiles fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotRestoreFiles deserializedSnapshotRestoreFiles = new SnapshotRestoreFiles(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filePaths".equals(fieldName)) { + List filePaths = reader.readArray(reader1 -> reader1.getString()); + deserializedSnapshotRestoreFiles.filePaths = filePaths; + } else if ("destinationPath".equals(fieldName)) { + deserializedSnapshotRestoreFiles.destinationPath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotRestoreFiles; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java index 731db5a69ccbb..380f5701084ca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotsList.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Snapshots. */ @Fluent -public final class SnapshotsList { +public final class SnapshotsList implements JsonSerializable { /* * A list of Snapshots */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SnapshotsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SnapshotsList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SnapshotsList. + */ + public static SnapshotsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SnapshotsList deserializedSnapshotsList = new SnapshotsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SnapshotInner.fromJson(reader1)); + deserializedSnapshotsList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedSnapshotsList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java index 99be137f11c95..3533aa8a5ae99 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItemList.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Subscription Quota Items. */ @Fluent -public final class SubscriptionQuotaItemList { +public final class SubscriptionQuotaItemList implements JsonSerializable { /* * A list of SubscriptionQuotaItems */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubscriptionQuotaItemList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubscriptionQuotaItemList if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubscriptionQuotaItemList. + */ + public static SubscriptionQuotaItemList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubscriptionQuotaItemList deserializedSubscriptionQuotaItemList = new SubscriptionQuotaItemList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SubscriptionQuotaItemInner.fromJson(reader1)); + deserializedSubscriptionQuotaItemList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedSubscriptionQuotaItemList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java index 7e01d44c72add..46337e4f55212 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java @@ -41,27 +41,21 @@ public interface SubvolumeInfo { SystemData systemData(); /** - * Gets the path property: path - * - * Path to the subvolume. + * Gets the path property: Path to the subvolume. * * @return the path value. */ String path(); /** - * Gets the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Gets the size property: Truncate subvolume to the provided size in bytes. * * @return the size value. */ Long size(); /** - * Gets the parentPath property: name - * - * parent path to the subvolume. + * Gets the parentPath property: parent path to the subvolume. * * @return the parentPath value. */ @@ -149,13 +143,9 @@ interface WithCreate */ interface WithPath { /** - * Specifies the path property: path - * - * Path to the subvolume. + * Specifies the path property: Path to the subvolume. * - * @param path path - * - * Path to the subvolume. + * @param path Path to the subvolume. * @return the next definition stage. */ WithCreate withPath(String path); @@ -166,13 +156,9 @@ interface WithPath { */ interface WithSize { /** - * Specifies the size property: size - * - * Truncate subvolume to the provided size in bytes. - * - * @param size size + * Specifies the size property: Truncate subvolume to the provided size in bytes. * - * Truncate subvolume to the provided size in bytes. + * @param size Truncate subvolume to the provided size in bytes. * @return the next definition stage. */ WithCreate withSize(Long size); @@ -183,13 +169,9 @@ interface WithSize { */ interface WithParentPath { /** - * Specifies the parentPath property: name + * Specifies the parentPath property: parent path to the subvolume. * - * parent path to the subvolume. - * - * @param parentPath name - * - * parent path to the subvolume. + * @param parentPath parent path to the subvolume. * @return the next definition stage. */ WithCreate withParentPath(String parentPath); @@ -232,13 +214,9 @@ interface UpdateStages { */ interface WithSize { /** - * Specifies the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Specifies the size property: Truncate subvolume to the provided size in bytes. * - * @param size size - * - * Truncate subvolume to the provided size in bytes. + * @param size Truncate subvolume to the provided size in bytes. * @return the next definition stage. */ Update withSize(Long size); @@ -249,13 +227,9 @@ interface WithSize { */ interface WithPath { /** - * Specifies the path property: path - * - * path to the subvolume. - * - * @param path path + * Specifies the path property: path to the subvolume. * - * path to the subvolume. + * @param path path to the subvolume. * @return the next definition stage. */ Update withPath(String path); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java index b91f2f0aabd2e..3543be4d8fcd8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java @@ -33,81 +33,63 @@ public interface SubvolumeModel { String type(); /** - * Gets the path property: path - * - * Path to the subvolume. + * Gets the path property: Path to the subvolume. * * @return the path value. */ String path(); /** - * Gets the parentPath property: parentpath - * - * Path to the parent subvolume. + * Gets the parentPath property: Path to the parent subvolume. * * @return the parentPath value. */ String parentPath(); /** - * Gets the size property: size - * - * Size of subvolume. + * Gets the size property: Size of subvolume. * * @return the size value. */ Long size(); /** - * Gets the bytesUsed property: bytesUsed - * - * Bytes used. + * Gets the bytesUsed property: Bytes used. * * @return the bytesUsed value. */ Long bytesUsed(); /** - * Gets the permissions property: permissions - * - * Permissions of the subvolume. + * Gets the permissions property: Permissions of the subvolume. * * @return the permissions value. */ String permissions(); /** - * Gets the creationTimestamp property: creationTimeStamp - * - * Creation time and date. + * Gets the creationTimestamp property: Creation time and date. * * @return the creationTimestamp value. */ OffsetDateTime creationTimestamp(); /** - * Gets the accessedTimestamp property: accessedTimeStamp - * - * Most recent access time and date. + * Gets the accessedTimestamp property: Most recent access time and date. * * @return the accessedTimestamp value. */ OffsetDateTime accessedTimestamp(); /** - * Gets the modifiedTimestamp property: modifiedTimeStamp - * - * Most recent modification time and date. + * Gets the modifiedTimestamp property: Most recent modification time and date. * * @return the modifiedTimestamp value. */ OffsetDateTime modifiedTimestamp(); /** - * Gets the changedTimestamp property: changedTimeStamp - * - * Most recent change time and date. + * Gets the changedTimestamp property: Most recent change time and date. * * @return the changedTimestamp value. */ diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java index 91548bcfac0c2..5c332de52f088 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java @@ -5,18 +5,21 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * Subvolume Patch Request properties. */ @Fluent -public final class SubvolumePatchRequest { +public final class SubvolumePatchRequest implements JsonSerializable { /* * Subvolume Properties */ - @JsonProperty(value = "properties") private SubvolumePatchParams innerProperties; /** @@ -35,9 +38,7 @@ private SubvolumePatchParams innerProperties() { } /** - * Get the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Get the size property: Truncate subvolume to the provided size in bytes. * * @return the size value. */ @@ -46,9 +47,7 @@ public Long size() { } /** - * Set the size property: size - * - * Truncate subvolume to the provided size in bytes. + * Set the size property: Truncate subvolume to the provided size in bytes. * * @param size the size value to set. * @return the SubvolumePatchRequest object itself. @@ -62,9 +61,7 @@ public SubvolumePatchRequest withSize(Long size) { } /** - * Get the path property: path - * - * path to the subvolume. + * Get the path property: path to the subvolume. * * @return the path value. */ @@ -73,9 +70,7 @@ public String path() { } /** - * Set the path property: path - * - * path to the subvolume. + * Set the path property: path to the subvolume. * * @param path the path value to set. * @return the SubvolumePatchRequest object itself. @@ -98,4 +93,40 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubvolumePatchRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubvolumePatchRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SubvolumePatchRequest. + */ + public static SubvolumePatchRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubvolumePatchRequest deserializedSubvolumePatchRequest = new SubvolumePatchRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedSubvolumePatchRequest.innerProperties = SubvolumePatchParams.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSubvolumePatchRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java index eea2f16b76601..a64a18dfb3a47 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SubvolumesList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Subvolumes. */ @Fluent -public final class SubvolumesList { +public final class SubvolumesList implements JsonSerializable { /* * A list of Subvolumes */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SubvolumesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SubvolumesList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SubvolumesList. + */ + public static SubvolumesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SubvolumesList deserializedSubvolumesList = new SubvolumesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> SubvolumeInfoInner.fromJson(reader1)); + deserializedSubvolumesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSubvolumesList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSubvolumesList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java index 6641b99a90bda..7e6c467bdb64f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Type.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -49,7 +48,6 @@ public Type() { * @param name a name to look for. * @return the corresponding Type. */ - @JsonCreator public static Type fromString(String name) { return fromString(name, Type.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java index ac00af2d4a06f..c59c1374c080d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java @@ -6,7 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * UpdateNetworkSiblingSetRequest @@ -14,37 +18,27 @@ * Network sibling set update. */ @Fluent -public final class UpdateNetworkSiblingSetRequest { +public final class UpdateNetworkSiblingSetRequest implements JsonSerializable { /* - * Network Sibling Set ID - * * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. */ - @JsonProperty(value = "networkSiblingSetId", required = true) private String networkSiblingSetId; /* - * Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet} + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/ + * subnets/{mySubnet} */ - @JsonProperty(value = "subnetId", required = true) private String subnetId; /* - * Network sibling set state Id - * * Network sibling set state Id identifying the current state of the sibling set. */ - @JsonProperty(value = "networkSiblingSetStateId", required = true) private String networkSiblingSetStateId; /* - * Network features - * * Network features available to the volume. */ - @JsonProperty(value = "networkFeatures", required = true) private NetworkFeatures networkFeatures; /** @@ -54,9 +48,8 @@ public UpdateNetworkSiblingSetRequest() { } /** - * Get the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + * Get the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources + * in a subnet. * * @return the networkSiblingSetId value. */ @@ -65,9 +58,8 @@ public String networkSiblingSetId() { } /** - * Set the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet. + * Set the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources + * in a subnet. * * @param networkSiblingSetId the networkSiblingSetId value to set. * @return the UpdateNetworkSiblingSetRequest object itself. @@ -78,9 +70,8 @@ public UpdateNetworkSiblingSetRequest withNetworkSiblingSetId(String networkSibl } /** - * Get the subnetId property: Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes. Example * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. * * @return the subnetId value. @@ -90,9 +81,8 @@ public String subnetId() { } /** - * Set the subnetId property: Subnet resource Id - * - * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example + * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/volumes. Example * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}. * * @param subnetId the subnetId value to set. @@ -104,9 +94,8 @@ public UpdateNetworkSiblingSetRequest withSubnetId(String subnetId) { } /** - * Get the networkSiblingSetStateId property: Network sibling set state Id - * - * Network sibling set state Id identifying the current state of the sibling set. + * Get the networkSiblingSetStateId property: Network sibling set state Id identifying the current state of the + * sibling set. * * @return the networkSiblingSetStateId value. */ @@ -115,9 +104,8 @@ public String networkSiblingSetStateId() { } /** - * Set the networkSiblingSetStateId property: Network sibling set state Id - * - * Network sibling set state Id identifying the current state of the sibling set. + * Set the networkSiblingSetStateId property: Network sibling set state Id identifying the current state of the + * sibling set. * * @param networkSiblingSetStateId the networkSiblingSetStateId value to set. * @return the UpdateNetworkSiblingSetRequest object itself. @@ -128,9 +116,7 @@ public UpdateNetworkSiblingSetRequest withNetworkSiblingSetStateId(String networ } /** - * Get the networkFeatures property: Network features - * - * Network features available to the volume. + * Get the networkFeatures property: Network features available to the volume. * * @return the networkFeatures value. */ @@ -139,9 +125,7 @@ public NetworkFeatures networkFeatures() { } /** - * Set the networkFeatures property: Network features - * - * Network features available to the volume. + * Set the networkFeatures property: Network features available to the volume. * * @param networkFeatures the networkFeatures value to set. * @return the UpdateNetworkSiblingSetRequest object itself. @@ -180,4 +164,53 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(UpdateNetworkSiblingSetRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkSiblingSetId", this.networkSiblingSetId); + jsonWriter.writeStringField("subnetId", this.subnetId); + jsonWriter.writeStringField("networkSiblingSetStateId", this.networkSiblingSetStateId); + jsonWriter.writeStringField("networkFeatures", + this.networkFeatures == null ? null : this.networkFeatures.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UpdateNetworkSiblingSetRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UpdateNetworkSiblingSetRequest if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UpdateNetworkSiblingSetRequest. + */ + public static UpdateNetworkSiblingSetRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UpdateNetworkSiblingSetRequest deserializedUpdateNetworkSiblingSetRequest + = new UpdateNetworkSiblingSetRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkSiblingSetId".equals(fieldName)) { + deserializedUpdateNetworkSiblingSetRequest.networkSiblingSetId = reader.getString(); + } else if ("subnetId".equals(fieldName)) { + deserializedUpdateNetworkSiblingSetRequest.subnetId = reader.getString(); + } else if ("networkSiblingSetStateId".equals(fieldName)) { + deserializedUpdateNetworkSiblingSetRequest.networkSiblingSetStateId = reader.getString(); + } else if ("networkFeatures".equals(fieldName)) { + deserializedUpdateNetworkSiblingSetRequest.networkFeatures + = NetworkFeatures.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedUpdateNetworkSiblingSetRequest; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java index 98856e541e8f4..7d5aa6b3bfe70 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java @@ -5,24 +5,26 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.UUID; /** * User assigned identity properties. */ @Immutable -public final class UserAssignedIdentity { +public final class UserAssignedIdentity implements JsonSerializable { /* * The principal ID of the assigned identity. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* * The client ID of the assigned identity. */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; /** @@ -56,4 +58,43 @@ public UUID clientId() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the UserAssignedIdentity. + */ + public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentity.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentity; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java index c5f5789948386..84e498f178ecc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java @@ -74,56 +74,45 @@ public interface Volume { SystemData systemData(); /** - * Gets the fileSystemId property: FileSystem ID - * - * Unique FileSystem Identifier. + * Gets the fileSystemId property: Unique FileSystem Identifier. * * @return the fileSystemId value. */ String fileSystemId(); /** - * Gets the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Gets the creationToken property: A unique file path for the volume. Used when creating mount targets. * * @return the creationToken value. */ String creationToken(); /** - * Gets the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Gets the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ ServiceLevel serviceLevel(); /** - * Gets the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Gets the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @return the usageThreshold value. */ long usageThreshold(); /** - * Gets the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Gets the exportPolicy property: Set of export policy rules. * * @return the exportPolicy value. */ VolumePropertiesExportPolicy exportPolicy(); /** - * Gets the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Gets the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * * @return the protocolTypes value. */ @@ -137,9 +126,7 @@ public interface Volume { String provisioningState(); /** - * Gets the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot. + * Gets the snapshotId property: Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -154,18 +141,14 @@ public interface Volume { Boolean deleteBaseSnapshot(); /** - * Gets the backupId property: Backup ID - * - * Resource identifier used to identify the Backup. + * Gets the backupId property: Resource identifier used to identify the Backup. * * @return the backupId value. */ String backupId(); /** - * Gets the baremetalTenantId property: Baremetal Tenant ID - * - * Unique Baremetal Tenant Identifier. + * Gets the baremetalTenantId property: Unique Baremetal Tenant Identifier. * * @return the baremetalTenantId value. */ @@ -180,36 +163,29 @@ public interface Volume { String subnetId(); /** - * Gets the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Gets the networkFeatures property: Network features available to the volume, or current state of update. * * @return the networkFeatures value. */ NetworkFeatures networkFeatures(); /** - * Gets the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for the the group of volumes sharing networking resources. + * Gets the networkSiblingSetId property: Network Sibling Set ID for the the group of volumes sharing networking + * resources. * * @return the networkSiblingSetId value. */ String networkSiblingSetId(); /** - * Gets the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information for the volume. + * Gets the storageToNetworkProximity property: Provides storage to network proximity information for the volume. * * @return the storageToNetworkProximity value. */ VolumeStorageToNetworkProximity storageToNetworkProximity(); /** - * Gets the mountTargets property: mountTargets - * - * List of mount targets. + * Gets the mountTargets property: List of mount targets. * * @return the mountTargets value. */ @@ -224,9 +200,8 @@ public interface Volume { String volumeType(); /** - * Gets the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Gets the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @return the dataProtection value. */ @@ -272,18 +247,16 @@ public interface Volume { Boolean smbEncryption(); /** - * Gets the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Gets the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @return the smbAccessBasedEnumeration value. */ SmbAccessBasedEnumeration smbAccessBasedEnumeration(); /** - * Gets the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Gets the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @return the smbNonBrowsable value. */ @@ -394,18 +367,15 @@ public interface Volume { FileAccessLogs fileAccessLogs(); /** - * Gets the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * Gets the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * * @return the avsDataStore value. */ AvsDataStore avsDataStore(); /** - * Gets the dataStoreResourceId property: dataStoreResourceId - * - * Data store resource unique identifier. + * Gets the dataStoreResourceId property: Data store resource unique identifier. * * @return the dataStoreResourceId value. */ @@ -488,9 +458,7 @@ public interface Volume { Boolean encrypted(); /** - * Gets the placementRules property: Volume placement rules - * - * Application specific placement rules for the particular volume. + * Gets the placementRules property: Application specific placement rules for the particular volume. * * @return the placementRules value. */ @@ -504,28 +472,22 @@ public interface Volume { EnableSubvolumes enableSubvolumes(); /** - * Gets the provisionedAvailabilityZone property: Provisioned Availability Zone - * - * The availability zone where the volume is provisioned. This refers to the logical availability zone where the - * volume resides. + * Gets the provisionedAvailabilityZone property: The availability zone where the volume is provisioned. This refers + * to the logical availability zone where the volume resides. * * @return the provisionedAvailabilityZone value. */ String provisionedAvailabilityZone(); /** - * Gets the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * Gets the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume. * * @return the isLargeVolume value. */ Boolean isLargeVolume(); /** - * Gets the originatingResourceId property: Originating Resource Id - * - * Id of the snapshot or backup that the volume is restored from. + * Gets the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * * @return the originatingResourceId value. */ @@ -618,13 +580,10 @@ interface WithParentResource { */ interface WithCreationToken { /** - * Specifies the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Specifies the creationToken property: A unique file path for the volume. Used when creating mount + * targets. * - * @param creationToken Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * @param creationToken A unique file path for the volume. Used when creating mount targets. * @return the next definition stage. */ WithUsageThreshold withCreationToken(String creationToken); @@ -635,17 +594,15 @@ interface WithCreationToken { */ interface WithUsageThreshold { /** - * Specifies the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. - * Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on - * exceptional basis. Specified in bytes.. - * - * @param usageThreshold usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. - * Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on - * exceptional basis. Specified in bytes. + * Specifies the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is + * a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + * 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.. + * + * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used + * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. + * Values expressed in bytes as multiples of 1 GiB. * @return the next definition stage. */ WithSubnetId withUsageThreshold(long usageThreshold); @@ -734,13 +691,9 @@ interface WithZones { */ interface WithServiceLevel { /** - * Specifies the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Specifies the serviceLevel property: The service level of the file system. * - * @param serviceLevel serviceLevel - * - * The service level of the file system. + * @param serviceLevel The service level of the file system. * @return the next definition stage. */ WithCreate withServiceLevel(ServiceLevel serviceLevel); @@ -751,13 +704,9 @@ interface WithServiceLevel { */ interface WithExportPolicy { /** - * Specifies the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Specifies the exportPolicy property: Set of export policy rules. * - * @param exportPolicy exportPolicy - * - * Set of export policy rules. + * @param exportPolicy Set of export policy rules. * @return the next definition stage. */ WithCreate withExportPolicy(VolumePropertiesExportPolicy exportPolicy); @@ -768,13 +717,9 @@ interface WithExportPolicy { */ interface WithProtocolTypes { /** - * Specifies the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. - * - * @param protocolTypes protocolTypes + * Specifies the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * @param protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. * @return the next definition stage. */ WithCreate withProtocolTypes(List protocolTypes); @@ -785,13 +730,9 @@ interface WithProtocolTypes { */ interface WithSnapshotId { /** - * Specifies the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot.. - * - * @param snapshotId Snapshot ID + * Specifies the snapshotId property: Resource identifier used to identify the Snapshot.. * - * Resource identifier used to identify the Snapshot. + * @param snapshotId Resource identifier used to identify the Snapshot. * @return the next definition stage. */ WithCreate withSnapshotId(String snapshotId); @@ -817,13 +758,9 @@ interface WithDeleteBaseSnapshot { */ interface WithBackupId { /** - * Specifies the backupId property: Backup ID + * Specifies the backupId property: Resource identifier used to identify the Backup.. * - * Resource identifier used to identify the Backup.. - * - * @param backupId Backup ID - * - * Resource identifier used to identify the Backup. + * @param backupId Resource identifier used to identify the Backup. * @return the next definition stage. */ WithCreate withBackupId(String backupId); @@ -834,13 +771,10 @@ interface WithBackupId { */ interface WithNetworkFeatures { /** - * Specifies the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update.. - * - * @param networkFeatures Network features + * Specifies the networkFeatures property: Network features available to the volume, or current state of + * update.. * - * Network features available to the volume, or current state of update. + * @param networkFeatures Network features available to the volume, or current state of update. * @return the next definition stage. */ WithCreate withNetworkFeatures(NetworkFeatures networkFeatures); @@ -866,13 +800,11 @@ interface WithVolumeType { */ interface WithDataProtection { /** - * Specifies the dataProtection property: DataProtection + * Specifies the dataProtection property: DataProtection type volumes include an object containing details + * of the replication. * - * DataProtection type volumes include an object containing details of the replication. - * - * @param dataProtection DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * @param dataProtection DataProtection type volumes include an object containing details of the + * replication. * @return the next definition stage. */ WithCreate withDataProtection(VolumePropertiesDataProtection dataProtection); @@ -956,15 +888,11 @@ interface WithSmbEncryption { */ interface WithSmbAccessBasedEnumeration { /** - * Specifies the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol - * volume. - * - * @param smbAccessBasedEnumeration smbAccessBasedEnumeration + * Specifies the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB + * Shares. Only applicable for SMB/DualProtocol volume. * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol - * volume. + * @param smbAccessBasedEnumeration Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * @return the next definition stage. */ WithCreate withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration smbAccessBasedEnumeration); @@ -975,13 +903,11 @@ interface WithSmbAccessBasedEnumeration { */ interface WithSmbNonBrowsable { /** - * Specifies the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. - * - * @param smbNonBrowsable smbNonBrowsable + * Specifies the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * @param smbNonBrowsable Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * @return the next definition stage. */ WithCreate withSmbNonBrowsable(SmbNonBrowsable smbNonBrowsable); @@ -1144,13 +1070,11 @@ interface WithUnixPermissions { */ interface WithAvsDataStore { /** - * Specifies the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. - * - * @param avsDataStore avsDataStore + * Specifies the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution + * (AVS) datastore purpose. * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * @param avsDataStore Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * @return the next definition stage. */ WithCreate withAvsDataStore(AvsDataStore avsDataStore); @@ -1246,13 +1170,9 @@ interface WithVolumeSpecName { */ interface WithPlacementRules { /** - * Specifies the placementRules property: Volume placement rules + * Specifies the placementRules property: Application specific placement rules for the particular volume. * - * Application specific placement rules for the particular volume. - * - * @param placementRules Volume placement rules - * - * Application specific placement rules for the particular volume. + * @param placementRules Application specific placement rules for the particular volume. * @return the next definition stage. */ WithCreate withPlacementRules(List placementRules); @@ -1277,13 +1197,9 @@ interface WithEnableSubvolumes { */ interface WithIsLargeVolume { /** - * Specifies the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume.. + * Specifies the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume.. * - * @param isLargeVolume Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * @param isLargeVolume Specifies whether volume is a Large Volume or Regular Volume. * @return the next definition stage. */ WithCreate withIsLargeVolume(Boolean isLargeVolume); @@ -1301,12 +1217,12 @@ interface WithIsLargeVolume { * The template for Volume update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithServiceLevel, UpdateStages.WithUsageThreshold, - UpdateStages.WithExportPolicy, UpdateStages.WithThroughputMibps, UpdateStages.WithDataProtection, - UpdateStages.WithIsDefaultQuotaEnabled, UpdateStages.WithDefaultUserQuotaInKiBs, - UpdateStages.WithDefaultGroupQuotaInKiBs, UpdateStages.WithUnixPermissions, UpdateStages.WithCoolAccess, - UpdateStages.WithCoolnessPeriod, UpdateStages.WithCoolAccessRetrievalPolicy, - UpdateStages.WithSnapshotDirectoryVisible, UpdateStages.WithSmbAccessBasedEnumeration, - UpdateStages.WithSmbNonBrowsable { + UpdateStages.WithExportPolicy, UpdateStages.WithProtocolTypes, UpdateStages.WithThroughputMibps, + UpdateStages.WithDataProtection, UpdateStages.WithIsDefaultQuotaEnabled, + UpdateStages.WithDefaultUserQuotaInKiBs, UpdateStages.WithDefaultGroupQuotaInKiBs, + UpdateStages.WithUnixPermissions, UpdateStages.WithCoolAccess, UpdateStages.WithCoolnessPeriod, + UpdateStages.WithCoolAccessRetrievalPolicy, UpdateStages.WithSnapshotDirectoryVisible, + UpdateStages.WithSmbAccessBasedEnumeration, UpdateStages.WithSmbNonBrowsable { /** * Executes the update request. * @@ -1345,13 +1261,9 @@ interface WithTags { */ interface WithServiceLevel { /** - * Specifies the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Specifies the serviceLevel property: The service level of the file system. * - * @param serviceLevel serviceLevel - * - * The service level of the file system. + * @param serviceLevel The service level of the file system. * @return the next definition stage. */ Update withServiceLevel(ServiceLevel serviceLevel); @@ -1362,17 +1274,15 @@ interface WithServiceLevel { */ interface WithUsageThreshold { /** - * Specifies the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. - * Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on - * exceptional basis. Specified in bytes.. - * - * @param usageThreshold usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. - * Minimum size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on - * exceptional basis. Specified in bytes. + * Specifies the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is + * a soft quota used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to + * 2400GiB to 2400TiB. Values expressed in bytes as multiples of 1 GiB.. + * + * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used + * for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. + * Values expressed in bytes as multiples of 1 GiB. * @return the next definition stage. */ Update withUsageThreshold(Long usageThreshold); @@ -1383,18 +1293,27 @@ interface WithUsageThreshold { */ interface WithExportPolicy { /** - * Specifies the exportPolicy property: exportPolicy + * Specifies the exportPolicy property: Set of export policy rules. * - * Set of export policy rules. - * - * @param exportPolicy exportPolicy - * - * Set of export policy rules. + * @param exportPolicy Set of export policy rules. * @return the next definition stage. */ Update withExportPolicy(VolumePatchPropertiesExportPolicy exportPolicy); } + /** + * The stage of the Volume update allowing to specify protocolTypes. + */ + interface WithProtocolTypes { + /** + * Specifies the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @param protocolTypes Set of protocol types, default NFSv3, CIFS for SMB protocol. + * @return the next definition stage. + */ + Update withProtocolTypes(List protocolTypes); + } + /** * The stage of the Volume update allowing to specify throughputMibps. */ @@ -1415,13 +1334,11 @@ interface WithThroughputMibps { */ interface WithDataProtection { /** - * Specifies the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. - * - * @param dataProtection DataProtection + * Specifies the dataProtection property: DataProtection type volumes include an object containing details + * of the replication. * - * DataProtection type volumes include an object containing details of the replication. + * @param dataProtection DataProtection type volumes include an object containing details of the + * replication. * @return the next definition stage. */ Update withDataProtection(VolumePatchPropertiesDataProtection dataProtection); @@ -1566,15 +1483,11 @@ interface WithSnapshotDirectoryVisible { */ interface WithSmbAccessBasedEnumeration { /** - * Specifies the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol - * volume. + * Specifies the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB + * Shares. Only applicable for SMB/DualProtocol volume. * - * @param smbAccessBasedEnumeration smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol - * volume. + * @param smbAccessBasedEnumeration Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * @return the next definition stage. */ Update withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration smbAccessBasedEnumeration); @@ -1585,13 +1498,11 @@ interface WithSmbAccessBasedEnumeration { */ interface WithSmbNonBrowsable { /** - * Specifies the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. - * - * @param smbNonBrowsable smbNonBrowsable + * Specifies the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable + * for SMB/DualProtocol volume. * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * @param smbNonBrowsable Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * @return the next definition stage. */ Update withSmbNonBrowsable(SmbNonBrowsable smbNonBrowsable); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java index 6ad0e25c7f1fc..adc3f7a07cbcc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Volume Backup Properties. */ @Fluent -public final class VolumeBackupProperties { +public final class VolumeBackupProperties implements JsonSerializable { /* * Backup Policy Resource ID */ - @JsonProperty(value = "backupPolicyId") private String backupPolicyId; /* * Policy Enforced */ - @JsonProperty(value = "policyEnforced") private Boolean policyEnforced; /* * Backup Vault Resource ID */ - @JsonProperty(value = "backupVaultId") private String backupVaultId; /** @@ -103,4 +104,46 @@ public VolumeBackupProperties withBackupVaultId(String backupVaultId) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("backupPolicyId", this.backupPolicyId); + jsonWriter.writeBooleanField("policyEnforced", this.policyEnforced); + jsonWriter.writeStringField("backupVaultId", this.backupVaultId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeBackupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeBackupProperties. + */ + public static VolumeBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeBackupProperties deserializedVolumeBackupProperties = new VolumeBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backupPolicyId".equals(fieldName)) { + deserializedVolumeBackupProperties.backupPolicyId = reader.getString(); + } else if ("policyEnforced".equals(fieldName)) { + deserializedVolumeBackupProperties.policyEnforced = reader.getNullable(JsonReader::getBoolean); + } else if ("backupVaultId".equals(fieldName)) { + deserializedVolumeBackupProperties.backupVaultId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeBackupProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java index 8492da99a5e2a..14f38452f9b84 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java @@ -5,35 +5,35 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Volume details using the backup policy. */ @Fluent -public final class VolumeBackups { +public final class VolumeBackups implements JsonSerializable { /* * Volume name */ - @JsonProperty(value = "volumeName") private String volumeName; /* * ResourceId used to identify the Volume */ - @JsonProperty(value = "volumeResourceId") private String volumeResourceId; /* * Total count of backups for volume */ - @JsonProperty(value = "backupsCount") private Integer backupsCount; /* * Policy enabled */ - @JsonProperty(value = "policyEnabled") private Boolean policyEnabled; /** @@ -129,4 +129,49 @@ public VolumeBackups withPolicyEnabled(Boolean policyEnabled) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("volumeName", this.volumeName); + jsonWriter.writeStringField("volumeResourceId", this.volumeResourceId); + jsonWriter.writeNumberField("backupsCount", this.backupsCount); + jsonWriter.writeBooleanField("policyEnabled", this.policyEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeBackups from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeBackups if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeBackups. + */ + public static VolumeBackups fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeBackups deserializedVolumeBackups = new VolumeBackups(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("volumeName".equals(fieldName)) { + deserializedVolumeBackups.volumeName = reader.getString(); + } else if ("volumeResourceId".equals(fieldName)) { + deserializedVolumeBackups.volumeResourceId = reader.getString(); + } else if ("backupsCount".equals(fieldName)) { + deserializedVolumeBackups.backupsCount = reader.getNullable(JsonReader::getInt); + } else if ("policyEnabled".equals(fieldName)) { + deserializedVolumeBackups.policyEnabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeBackups; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java index cf48d0acc5ce5..5abbf5e68c6de 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of volume group resources. */ @Fluent -public final class VolumeGroupList { +public final class VolumeGroupList implements JsonSerializable { /* * List of volume Groups */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,41 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupList if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupList. + */ + public static VolumeGroupList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupList deserializedVolumeGroupList = new VolumeGroupList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> VolumeGroupInner.fromJson(reader1)); + deserializedVolumeGroupList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java index 50b71e9a33622..a2baa29616ab2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java @@ -5,44 +5,41 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** * Volume group properties. */ @Fluent -public final class VolumeGroupMetadata { +public final class VolumeGroupMetadata implements JsonSerializable { /* * Group Description */ - @JsonProperty(value = "groupDescription") private String groupDescription; /* * Application Type */ - @JsonProperty(value = "applicationType") private ApplicationType applicationType; /* * Application specific identifier */ - @JsonProperty(value = "applicationIdentifier") private String applicationIdentifier; /* - * Global volume placement rules - * * Application specific placement rules for the volume group */ - @JsonProperty(value = "globalPlacementRules") private List globalPlacementRules; /* * Number of volumes in volume group */ - @JsonProperty(value = "volumesCount", access = JsonProperty.Access.WRITE_ONLY) private Long volumesCount; /** @@ -112,9 +109,7 @@ public VolumeGroupMetadata withApplicationIdentifier(String applicationIdentifie } /** - * Get the globalPlacementRules property: Global volume placement rules - * - * Application specific placement rules for the volume group. + * Get the globalPlacementRules property: Application specific placement rules for the volume group. * * @return the globalPlacementRules value. */ @@ -123,9 +118,7 @@ public List globalPlacementRules() { } /** - * Set the globalPlacementRules property: Global volume placement rules - * - * Application specific placement rules for the volume group. + * Set the globalPlacementRules property: Application specific placement rules for the volume group. * * @param globalPlacementRules the globalPlacementRules value to set. * @return the VolumeGroupMetadata object itself. @@ -154,4 +147,55 @@ public void validate() { globalPlacementRules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("groupDescription", this.groupDescription); + jsonWriter.writeStringField("applicationType", + this.applicationType == null ? null : this.applicationType.toString()); + jsonWriter.writeStringField("applicationIdentifier", this.applicationIdentifier); + jsonWriter.writeArrayField("globalPlacementRules", this.globalPlacementRules, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupMetadata from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupMetadata if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeGroupMetadata. + */ + public static VolumeGroupMetadata fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupMetadata deserializedVolumeGroupMetadata = new VolumeGroupMetadata(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupDescription".equals(fieldName)) { + deserializedVolumeGroupMetadata.groupDescription = reader.getString(); + } else if ("applicationType".equals(fieldName)) { + deserializedVolumeGroupMetadata.applicationType = ApplicationType.fromString(reader.getString()); + } else if ("applicationIdentifier".equals(fieldName)) { + deserializedVolumeGroupMetadata.applicationIdentifier = reader.getString(); + } else if ("globalPlacementRules".equals(fieldName)) { + List globalPlacementRules + = reader.readArray(reader1 -> PlacementKeyValuePairs.fromJson(reader1)); + deserializedVolumeGroupMetadata.globalPlacementRules = globalPlacementRules; + } else if ("volumesCount".equals(fieldName)) { + deserializedVolumeGroupMetadata.volumesCount = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupMetadata; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java index 68a22b0083b49..ffca5fb11882f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java @@ -7,10 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties; import com.azure.resourcemanager.netapp.fluent.models.VolumeProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -22,28 +24,33 @@ public final class VolumeGroupVolumeProperties extends ProxyResource { /* * Resource name */ - @JsonProperty(value = "name") private String name; /* * Resource tags */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Availability Zone */ - @JsonProperty(value = "zones") private List zones; /* * Volume properties */ - @JsonProperty(value = "properties", required = true) private VolumeProperties innerProperties = new VolumeProperties(); + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of VolumeGroupVolumeProperties class. */ @@ -120,9 +127,27 @@ private VolumeProperties innerProperties() { } /** - * Get the fileSystemId property: FileSystem ID + * Get the id property: Fully qualified resource Id for the resource. * - * Unique FileSystem Identifier. + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the fileSystemId property: Unique FileSystem Identifier. * * @return the fileSystemId value. */ @@ -131,9 +156,7 @@ public String fileSystemId() { } /** - * Get the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Get the creationToken property: A unique file path for the volume. Used when creating mount targets. * * @return the creationToken value. */ @@ -142,9 +165,7 @@ public String creationToken() { } /** - * Set the creationToken property: Creation Token or File Path - * - * A unique file path for the volume. Used when creating mount targets. + * Set the creationToken property: A unique file path for the volume. Used when creating mount targets. * * @param creationToken the creationToken value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -158,9 +179,7 @@ public VolumeGroupVolumeProperties withCreationToken(String creationToken) { } /** - * Get the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Get the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -169,9 +188,7 @@ public ServiceLevel serviceLevel() { } /** - * Set the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Set the serviceLevel property: The service level of the file system. * * @param serviceLevel the serviceLevel value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -185,11 +202,10 @@ public VolumeGroupVolumeProperties withServiceLevel(ServiceLevel serviceLevel) { } /** - * Get the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @return the usageThreshold value. */ @@ -198,11 +214,10 @@ public long usageThreshold() { } /** - * Set the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -216,9 +231,7 @@ public VolumeGroupVolumeProperties withUsageThreshold(long usageThreshold) { } /** - * Get the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Get the exportPolicy property: Set of export policy rules. * * @return the exportPolicy value. */ @@ -227,9 +240,7 @@ public VolumePropertiesExportPolicy exportPolicy() { } /** - * Set the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Set the exportPolicy property: Set of export policy rules. * * @param exportPolicy the exportPolicy value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -243,9 +254,7 @@ public VolumeGroupVolumeProperties withExportPolicy(VolumePropertiesExportPolicy } /** - * Get the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * * @return the protocolTypes value. */ @@ -254,9 +263,7 @@ public List protocolTypes() { } /** - * Set the protocolTypes property: protocolTypes - * - * Set of protocol types, default NFSv3, CIFS for SMB protocol. + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. * * @param protocolTypes the protocolTypes value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -279,9 +286,7 @@ public String provisioningState() { } /** - * Get the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot. + * Get the snapshotId property: Resource identifier used to identify the Snapshot. * * @return the snapshotId value. */ @@ -290,9 +295,7 @@ public String snapshotId() { } /** - * Set the snapshotId property: Snapshot ID - * - * Resource identifier used to identify the Snapshot. + * Set the snapshotId property: Resource identifier used to identify the Snapshot. * * @param snapshotId the snapshotId value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -331,9 +334,7 @@ public VolumeGroupVolumeProperties withDeleteBaseSnapshot(Boolean deleteBaseSnap } /** - * Get the backupId property: Backup ID - * - * Resource identifier used to identify the Backup. + * Get the backupId property: Resource identifier used to identify the Backup. * * @return the backupId value. */ @@ -342,9 +343,7 @@ public String backupId() { } /** - * Set the backupId property: Backup ID - * - * Resource identifier used to identify the Backup. + * Set the backupId property: Resource identifier used to identify the Backup. * * @param backupId the backupId value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -358,9 +357,7 @@ public VolumeGroupVolumeProperties withBackupId(String backupId) { } /** - * Get the baremetalTenantId property: Baremetal Tenant ID - * - * Unique Baremetal Tenant Identifier. + * Get the baremetalTenantId property: Unique Baremetal Tenant Identifier. * * @return the baremetalTenantId value. */ @@ -394,9 +391,7 @@ public VolumeGroupVolumeProperties withSubnetId(String subnetId) { } /** - * Get the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Get the networkFeatures property: Network features available to the volume, or current state of update. * * @return the networkFeatures value. */ @@ -405,9 +400,7 @@ public NetworkFeatures networkFeatures() { } /** - * Set the networkFeatures property: Network features - * - * Network features available to the volume, or current state of update. + * Set the networkFeatures property: Network features available to the volume, or current state of update. * * @param networkFeatures the networkFeatures value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -421,9 +414,8 @@ public VolumeGroupVolumeProperties withNetworkFeatures(NetworkFeatures networkFe } /** - * Get the networkSiblingSetId property: Network Sibling Set ID - * - * Network Sibling Set ID for the the group of volumes sharing networking resources. + * Get the networkSiblingSetId property: Network Sibling Set ID for the the group of volumes sharing networking + * resources. * * @return the networkSiblingSetId value. */ @@ -432,9 +424,7 @@ public String networkSiblingSetId() { } /** - * Get the storageToNetworkProximity property: Storage to Network Proximity - * - * Provides storage to network proximity information for the volume. + * Get the storageToNetworkProximity property: Provides storage to network proximity information for the volume. * * @return the storageToNetworkProximity value. */ @@ -443,9 +433,7 @@ public VolumeStorageToNetworkProximity storageToNetworkProximity() { } /** - * Get the mountTargets property: mountTargets - * - * List of mount targets. + * Get the mountTargets property: List of mount targets. * * @return the mountTargets value. */ @@ -479,9 +467,8 @@ public VolumeGroupVolumeProperties withVolumeType(String volumeType) { } /** - * Get the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Get the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @return the dataProtection value. */ @@ -490,9 +477,8 @@ public VolumePropertiesDataProtection dataProtection() { } /** - * Set the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Set the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @param dataProtection the dataProtection value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -629,9 +615,8 @@ public VolumeGroupVolumeProperties withSmbEncryption(Boolean smbEncryption) { } /** - * Get the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @return the smbAccessBasedEnumeration value. */ @@ -640,9 +625,8 @@ public SmbAccessBasedEnumeration smbAccessBasedEnumeration() { } /** - * Set the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @param smbAccessBasedEnumeration the smbAccessBasedEnumeration value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -657,9 +641,8 @@ public SmbAccessBasedEnumeration smbAccessBasedEnumeration() { } /** - * Get the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @return the smbNonBrowsable value. */ @@ -668,9 +651,8 @@ public SmbNonBrowsable smbNonBrowsable() { } /** - * Set the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @param smbNonBrowsable the smbNonBrowsable value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -955,9 +937,8 @@ public FileAccessLogs fileAccessLogs() { } /** - * Get the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * Get the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * * @return the avsDataStore value. */ @@ -966,9 +947,8 @@ public AvsDataStore avsDataStore() { } /** - * Set the avsDataStore property: avsDataStore - * - * Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + * Set the avsDataStore property: Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore + * purpose. * * @param avsDataStore the avsDataStore value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -982,9 +962,7 @@ public VolumeGroupVolumeProperties withAvsDataStore(AvsDataStore avsDataStore) { } /** - * Get the dataStoreResourceId property: dataStoreResourceId - * - * Data store resource unique identifier. + * Get the dataStoreResourceId property: Data store resource unique identifier. * * @return the dataStoreResourceId value. */ @@ -1175,9 +1153,7 @@ public Boolean encrypted() { } /** - * Get the placementRules property: Volume placement rules - * - * Application specific placement rules for the particular volume. + * Get the placementRules property: Application specific placement rules for the particular volume. * * @return the placementRules value. */ @@ -1186,9 +1162,7 @@ public List placementRules() { } /** - * Set the placementRules property: Volume placement rules - * - * Application specific placement rules for the particular volume. + * Set the placementRules property: Application specific placement rules for the particular volume. * * @param placementRules the placementRules value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -1225,10 +1199,8 @@ public VolumeGroupVolumeProperties withEnableSubvolumes(EnableSubvolumes enableS } /** - * Get the provisionedAvailabilityZone property: Provisioned Availability Zone - * - * The availability zone where the volume is provisioned. This refers to the logical availability zone where the - * volume resides. + * Get the provisionedAvailabilityZone property: The availability zone where the volume is provisioned. This refers + * to the logical availability zone where the volume resides. * * @return the provisionedAvailabilityZone value. */ @@ -1237,9 +1209,7 @@ public String provisionedAvailabilityZone() { } /** - * Get the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * Get the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume. * * @return the isLargeVolume value. */ @@ -1248,9 +1218,7 @@ public Boolean isLargeVolume() { } /** - * Set the isLargeVolume property: Is Large Volume - * - * Specifies whether volume is a Large Volume or Regular Volume. + * Set the isLargeVolume property: Specifies whether volume is a Large Volume or Regular Volume. * * @param isLargeVolume the isLargeVolume value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -1264,9 +1232,7 @@ public VolumeGroupVolumeProperties withIsLargeVolume(Boolean isLargeVolume) { } /** - * Get the originatingResourceId property: Originating Resource Id - * - * Id of the snapshot or backup that the volume is restored from. + * Get the originatingResourceId property: Id of the snapshot or backup that the volume is restored from. * * @return the originatingResourceId value. */ @@ -1290,4 +1256,58 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(VolumeGroupVolumeProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeGroupVolumeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeGroupVolumeProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumeGroupVolumeProperties. + */ + public static VolumeGroupVolumeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeGroupVolumeProperties deserializedVolumeGroupVolumeProperties = new VolumeGroupVolumeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVolumeGroupVolumeProperties.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumeGroupVolumeProperties.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumeGroupVolumeProperties.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedVolumeGroupVolumeProperties.innerProperties = VolumeProperties.fromJson(reader); + } else if ("name".equals(fieldName)) { + deserializedVolumeGroupVolumeProperties.name = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVolumeGroupVolumeProperties.tags = tags; + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedVolumeGroupVolumeProperties.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeGroupVolumeProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java index b7b7c56f25845..45a5ec177e623 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeList.java @@ -5,25 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.VolumeInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of volume resources. */ @Fluent -public final class VolumeList { +public final class VolumeList implements JsonSerializable { /* * List of volumes */ - @JsonProperty(value = "value") private List value; /* * URL to get the next set of results. */ - @JsonProperty(value = "nextLink") private String nextLink; /** @@ -82,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeList if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the VolumeList. + */ + public static VolumeList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeList deserializedVolumeList = new VolumeList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> VolumeInner.fromJson(reader1)); + deserializedVolumeList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVolumeList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java index a1fa87587cf21..da11e33aa3b8c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java @@ -6,8 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -18,9 +22,23 @@ public final class VolumePatch extends Resource { /* * Patchable volume properties */ - @JsonProperty(value = "properties") private VolumePatchProperties innerProperties; + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /* + * The name of the resource. + */ + private String name; + + /* + * The type of the resource. + */ + private String type; + /** * Creates an instance of VolumePatch class. */ @@ -36,6 +54,36 @@ private VolumePatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + /** * {@inheritDoc} */ @@ -55,9 +103,7 @@ public VolumePatch withTags(Map tags) { } /** - * Get the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Get the serviceLevel property: The service level of the file system. * * @return the serviceLevel value. */ @@ -66,9 +112,7 @@ public ServiceLevel serviceLevel() { } /** - * Set the serviceLevel property: serviceLevel - * - * The service level of the file system. + * Set the serviceLevel property: The service level of the file system. * * @param serviceLevel the serviceLevel value to set. * @return the VolumePatch object itself. @@ -82,11 +126,10 @@ public VolumePatch withServiceLevel(ServiceLevel serviceLevel) { } /** - * Get the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @return the usageThreshold value. */ @@ -95,11 +138,10 @@ public Long usageThreshold() { } /** - * Set the usageThreshold property: usageThreshold - * - * Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum - * size is 100 GiB. Upper limit is 100TiB, 500Tib for LargeVolume or 2400Tib for LargeVolume on exceptional basis. - * Specified in bytes. + * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, + * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values + * expressed in bytes as multiples of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumePatch object itself. @@ -113,9 +155,7 @@ public VolumePatch withUsageThreshold(Long usageThreshold) { } /** - * Get the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Get the exportPolicy property: Set of export policy rules. * * @return the exportPolicy value. */ @@ -124,9 +164,7 @@ public VolumePatchPropertiesExportPolicy exportPolicy() { } /** - * Set the exportPolicy property: exportPolicy - * - * Set of export policy rules. + * Set the exportPolicy property: Set of export policy rules. * * @param exportPolicy the exportPolicy value to set. * @return the VolumePatch object itself. @@ -139,6 +177,29 @@ public VolumePatch withExportPolicy(VolumePatchPropertiesExportPolicy exportPoli return this; } + /** + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.innerProperties() == null ? null : this.innerProperties().protocolTypes(); + } + + /** + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @param protocolTypes the protocolTypes value to set. + * @return the VolumePatch object itself. + */ + public VolumePatch withProtocolTypes(List protocolTypes) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumePatchProperties(); + } + this.innerProperties().withProtocolTypes(protocolTypes); + return this; + } + /** * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this volume and this will * be accepted as input only for manual qosType volume. @@ -165,9 +226,8 @@ public VolumePatch withThroughputMibps(Float throughputMibps) { } /** - * Get the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Get the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @return the dataProtection value. */ @@ -176,9 +236,8 @@ public VolumePatchPropertiesDataProtection dataProtection() { } /** - * Set the dataProtection property: DataProtection - * - * DataProtection type volumes include an object containing details of the replication. + * Set the dataProtection property: DataProtection type volumes include an object containing details of the + * replication. * * @param dataProtection the dataProtection value to set. * @return the VolumePatch object itself. @@ -404,9 +463,8 @@ public VolumePatch withSnapshotDirectoryVisible(Boolean snapshotDirectoryVisible } /** - * Get the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @return the smbAccessBasedEnumeration value. */ @@ -415,9 +473,8 @@ public SmbAccessBasedEnumeration smbAccessBasedEnumeration() { } /** - * Set the smbAccessBasedEnumeration property: smbAccessBasedEnumeration - * - * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbAccessBasedEnumeration property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. * * @param smbAccessBasedEnumeration the smbAccessBasedEnumeration value to set. * @return the VolumePatch object itself. @@ -431,9 +488,8 @@ public VolumePatch withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration smbAc } /** - * Get the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Get the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @return the smbNonBrowsable value. */ @@ -442,9 +498,8 @@ public SmbNonBrowsable smbNonBrowsable() { } /** - * Set the smbNonBrowsable property: smbNonBrowsable - * - * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + * Set the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. * * @param smbNonBrowsable the smbNonBrowsable value to set. * @return the VolumePatch object itself. @@ -467,4 +522,54 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumePatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumePatch if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VolumePatch. + */ + public static VolumePatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumePatch deserializedVolumePatch = new VolumePatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedVolumePatch.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedVolumePatch.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedVolumePatch.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedVolumePatch.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVolumePatch.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedVolumePatch.innerProperties = VolumePatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumePatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java index fde5158f3c885..d0b75aa5ab1b4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * DataProtection @@ -13,17 +17,16 @@ * DataProtection type volumes include an object containing details of the replication. */ @Fluent -public final class VolumePatchPropertiesDataProtection { +public final class VolumePatchPropertiesDataProtection + implements JsonSerializable { /* * Backup Properties */ - @JsonProperty(value = "backup") private VolumeBackupProperties backup; /* * Snapshot properties. */ - @JsonProperty(value = "snapshot") private VolumeSnapshotProperties snapshot; /** @@ -85,4 +88,45 @@ public void validate() { snapshot().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("backup", this.backup); + jsonWriter.writeJsonField("snapshot", this.snapshot); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumePatchPropertiesDataProtection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumePatchPropertiesDataProtection if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumePatchPropertiesDataProtection. + */ + public static VolumePatchPropertiesDataProtection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumePatchPropertiesDataProtection deserializedVolumePatchPropertiesDataProtection + = new VolumePatchPropertiesDataProtection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backup".equals(fieldName)) { + deserializedVolumePatchPropertiesDataProtection.backup = VolumeBackupProperties.fromJson(reader); + } else if ("snapshot".equals(fieldName)) { + deserializedVolumePatchPropertiesDataProtection.snapshot + = VolumeSnapshotProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumePatchPropertiesDataProtection; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java index 80f7fab15fde4..dc8fa6c817ff0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** @@ -14,11 +18,10 @@ * Set of export policy rules. */ @Fluent -public final class VolumePatchPropertiesExportPolicy { +public final class VolumePatchPropertiesExportPolicy implements JsonSerializable { /* * Export policy rule */ - @JsonProperty(value = "rules") private List rules; /** @@ -57,4 +60,42 @@ public void validate() { rules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumePatchPropertiesExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumePatchPropertiesExportPolicy if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumePatchPropertiesExportPolicy. + */ + public static VolumePatchPropertiesExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumePatchPropertiesExportPolicy deserializedVolumePatchPropertiesExportPolicy + = new VolumePatchPropertiesExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List rules = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedVolumePatchPropertiesExportPolicy.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedVolumePatchPropertiesExportPolicy; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java index 5203d2249da71..899a0d3c224aa 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * DataProtection @@ -13,29 +17,25 @@ * DataProtection type volumes include an object containing details of the replication. */ @Fluent -public final class VolumePropertiesDataProtection { +public final class VolumePropertiesDataProtection implements JsonSerializable { /* * Backup Properties */ - @JsonProperty(value = "backup") private VolumeBackupProperties backup; /* * Replication properties */ - @JsonProperty(value = "replication") private ReplicationObject replication; /* * Snapshot properties. */ - @JsonProperty(value = "snapshot") private VolumeSnapshotProperties snapshot; /* * VolumeRelocation properties */ - @JsonProperty(value = "volumeRelocation") private VolumeRelocationProperties volumeRelocation; /** @@ -143,4 +143,51 @@ public void validate() { volumeRelocation().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("backup", this.backup); + jsonWriter.writeJsonField("replication", this.replication); + jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("volumeRelocation", this.volumeRelocation); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumePropertiesDataProtection from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumePropertiesDataProtection if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumePropertiesDataProtection. + */ + public static VolumePropertiesDataProtection fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumePropertiesDataProtection deserializedVolumePropertiesDataProtection + = new VolumePropertiesDataProtection(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("backup".equals(fieldName)) { + deserializedVolumePropertiesDataProtection.backup = VolumeBackupProperties.fromJson(reader); + } else if ("replication".equals(fieldName)) { + deserializedVolumePropertiesDataProtection.replication = ReplicationObject.fromJson(reader); + } else if ("snapshot".equals(fieldName)) { + deserializedVolumePropertiesDataProtection.snapshot = VolumeSnapshotProperties.fromJson(reader); + } else if ("volumeRelocation".equals(fieldName)) { + deserializedVolumePropertiesDataProtection.volumeRelocation + = VolumeRelocationProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumePropertiesDataProtection; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java index 21fc368fd3e7e..f72292bf92361 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java @@ -5,7 +5,11 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; /** @@ -14,11 +18,10 @@ * Set of export policy rules. */ @Fluent -public final class VolumePropertiesExportPolicy { +public final class VolumePropertiesExportPolicy implements JsonSerializable { /* * Export policy rule */ - @JsonProperty(value = "rules") private List rules; /** @@ -57,4 +60,41 @@ public void validate() { rules().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumePropertiesExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumePropertiesExportPolicy if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumePropertiesExportPolicy. + */ + public static VolumePropertiesExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumePropertiesExportPolicy deserializedVolumePropertiesExportPolicy = new VolumePropertiesExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List rules = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedVolumePropertiesExportPolicy.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedVolumePropertiesExportPolicy; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java index ea6cb41283058..1dcfaf0188061 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java @@ -71,9 +71,7 @@ public interface VolumeQuotaRule { Long quotaSizeInKiBs(); /** - * Gets the quotaType property: quotaType - * - * Type of quota. + * Gets the quotaType property: Type of quota. * * @return the quotaType value. */ @@ -224,13 +222,9 @@ interface WithQuotaSizeInKiBs { */ interface WithQuotaType { /** - * Specifies the quotaType property: quotaType - * - * Type of quota. - * - * @param quotaType quotaType + * Specifies the quotaType property: Type of quota. * - * Type of quota. + * @param quotaType Type of quota. * @return the next definition stage. */ WithCreate withQuotaType(Type quotaType); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java index da5c81e146a84..3162521502492 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java @@ -5,27 +5,27 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; /** * Patchable Quota Rule of a Volume. */ @Fluent -public final class VolumeQuotaRulePatch { +public final class VolumeQuotaRulePatch implements JsonSerializable { /* * Resource tags */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* * Volume Quota Rule Properties */ - @JsonProperty(value = "properties") private VolumeQuotaRulesProperties innerProperties; /** @@ -96,9 +96,7 @@ public VolumeQuotaRulePatch withQuotaSizeInKiBs(Long quotaSizeInKiBs) { } /** - * Get the quotaType property: quotaType - * - * Type of quota. + * Get the quotaType property: Type of quota. * * @return the quotaType value. */ @@ -107,9 +105,7 @@ public Type quotaType() { } /** - * Set the quotaType property: quotaType - * - * Type of quota. + * Set the quotaType property: Type of quota. * * @param quotaType the quotaType value to set. * @return the VolumeQuotaRulePatch object itself. @@ -159,4 +155,44 @@ public void validate() { innerProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeQuotaRulePatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeQuotaRulePatch if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeQuotaRulePatch. + */ + public static VolumeQuotaRulePatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeQuotaRulePatch deserializedVolumeQuotaRulePatch = new VolumeQuotaRulePatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedVolumeQuotaRulePatch.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedVolumeQuotaRulePatch.innerProperties = VolumeQuotaRulesProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeQuotaRulePatch; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java index 9d936e759001a..ad22ddbd2b03b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulesList.java @@ -5,19 +5,22 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** * List of Volume Quota Rules. */ @Fluent -public final class VolumeQuotaRulesList { +public final class VolumeQuotaRulesList implements JsonSerializable { /* * A list of Volume Quota Rules */ - @JsonProperty(value = "value") private List value; /** @@ -56,4 +59,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeQuotaRulesList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeQuotaRulesList if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeQuotaRulesList. + */ + public static VolumeQuotaRulesList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeQuotaRulesList deserializedVolumeQuotaRulesList = new VolumeQuotaRulesList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> VolumeQuotaRuleInner.fromJson(reader1)); + deserializedVolumeQuotaRulesList.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeQuotaRulesList; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java index 7593772c9e66b..0ee3530f61eec 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java @@ -5,23 +5,25 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Volume relocation properties. */ @Fluent -public final class VolumeRelocationProperties { +public final class VolumeRelocationProperties implements JsonSerializable { /* * Has relocation been requested for this volume */ - @JsonProperty(value = "relocationRequested") private Boolean relocationRequested; /* * Has relocation finished and is ready to be cleaned up */ - @JsonProperty(value = "readyToBeFinalized", access = JsonProperty.Access.WRITE_ONLY) private Boolean readyToBeFinalized; /** @@ -66,4 +68,44 @@ public Boolean readyToBeFinalized() { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("relocationRequested", this.relocationRequested); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeRelocationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeRelocationProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeRelocationProperties. + */ + public static VolumeRelocationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeRelocationProperties deserializedVolumeRelocationProperties = new VolumeRelocationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("relocationRequested".equals(fieldName)) { + deserializedVolumeRelocationProperties.relocationRequested + = reader.getNullable(JsonReader::getBoolean); + } else if ("readyToBeFinalized".equals(fieldName)) { + deserializedVolumeRelocationProperties.readyToBeFinalized + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeRelocationProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java index 4add05dcd9dd0..9b23aed8a727f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * revert a volume to the snapshot. */ @Fluent -public final class VolumeRevert { +public final class VolumeRevert implements JsonSerializable { /* * Resource id of the snapshot */ - @JsonProperty(value = "snapshotId") private String snapshotId; /** @@ -51,4 +54,40 @@ public VolumeRevert withSnapshotId(String snapshotId) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotId", this.snapshotId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeRevert from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeRevert if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeRevert. + */ + public static VolumeRevert fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeRevert deserializedVolumeRevert = new VolumeRevert(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotId".equals(fieldName)) { + deserializedVolumeRevert.snapshotId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeRevert; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java index 058963bc35616..1df131823300b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Volume Snapshot Properties. */ @Fluent -public final class VolumeSnapshotProperties { +public final class VolumeSnapshotProperties implements JsonSerializable { /* * Snapshot Policy ResourceId */ - @JsonProperty(value = "snapshotPolicyId") private String snapshotPolicyId; /** @@ -51,4 +54,40 @@ public VolumeSnapshotProperties withSnapshotPolicyId(String snapshotPolicyId) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotPolicyId", this.snapshotPolicyId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VolumeSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VolumeSnapshotProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the VolumeSnapshotProperties. + */ + public static VolumeSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VolumeSnapshotProperties deserializedVolumeSnapshotProperties = new VolumeSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotPolicyId".equals(fieldName)) { + deserializedVolumeSnapshotProperties.snapshotPolicyId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVolumeSnapshotProperties; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java index fd5b15f1c059b..5cf8244bb5173 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -49,7 +48,6 @@ public VolumeStorageToNetworkProximity() { * @param name a name to look for. * @return the corresponding VolumeStorageToNetworkProximity. */ - @JsonCreator public static VolumeStorageToNetworkProximity fromString(String name) { return fromString(name, VolumeStorageToNetworkProximity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java index 08439f582ebfc..752b5179bce6a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java @@ -5,41 +5,40 @@ package com.azure.resourcemanager.netapp.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * Weekly Schedule properties, make a snapshot every week at a specific day or days. */ @Fluent -public final class WeeklySchedule { +public final class WeeklySchedule implements JsonSerializable { /* * Weekly snapshot count to keep */ - @JsonProperty(value = "snapshotsToKeep") private Integer snapshotsToKeep; /* * Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english */ - @JsonProperty(value = "day") private String day; /* * Indicates which hour in UTC timezone a snapshot should be taken */ - @JsonProperty(value = "hour") private Integer hour; /* * Indicates which minute snapshot should be taken */ - @JsonProperty(value = "minute") private Integer minute; /* * Resource size in bytes, current storage usage for the volume in bytes */ - @JsonProperty(value = "usedBytes") private Long usedBytes; /** @@ -157,4 +156,52 @@ public WeeklySchedule withUsedBytes(Long usedBytes) { */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeStringField("day", this.day); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + jsonWriter.writeNumberField("usedBytes", this.usedBytes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WeeklySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WeeklySchedule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the WeeklySchedule. + */ + public static WeeklySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WeeklySchedule deserializedWeeklySchedule = new WeeklySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedWeeklySchedule.snapshotsToKeep = reader.getNullable(JsonReader::getInt); + } else if ("day".equals(fieldName)) { + deserializedWeeklySchedule.day = reader.getString(); + } else if ("hour".equals(fieldName)) { + deserializedWeeklySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedWeeklySchedule.minute = reader.getNullable(JsonReader::getInt); + } else if ("usedBytes".equals(fieldName)) { + deserializedWeeklySchedule.usedBytes = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedWeeklySchedule; + }); + } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java index 34b8c7b45e99b..4731083d3ad0f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/module-info.java @@ -8,6 +8,6 @@ exports com.azure.resourcemanager.netapp.fluent; exports com.azure.resourcemanager.netapp.fluent.models; exports com.azure.resourcemanager.netapp.models; - opens com.azure.resourcemanager.netapp.fluent.models to com.azure.core, com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.netapp.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.netapp.fluent.models to com.azure.core; + opens com.azure.resourcemanager.netapp.models to com.azure.core; } \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json index e6b59ddf56c08..8b68cce153fa5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService" ], [ "com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService" ], [ "com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService" ], [ "com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService" ], [ "com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService" ], [ "com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService" ], [ "com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService" ], [ "com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService" ], [ "com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService" ], [ "com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService" ] ] \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json index 4dfe39d1a88cf..8878e547a7984 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/reflect-config.json @@ -1,741 +1 @@ -[ { - "name" : "com.azure.resourcemanager.netapp.models.OperationListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.OperationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.OperationDisplay", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.OperationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ServiceSpecification", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.MetricSpecification", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.Dimension", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.LogSpecification", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SubscriptionQuotaItemList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.RegionInfosList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.NicInfo", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.NetAppAccountList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.AccountProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ActiveDirectory", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.AccountEncryption", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.KeyVaultProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.EncryptionIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ManagedServiceIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.UserAssignedIdentity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.NetAppAccountPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.CapacityPoolList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.PoolProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.CapacityPoolPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ExportPolicyRule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeBackupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ReplicationObject", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeRelocationProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumePatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeRevert", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BreakFileLocksRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BreakReplicationRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ListReplications", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.ReplicationInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.AuthorizeRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.PoolChangeRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.RelocateVolumeRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SnapshotsList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SnapshotInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SnapshotPoliciesList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.HourlySchedule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.DailySchedule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.WeeklySchedule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.MonthlySchedule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupPoliciesList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeBackups", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupPolicyPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeQuotaRulesList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeGroupList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeGroupMetadata", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SubvolumesList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SubvolumePatchRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupsList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupVaultsList", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupVaultPatch", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupRestoreFiles", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupsMigrationRequest", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.MetricAggregationType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.CheckNameResourceTypes", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.InAvailabilityReasonType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.NetworkFeatures", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.KeySource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.KeyVaultStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ServiceLevel", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.QosType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.EncryptionType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ChownMode", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.EndpointType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ReplicationSchedule", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SecurityStyle", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.SmbNonBrowsable", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.EncryptionKeySource", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.FileAccessLogs", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.AvsDataStore", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.EnableSubvolumes", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.RelationshipStatus", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.MirrorState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.Type", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ApplicationType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.BackupType", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.netapp.models.ProvisioningState", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -} ] \ No newline at end of file +[ ] \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java index e32bb053ae26c..d6b8ede21d3d7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java @@ -12,7 +12,8 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -24,7 +25,8 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java index e8af95f4f0222..a28a085705be4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java index e376daf9663f1..8a3aff20b3bd6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsGetByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Get.json */ /** * Sample code: Accounts_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java index 7d1a4f15aeb16..44cf233eb141d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListByResourceGroupSamples.java @@ -9,7 +9,8 @@ */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java index 9838cd1952ba9..d60e27cfe5388 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsListSamples.java @@ -9,7 +9,8 @@ */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_List.json */ /** * Sample code: Accounts_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java index c95703be21446..f946ae9eca623 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsSamples.java @@ -9,7 +9,8 @@ */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_RenewCredentials.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java index 7892a89cb292b..cc1de5415f96b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsUpdateSamples.java @@ -13,7 +13,8 @@ */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Accounts_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Accounts_Update.json */ /** * Sample code: Accounts_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java index 180c06fe768bb..5171e2f2a690d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateSamples.java @@ -9,7 +9,8 @@ */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java index 16804c6d57d4c..48ac38ca3388c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java index f6c9c854688e4..8a4c4c55be46e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetSamples.java @@ -9,7 +9,8 @@ */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java index 5c743405e0a97..149f307de3a5a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java @@ -9,7 +9,8 @@ */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java index 79f6e38c231ca..e37f9cb76fd02 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesUpdateSamples.java @@ -11,7 +11,8 @@ */ public final class BackupPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupPolicies_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupPolicies_Update.json */ /** * Sample code: BackupPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java index ad2c5672cb306..13acb2f69fe12 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateSamples.java @@ -9,7 +9,8 @@ */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Create.json */ /** * Sample code: BackupVault_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java index b88c13b170e5a..adf048842a5ec 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Delete.json */ /** * Sample code: BackupVaults_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java index 9a3653997e838..aee44ecfe3b8d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetSamples.java @@ -9,7 +9,8 @@ */ public final class BackupVaultsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Get.json */ /** * Sample code: BackupVaults_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java index d933a984dc921..3ac26502be2cf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountSamples.java @@ -9,7 +9,8 @@ */ public final class BackupVaultsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_List.json */ /** * Sample code: BackupVaults_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java index bde95c4c2afd8..c54649ca21a0f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupVaultsUpdateSamples.java @@ -13,7 +13,8 @@ */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupVaults_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupVaults_Update.json */ /** * Sample code: BackupVaults_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java index 7b44253a72e23..5b96d75d9e019 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsCreateSamples.java @@ -9,7 +9,9 @@ */ public final class BackupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Create. + * json */ /** * Sample code: BackupsUnderBackupVault_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java index ffd232a0dc694..4d2bf5a5f941e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsDeleteSamples.java @@ -9,7 +9,9 @@ */ public final class BackupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Delete. + * json */ /** * Sample code: BackupsUnderBackupVault_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java index f1c997457b6a3..7fb8236978d5f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusSamples.java @@ -9,7 +9,8 @@ */ public final class BackupsGetLatestStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_LatestBackupStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestBackupStatus.json */ /** * Sample code: Volumes_BackupStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java index a770ece3f2498..c55d817f9ccad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetSamples.java @@ -9,7 +9,9 @@ */ public final class BackupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Get. + * json */ /** * Sample code: BackupsUnderBackupVault_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java index 6d8a35a2d525a..63cea0d3ff10f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusSamples.java @@ -9,7 +9,9 @@ */ public final class BackupsGetVolumeLatestRestoreStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_LatestRestoreStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_LatestRestoreStatus. + * json */ /** * Sample code: Volumes_RestoreStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java index 8bc41b2682604..216ce96ad0794 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java @@ -9,7 +9,9 @@ */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_List. + * json */ /** * Sample code: Backups_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java index 1d48ce1a10764..d7c1582476fcb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java @@ -11,7 +11,9 @@ */ public final class BackupsUnderAccountMigrateBackupsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderAccount_Migrate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderAccount_Migrate. + * json */ /** * Sample code: BackupsUnderAccount_Migrate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java index 68fcbee073581..f360dd0d156e8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderBackupVaultRestoreFilesSamples.java @@ -12,7 +12,8 @@ */ public final class BackupsUnderBackupVaultRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/ + * BackupsUnderBackupVault_SingleFileRestore.json */ /** * Sample code: Backups_SingleFileRestore. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java index d6fe5f836e365..c103f8e01281d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderVolumeMigrateBackupsSamples.java @@ -11,7 +11,8 @@ */ public final class BackupsUnderVolumeMigrateBackupsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderVolume_Migrate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderVolume_Migrate.json */ /** * Sample code: BackupsUnderVolume_Migrate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java index 4058c0a527279..1e20572c6f4d2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUpdateSamples.java @@ -11,7 +11,9 @@ */ public final class BackupsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/BackupsUnderBackupVault_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/BackupsUnderBackupVault_Update. + * json */ /** * Sample code: BackupsUnderBackupVault_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java index 964154f71dc47..7dab83bb57872 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java @@ -11,7 +11,8 @@ */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckFilePathAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java index 571c380338ef7..01b1b0c7af2f4 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java @@ -12,7 +12,8 @@ */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckNameAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java index 8f7b5dbaf7467..8a6564bb82209 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckQuotaAvailabilitySamples.java @@ -12,7 +12,8 @@ */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/CheckQuotaAvailability.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java index a30ef2646db25..9f87d816482d0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryNetworkSiblingSetSamples.java @@ -11,7 +11,8 @@ */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/NetworkSiblingSet_Query.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java index 994f8f1091674..54083e702fe89 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java @@ -9,7 +9,8 @@ */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfo.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfo.json */ /** * Sample code: RegionInfo_Query. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java index ca848eb237d6c..89089ef195a37 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetSamples.java @@ -9,7 +9,8 @@ */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/QuotaLimits_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_Get.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java index 80ce5179ef2bd..d12e08ab7df6b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListSamples.java @@ -9,7 +9,8 @@ */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/QuotaLimits_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/QuotaLimits_List.json */ /** * Sample code: QuotaLimits. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java index fbcbeb0a3a33b..9a28d16cabe5d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetSamples.java @@ -9,7 +9,8 @@ */ public final class NetAppResourceRegionInfosGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfos_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_Get.json */ /** * Sample code: RegionInfos_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java index bbf040fab7309..8a86185101b3b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListSamples.java @@ -9,7 +9,8 @@ */ public final class NetAppResourceRegionInfosListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/RegionInfos_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/RegionInfos_List.json */ /** * Sample code: RegionInfos_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java index a74ebfa7c4183..03340ea982c0f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUpdateNetworkSiblingSetSamples.java @@ -12,7 +12,8 @@ */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/NetworkSiblingSet_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java index bcf18a2ede01a..816e18a3a4db5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/OperationsListSamples.java @@ -9,7 +9,8 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/OperationList.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/OperationList.json */ /** * Sample code: OperationList. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java index 02570322a3bbf..de64a6f5e6ab3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateSamples.java @@ -12,7 +12,8 @@ */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java index 15a337d29cfae..31cc4e2e198b0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java index e7f2e630a9c6b..c77feb9cf9b28 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsGetSamples.java @@ -9,7 +9,8 @@ */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Get.json */ /** * Sample code: Pools_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java index 04083efc085b3..37b1ce4982732 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsListSamples.java @@ -9,7 +9,8 @@ */ public final class PoolsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_List.json */ /** * Sample code: Pools_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java index 6196aaa926dae..6ed43b1971db6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/PoolsUpdateSamples.java @@ -11,7 +11,8 @@ */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Pools_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Pools_Update.json */ /** * Sample code: Pools_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java index a85311988c291..45087ca8672a6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateSamples.java @@ -14,7 +14,8 @@ */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java index b9916f4c2ccdc..fed349dc445c8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java index 3108e984a0496..fde015420867d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetSamples.java @@ -9,7 +9,8 @@ */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java index feb798f429974..0d974bf1d9da9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListSamples.java @@ -9,7 +9,8 @@ */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java index fc910922d4682..a5399bec458ed 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListVolumesSamples.java @@ -9,7 +9,9 @@ */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_ListVolumes. + * json */ /** * Sample code: SnapshotPolicies_ListVolumes. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java index bc8143fc708b4..05a8a0f68038c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesUpdateSamples.java @@ -15,7 +15,8 @@ */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/SnapshotPolicies_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java index a3c5d06530640..3e469a686350a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsCreateSamples.java @@ -9,7 +9,8 @@ */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java index a71f0fdb9a429..e9e170583d536 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java index d79cbd453b2f2..9f000eddf9bd9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetSamples.java @@ -9,7 +9,8 @@ */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java index 8be4296302117..cdab659e8d5ae 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsListSamples.java @@ -9,7 +9,8 @@ */ public final class SnapshotsListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_List.json */ /** * Sample code: Snapshots_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java index 9deaeeb5158af..236dc4528b626 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesSamples.java @@ -12,7 +12,9 @@ */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_SingleFileRestore.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_SingleFileRestore. + * json */ /** * Sample code: Snapshots_SingleFileRestore. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java index c396cc4f92090..776fdaf8397e9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateSamples.java @@ -13,7 +13,8 @@ */ public final class SnapshotsUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Snapshots_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Snapshots_Update.json */ /** * Sample code: Snapshots_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java index 7bdfc0093643e..3dacd48ec1cb5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateSamples.java @@ -9,7 +9,8 @@ */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java index a4245fa425b0f..4d09e13dcdf57 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java index 0fa97a6b73809..fea902bdc7721 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataSamples.java @@ -9,7 +9,8 @@ */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Metadata.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java index 6cbeaa3630868..b5b82447842be 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetSamples.java @@ -9,7 +9,8 @@ */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java index 8d2ee5217cdcc..2b53f5ad6bd71 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeSamples.java @@ -9,7 +9,8 @@ */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java index 13fbc6a69d875..e832a2d6a7ef2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/SubvolumesUpdateSamples.java @@ -11,7 +11,8 @@ */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Subvolumes_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java index 6511e245fd3f2..beb9a28372cf8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java @@ -17,7 +17,9 @@ */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Create_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_SapHana. + * json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -177,7 +179,8 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Create_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java index e40b37e9c3f41..a3a98de04c6ed 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java index 551bcaa271d91..73c928bf7baeb 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsGetSamples.java @@ -9,7 +9,8 @@ */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Get_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -21,7 +22,8 @@ public static void volumeGroupsGetSapHana(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_Get_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java index 1c24c115b693c..5db963e939ffc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsListByNetAppAccountSamples.java @@ -9,7 +9,8 @@ */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_List_Oracle.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -21,7 +22,8 @@ public static void volumeGroupsListOracle(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeGroups_List_SapHana.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java index d7cd7568084dd..30f879e5c958e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateSamples.java @@ -11,7 +11,8 @@ */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Create.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java index 8fe63b306ddd5..b000b57ad430e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java index ba0ef0b986f1d..1cb2ca72ab28a 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetSamples.java @@ -9,7 +9,8 @@ */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java index 7004442ba9125..7bfbf54bab744 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeSamples.java @@ -9,7 +9,8 @@ */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java index 033c83673a7ad..59d23fa104fad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesUpdateSamples.java @@ -11,7 +11,8 @@ */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/VolumeQuotaRules_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java index 91afda855cd86..de25505bd1116 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationSamples.java @@ -11,7 +11,9 @@ */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_AuthorizeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_AuthorizeReplication. + * json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java index 2a08301723ade..67409361cb3f8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_BreakFileLocks.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java index f1f1d6adc198f..0dff661d3fa44 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_BreakReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java index df5f8ec1d653e..5714007f9d882 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_CreateOrUpdate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java index c65754dab7ef2..c71ab8657a8b2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_DeleteReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java index add34a777247a..a56025dd65bd9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Delete.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java index 34dcba1df6bd0..1501c5dc10a39 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_FinalizeRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java index 66f8b932b5999..ae8337f7020a0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesGetSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Get.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Get.json */ /** * Sample code: Volumes_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java index a66bcd08c693a..03a6a8759fec0 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/GroupIdListForLDAPUser.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java index 0a2d30876e9d9..740ca2b716634 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ListReplications.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java index d27991197dd7b..289148db33a95 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesListSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_List.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_List.json */ /** * Sample code: Volumes_List. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java index c4efff9894187..dd5062f8ad529 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_PoolChange.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java index 20bdbcc40d9ae..73c5fbbb66dfc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/ + * Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java index 1a9a58b9a0ddf..82096ec53ea87 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationSamples.java @@ -9,7 +9,9 @@ */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReInitializeReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReInitializeReplication + * .json */ /** * Sample code: Volumes_ReInitializeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java index b5837be53e532..8d7350bd47fad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReestablishReplicationSamples.java @@ -11,7 +11,9 @@ */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReestablishReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReestablishReplication. + * json */ /** * Sample code: Volumes_ReestablishReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java index 1a2850c34e487..b5a55b549448f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRelocateSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Relocate.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java index 0af1dadc90fd5..734c5336c490d 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ReplicationStatus.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java index cb5ddf6474027..1a8e7d0431b36 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResetCifsPasswordSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ResetCifsPassword.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java index 5a75e68b55d20..f883eb14d7a03 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_ResyncReplication.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java index ee6f5953fd62a..44c4870fd5756 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationSamples.java @@ -9,7 +9,8 @@ */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_RevertRelocation.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java index 1eef96c05f645..29d74a1c1fa84 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesRevertSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesRevertSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Revert.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java index 9166eef7c5933..15a457b0dbd48 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java @@ -11,7 +11,8 @@ */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: specification/netapp/resource-manager/Microsoft.NetApp/stable/2023-11-01/examples/Volumes_Update.json + * x-ms-original-file: + * specification/netapp/resource-manager/Microsoft.NetApp/stable/2024-03-01/examples/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java deleted file mode 100644 index 06fe3baf55c05..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AccountsRenewCredentialsMockTests { - @Test - public void testRenewCredentials() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.accounts().renewCredentials("qlkzme", "nitgvkxlz", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java deleted file mode 100644 index 93a7b7dc18cd3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizeRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizeRequest model - = BinaryData.fromString("{\"remoteVolumeResourceId\":\"ciuqgbdb\"}").toObject(AuthorizeRequest.class); - Assertions.assertEquals("ciuqgbdb", model.remoteVolumeResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("ciuqgbdb"); - model = BinaryData.fromObject(model).toObject(AuthorizeRequest.class); - Assertions.assertEquals("ciuqgbdb", model.remoteVolumeResourceId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupInnerTests.java deleted file mode 100644 index aee7620e4e7ac..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupInnerTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import org.junit.jupiter.api.Assertions; - -public final class BackupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupInner model = BinaryData.fromString( - "{\"properties\":{\"backupId\":\"lqol\",\"creationDate\":\"2021-01-28T22:40:19Z\",\"provisioningState\":\"gxxlxsffgcvizq\",\"size\":2211068744764574352,\"label\":\"w\",\"backupType\":\"Manual\",\"failureReason\":\"pfgfbkjub\",\"volumeResourceId\":\"yhgk\",\"useExistingSnapshot\":false,\"snapshotName\":\"sgow\",\"backupPolicyResourceId\":\"ttsttktlahbqact\"},\"id\":\"gzukxitmm\",\"name\":\"tg\",\"type\":\"qqxhrnxrxcpj\"}") - .toObject(BackupInner.class); - Assertions.assertEquals("w", model.label()); - Assertions.assertEquals("yhgk", model.volumeResourceId()); - Assertions.assertEquals(false, model.useExistingSnapshot()); - Assertions.assertEquals("sgow", model.snapshotName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupInner model = new BackupInner().withLabel("w") - .withVolumeResourceId("yhgk") - .withUseExistingSnapshot(false) - .withSnapshotName("sgow"); - model = BinaryData.fromObject(model).toObject(BackupInner.class); - Assertions.assertEquals("w", model.label()); - Assertions.assertEquals("yhgk", model.volumeResourceId()); - Assertions.assertEquals(false, model.useExistingSnapshot()); - Assertions.assertEquals("sgow", model.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchPropertiesTests.java deleted file mode 100644 index a9a4c3fb5696e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class BackupPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPatchProperties model - = BinaryData.fromString("{\"label\":\"hjxa\"}").toObject(BackupPatchProperties.class); - Assertions.assertEquals("hjxa", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPatchProperties model = new BackupPatchProperties().withLabel("hjxa"); - model = BinaryData.fromObject(model).toObject(BackupPatchProperties.class); - Assertions.assertEquals("hjxa", model.label()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchTests.java deleted file mode 100644 index 206b343c343fa..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPatchTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupPatch; -import org.junit.jupiter.api.Assertions; - -public final class BackupPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPatch model - = BinaryData.fromString("{\"properties\":{\"label\":\"orbteoy\"}}").toObject(BackupPatch.class); - Assertions.assertEquals("orbteoy", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPatch model = new BackupPatch().withLabel("orbteoy"); - model = BinaryData.fromObject(model).toObject(BackupPatch.class); - Assertions.assertEquals("orbteoy", model.label()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java deleted file mode 100644 index dc7ec042f092d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesCreateMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"etag\":\"qw\",\"properties\":{\"backupPolicyId\":\"d\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":999177682,\"weeklyBackupsToKeep\":1674371037,\"monthlyBackupsToKeep\":703161426,\"volumesAssigned\":1221271560,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"gwgcl\",\"volumeResourceId\":\"oebqinjipn\",\"backupsCount\":296049099,\"policyEnabled\":true}]},\"location\":\"lafcbahh\",\"tags\":{\"w\":\"ofoiy\",\"ndviauogphuartvt\":\"filkmkkholv\"},\"id\":\"ukyefchnmnahmnxh\",\"name\":\"xjqirwrweoox\",\"type\":\"fifhxwrsnew\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupPolicy response = manager.backupPolicies() - .define("jfrnxousxauzlwv") - .withRegion("xmcuqud") - .withExistingNetAppAccount("qcbfrmbodths", "qgvriibakcla") - .withTags(mapOf("dkvgfabuiyjibuzp", "clxyn")) - .withDailyBackupsToKeep(1994434352) - .withWeeklyBackupsToKeep(468470130) - .withMonthlyBackupsToKeep(1587731345) - .withEnabled(false) - .create(); - - Assertions.assertEquals("lafcbahh", response.location()); - Assertions.assertEquals("ofoiy", response.tags().get("w")); - Assertions.assertEquals(999177682, response.dailyBackupsToKeep()); - Assertions.assertEquals(1674371037, response.weeklyBackupsToKeep()); - Assertions.assertEquals(703161426, response.monthlyBackupsToKeep()); - Assertions.assertEquals(true, response.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java deleted file mode 100644 index 75ef19eee0517..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.backupPolicies().delete("wiwtglxxhl", "fpgpicrmnzhrgm", "gjsxv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 9eac615068d79..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"etag\":\"tqjtwhauu\",\"properties\":{\"backupPolicyId\":\"prnjletlxsmr\",\"provisioningState\":\"do\",\"dailyBackupsToKeep\":453207888,\"weeklyBackupsToKeep\":2066157212,\"monthlyBackupsToKeep\":1329774917,\"volumesAssigned\":244946884,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"lqwzdvpiwhxqsz\",\"volumeResourceId\":\"maajquhuxylr\",\"backupsCount\":150383679,\"policyEnabled\":true},{\"volumeName\":\"jbmzyospspsh\",\"volumeResourceId\":\"fkyjpmspbpssdfpp\",\"backupsCount\":386298045,\"policyEnabled\":false},{\"volumeName\":\"yujtvczkcnyx\",\"volumeResourceId\":\"munjdxvglnkvx\",\"backupsCount\":460711183,\"policyEnabled\":true},{\"volumeName\":\"qivbgkcvkh\",\"volumeResourceId\":\"vuqd\",\"backupsCount\":2123906847,\"policyEnabled\":true}]},\"location\":\"yp\",\"tags\":{\"knidib\":\"bcpzgpxtivh\",\"kqmhhaowjr\":\"qjxgpnrhgovfgp\",\"kfvxcnq\":\"zvuporqzdfuydz\"},\"id\":\"xqpswok\",\"name\":\"vkhlggdhbemz\",\"type\":\"kzsz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupPolicy response = manager.backupPolicies() - .getWithResponse("mfcttux", "uyilflqoiquvrehm", "njhvsujztc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("yp", response.location()); - Assertions.assertEquals("bcpzgpxtivh", response.tags().get("knidib")); - Assertions.assertEquals(453207888, response.dailyBackupsToKeep()); - Assertions.assertEquals(2066157212, response.weeklyBackupsToKeep()); - Assertions.assertEquals(1329774917, response.monthlyBackupsToKeep()); - Assertions.assertEquals(false, response.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java deleted file mode 100644 index 8ceeb79249d8e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupPoliciesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"syrq\",\"properties\":{\"backupPolicyId\":\"jqhden\",\"provisioningState\":\"ulkpakd\",\"dailyBackupsToKeep\":466096532,\"weeklyBackupsToKeep\":2145222324,\"monthlyBackupsToKeep\":211340974,\"volumesAssigned\":641557673,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"xuckpggqoweyir\",\"volumeResourceId\":\"lisn\",\"backupsCount\":351115849,\"policyEnabled\":true},{\"volumeName\":\"mpizru\",\"volumeResourceId\":\"pqxpx\",\"backupsCount\":1760888733,\"policyEnabled\":false},{\"volumeName\":\"jsa\",\"volumeResourceId\":\"iixtmkzj\",\"backupsCount\":671429821,\"policyEnabled\":true},{\"volumeName\":\"hgfgrwsd\",\"volumeResourceId\":\"ra\",\"backupsCount\":202714227,\"policyEnabled\":true}]},\"location\":\"lbyvictctbrxkjzw\",\"tags\":{\"hkwfbkgozxwop\":\"ffm\"},\"id\":\"bydpizqaclnapxb\",\"name\":\"yg\",\"type\":\"ugjknf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.backupPolicies().list("nlb", "jkwrusnkq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lbyvictctbrxkjzw", response.iterator().next().location()); - Assertions.assertEquals("ffm", response.iterator().next().tags().get("hkwfbkgozxwop")); - Assertions.assertEquals(466096532, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(2145222324, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(211340974, response.iterator().next().monthlyBackupsToKeep()); - Assertions.assertEquals(true, response.iterator().next().enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java deleted file mode 100644 index 1c690d5ab54fe..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import com.azure.resourcemanager.netapp.models.BackupPoliciesList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupPoliciesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"ozbhdmsmlmzq\",\"properties\":{\"backupPolicyId\":\"ft\",\"provisioningState\":\"ae\",\"dailyBackupsToKeep\":2084931512,\"weeklyBackupsToKeep\":674060065,\"monthlyBackupsToKeep\":1894418598,\"volumesAssigned\":997534180,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"z\",\"volumeResourceId\":\"yylhalnswhccsp\",\"backupsCount\":896458989,\"policyEnabled\":true},{\"volumeName\":\"itqscywuggwoluhc\",\"volumeResourceId\":\"wem\",\"backupsCount\":19957652,\"policyEnabled\":false},{\"volumeName\":\"rgzdwmsweyp\",\"volumeResourceId\":\"dxggicccnxqhuexm\",\"backupsCount\":735026566,\"policyEnabled\":true}]},\"location\":\"vlz\",\"tags\":{\"sdtclusiypbs\":\"mhzrn\",\"ygqukyhejh\":\"gytguslfead\",\"lolp\":\"isxgfp\"},\"id\":\"vk\",\"name\":\"r\",\"type\":\"qvujzraehtwdwrf\"},{\"etag\":\"wib\",\"properties\":{\"backupPolicyId\":\"cdl\",\"provisioningState\":\"shfwpracstwity\",\"dailyBackupsToKeep\":56359046,\"weeklyBackupsToKeep\":1356416379,\"monthlyBackupsToKeep\":87341209,\"volumesAssigned\":685537305,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"yodnwzxltj\",\"volumeResourceId\":\"nhltiugcxn\",\"backupsCount\":1032415559,\"policyEnabled\":false}]},\"location\":\"ibyqunyowxwlmdj\",\"tags\":{\"acizsjqlhkrr\":\"fgbvfvpdbo\",\"hvxndzwmkrefajpj\":\"bdeibqipqk\",\"yhgbijtjivfx\":\"rwkq\",\"stawfsdjpvkv\":\"sjabibs\"},\"id\":\"bjxbkzbzk\",\"name\":\"vncjabudurgk\",\"type\":\"kmokz\"},{\"etag\":\"jk\",\"properties\":{\"backupPolicyId\":\"fhmouwq\",\"provisioningState\":\"zrfze\",\"dailyBackupsToKeep\":515977461,\"weeklyBackupsToKeep\":32622439,\"monthlyBackupsToKeep\":1758326934,\"volumesAssigned\":782637696,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"bjbsybb\",\"volumeResourceId\":\"r\",\"backupsCount\":948234782,\"policyEnabled\":false},{\"volumeName\":\"fp\",\"volumeResourceId\":\"mpipaslthaqfxs\",\"backupsCount\":35596652,\"policyEnabled\":true},{\"volumeName\":\"bdsrez\",\"volumeResourceId\":\"rhneuyowq\",\"backupsCount\":638872994,\"policyEnabled\":false},{\"volumeName\":\"sibircgpi\",\"volumeResourceId\":\"zimejzanlfzx\",\"backupsCount\":1937691964,\"policyEnabled\":true}]},\"location\":\"zonokixrjqci\",\"tags\":{\"nwoiind\":\"pfrlazsz\",\"ylwbtlhflsjcdhsz\":\"pwp\"},\"id\":\"jvfbgofelja\",\"name\":\"rqmq\",\"type\":\"ldvriiiojnalghfk\"}]}") - .toObject(BackupPoliciesList.class); - Assertions.assertEquals("vlz", model.value().get(0).location()); - Assertions.assertEquals("mhzrn", model.value().get(0).tags().get("sdtclusiypbs")); - Assertions.assertEquals(2084931512, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(674060065, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(1894418598, model.value().get(0).monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.value().get(0).enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPoliciesList model = new BackupPoliciesList().withValue(Arrays.asList( - new BackupPolicyInner().withLocation("vlz") - .withTags(mapOf("sdtclusiypbs", "mhzrn", "ygqukyhejh", "gytguslfead", "lolp", "isxgfp")) - .withDailyBackupsToKeep(2084931512) - .withWeeklyBackupsToKeep(674060065) - .withMonthlyBackupsToKeep(1894418598) - .withEnabled(true), - new BackupPolicyInner().withLocation("ibyqunyowxwlmdj") - .withTags(mapOf("acizsjqlhkrr", "fgbvfvpdbo", "hvxndzwmkrefajpj", "bdeibqipqk", "yhgbijtjivfx", "rwkq", - "stawfsdjpvkv", "sjabibs")) - .withDailyBackupsToKeep(56359046) - .withWeeklyBackupsToKeep(1356416379) - .withMonthlyBackupsToKeep(87341209) - .withEnabled(true), - new BackupPolicyInner().withLocation("zonokixrjqci") - .withTags(mapOf("nwoiind", "pfrlazsz", "ylwbtlhflsjcdhsz", "pwp")) - .withDailyBackupsToKeep(515977461) - .withWeeklyBackupsToKeep(32622439) - .withMonthlyBackupsToKeep(1758326934) - .withEnabled(true))); - model = BinaryData.fromObject(model).toObject(BackupPoliciesList.class); - Assertions.assertEquals("vlz", model.value().get(0).location()); - Assertions.assertEquals("mhzrn", model.value().get(0).tags().get("sdtclusiypbs")); - Assertions.assertEquals(2084931512, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(674060065, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(1894418598, model.value().get(0).monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.value().get(0).enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java deleted file mode 100644 index 08ecd9ddd2288..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPolicyInner model = BinaryData.fromString( - "{\"etag\":\"vsexsowuelu\",\"properties\":{\"backupPolicyId\":\"hahhxvrhmzkwpj\",\"provisioningState\":\"wspughftqsxhqx\",\"dailyBackupsToKeep\":318834407,\"weeklyBackupsToKeep\":649615996,\"monthlyBackupsToKeep\":1485711526,\"volumesAssigned\":2084244471,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"uufzdmsyqtfihw\",\"volumeResourceId\":\"otzi\",\"backupsCount\":1709728841,\"policyEnabled\":false},{\"volumeName\":\"phoszqz\",\"volumeResourceId\":\"phqamvdkfwynwcvt\",\"backupsCount\":840054115,\"policyEnabled\":true}]},\"location\":\"mtnvyq\",\"tags\":{\"cjaesgvvs\":\"kzwpcnpw\",\"wygzlvdnkfxusem\":\"cyajguqf\",\"pfcqdp\":\"wzrmuh\"},\"id\":\"qxqvpsvuoymgc\",\"name\":\"elvezrypq\",\"type\":\"mfe\"}") - .toObject(BackupPolicyInner.class); - Assertions.assertEquals("mtnvyq", model.location()); - Assertions.assertEquals("kzwpcnpw", model.tags().get("cjaesgvvs")); - Assertions.assertEquals(318834407, model.dailyBackupsToKeep()); - Assertions.assertEquals(649615996, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1485711526, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPolicyInner model = new BackupPolicyInner().withLocation("mtnvyq") - .withTags(mapOf("cjaesgvvs", "kzwpcnpw", "wygzlvdnkfxusem", "cyajguqf", "pfcqdp", "wzrmuh")) - .withDailyBackupsToKeep(318834407) - .withWeeklyBackupsToKeep(649615996) - .withMonthlyBackupsToKeep(1485711526) - .withEnabled(true); - model = BinaryData.fromObject(model).toObject(BackupPolicyInner.class); - Assertions.assertEquals("mtnvyq", model.location()); - Assertions.assertEquals("kzwpcnpw", model.tags().get("cjaesgvvs")); - Assertions.assertEquals(318834407, model.dailyBackupsToKeep()); - Assertions.assertEquals(649615996, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1485711526, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java deleted file mode 100644 index ca0ef78a8716c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPatchTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupPolicyPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupPolicyPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPolicyPatch model = BinaryData.fromString( - "{\"properties\":{\"backupPolicyId\":\"gvjayvblmh\",\"provisioningState\":\"zuhbxvvyhgsopb\",\"dailyBackupsToKeep\":1164866415,\"weeklyBackupsToKeep\":338245093,\"monthlyBackupsToKeep\":175567556,\"volumesAssigned\":2128318759,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"nhlmctlpdng\",\"volumeResourceId\":\"vgbmhr\",\"backupsCount\":283160638,\"policyEnabled\":true}]},\"location\":\"yijejvegrhbpnaix\",\"tags\":{\"rvqahqkghtpwi\":\"cbdreaxhcexd\",\"ycxzbfvoo\":\"nhyjsv\"},\"id\":\"vrvmtgjqppyost\",\"name\":\"on\",\"type\":\"myhgfipnsxkmc\"}") - .toObject(BackupPolicyPatch.class); - Assertions.assertEquals("yijejvegrhbpnaix", model.location()); - Assertions.assertEquals("cbdreaxhcexd", model.tags().get("rvqahqkghtpwi")); - Assertions.assertEquals(1164866415, model.dailyBackupsToKeep()); - Assertions.assertEquals(338245093, model.weeklyBackupsToKeep()); - Assertions.assertEquals(175567556, model.monthlyBackupsToKeep()); - Assertions.assertEquals(false, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPolicyPatch model = new BackupPolicyPatch().withLocation("yijejvegrhbpnaix") - .withTags(mapOf("rvqahqkghtpwi", "cbdreaxhcexd", "ycxzbfvoo", "nhyjsv")) - .withDailyBackupsToKeep(1164866415) - .withWeeklyBackupsToKeep(338245093) - .withMonthlyBackupsToKeep(175567556) - .withEnabled(false); - model = BinaryData.fromObject(model).toObject(BackupPolicyPatch.class); - Assertions.assertEquals("yijejvegrhbpnaix", model.location()); - Assertions.assertEquals("cbdreaxhcexd", model.tags().get("rvqahqkghtpwi")); - Assertions.assertEquals(1164866415, model.dailyBackupsToKeep()); - Assertions.assertEquals(338245093, model.weeklyBackupsToKeep()); - Assertions.assertEquals(175567556, model.monthlyBackupsToKeep()); - Assertions.assertEquals(false, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java deleted file mode 100644 index d0d135962067c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties; -import org.junit.jupiter.api.Assertions; - -public final class BackupPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupPolicyProperties model = BinaryData.fromString( - "{\"backupPolicyId\":\"erqwkyhkobopg\",\"provisioningState\":\"dkow\",\"dailyBackupsToKeep\":818081451,\"weeklyBackupsToKeep\":313036289,\"monthlyBackupsToKeep\":2049440725,\"volumesAssigned\":1318988279,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"njv\",\"volumeResourceId\":\"wxlp\",\"backupsCount\":1000927704,\"policyEnabled\":false},{\"volumeName\":\"khtj\",\"volumeResourceId\":\"i\",\"backupsCount\":2104302004,\"policyEnabled\":true},{\"volumeName\":\"tmtdhtmdvypgik\",\"volumeResourceId\":\"szywkbirryu\",\"backupsCount\":421118351,\"policyEnabled\":false},{\"volumeName\":\"oqrvqqaatjin\",\"volumeResourceId\":\"goupmfiibfg\",\"backupsCount\":2107533163,\"policyEnabled\":false}]}") - .toObject(BackupPolicyProperties.class); - Assertions.assertEquals(818081451, model.dailyBackupsToKeep()); - Assertions.assertEquals(313036289, model.weeklyBackupsToKeep()); - Assertions.assertEquals(2049440725, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(818081451) - .withWeeklyBackupsToKeep(313036289) - .withMonthlyBackupsToKeep(2049440725) - .withEnabled(true); - model = BinaryData.fromObject(model).toObject(BackupPolicyProperties.class); - Assertions.assertEquals(818081451, model.dailyBackupsToKeep()); - Assertions.assertEquals(313036289, model.weeklyBackupsToKeep()); - Assertions.assertEquals(2049440725, model.monthlyBackupsToKeep()); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPropertiesTests.java deleted file mode 100644 index b0a3fd2e34078..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupProperties; -import org.junit.jupiter.api.Assertions; - -public final class BackupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupProperties model = BinaryData.fromString( - "{\"backupId\":\"savokqdzf\",\"creationDate\":\"2021-11-24T02:59:44Z\",\"provisioningState\":\"vjlfrqtt\",\"size\":915528800737751942,\"label\":\"atnwxyiopi\",\"backupType\":\"Manual\",\"failureReason\":\"fku\",\"volumeResourceId\":\"s\",\"useExistingSnapshot\":true,\"snapshotName\":\"mligov\",\"backupPolicyResourceId\":\"rxkpmloazuruoc\"}") - .toObject(BackupProperties.class); - Assertions.assertEquals("atnwxyiopi", model.label()); - Assertions.assertEquals("s", model.volumeResourceId()); - Assertions.assertEquals(true, model.useExistingSnapshot()); - Assertions.assertEquals("mligov", model.snapshotName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupProperties model = new BackupProperties().withLabel("atnwxyiopi") - .withVolumeResourceId("s") - .withUseExistingSnapshot(true) - .withSnapshotName("mligov"); - model = BinaryData.fromObject(model).toObject(BackupProperties.class); - Assertions.assertEquals("atnwxyiopi", model.label()); - Assertions.assertEquals("s", model.volumeResourceId()); - Assertions.assertEquals(true, model.useExistingSnapshot()); - Assertions.assertEquals("mligov", model.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java deleted file mode 100644 index 4621e19cda80f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupRestoreFilesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BackupRestoreFilesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupRestoreFiles model = BinaryData.fromString( - "{\"fileList\":[\"eewchpxlktw\",\"uziycsl\",\"vu\"],\"restoreFilePath\":\"ztcktyh\",\"destinationVolumeId\":\"tqedcgzulwm\"}") - .toObject(BackupRestoreFiles.class); - Assertions.assertEquals("eewchpxlktw", model.fileList().get(0)); - Assertions.assertEquals("ztcktyh", model.restoreFilePath()); - Assertions.assertEquals("tqedcgzulwm", model.destinationVolumeId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupRestoreFiles model = new BackupRestoreFiles().withFileList(Arrays.asList("eewchpxlktw", "uziycsl", "vu")) - .withRestoreFilePath("ztcktyh") - .withDestinationVolumeId("tqedcgzulwm"); - model = BinaryData.fromObject(model).toObject(BackupRestoreFiles.class); - Assertions.assertEquals("eewchpxlktw", model.fileList().get(0)); - Assertions.assertEquals("ztcktyh", model.restoreFilePath()); - Assertions.assertEquals("tqedcgzulwm", model.destinationVolumeId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupStatusInnerTests.java deleted file mode 100644 index 9f9ca495c0e24..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupStatusInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner; - -public final class BackupStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupStatusInner model = BinaryData.fromString( - "{\"healthy\":false,\"relationshipStatus\":\"Unknown\",\"mirrorState\":\"Uninitialized\",\"unhealthyReason\":\"gzslesjcbhernnti\",\"errorMessage\":\"djc\",\"lastTransferSize\":1220945276828738413,\"lastTransferType\":\"rbe\",\"totalTransferBytes\":8622823251017389633,\"transferProgressBytes\":226230104431146502}") - .toObject(BackupStatusInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupStatusInner model = new BackupStatusInner(); - model = BinaryData.fromObject(model).toObject(BackupStatusInner.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java deleted file mode 100644 index 348a13f5692db..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultInnerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"jvlpjxxkzbr\"},\"location\":\"geivsiykzkdncj\",\"tags\":{\"apzwyrpgog\":\"nbzoggcu\",\"yjt\":\"qxepnylbfuaj\",\"byfmowuxr\":\"vofqzhvfc\",\"xfzwi\":\"jpvd\"},\"id\":\"vwzjbhyz\",\"name\":\"xjrk\",\"type\":\"mbtrnegvmnvu\"}") - .toObject(BackupVaultInner.class); - Assertions.assertEquals("geivsiykzkdncj", model.location()); - Assertions.assertEquals("nbzoggcu", model.tags().get("apzwyrpgog")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultInner model = new BackupVaultInner().withLocation("geivsiykzkdncj") - .withTags( - mapOf("apzwyrpgog", "nbzoggcu", "yjt", "qxepnylbfuaj", "byfmowuxr", "vofqzhvfc", "xfzwi", "jpvd")); - model = BinaryData.fromObject(model).toObject(BackupVaultInner.class); - Assertions.assertEquals("geivsiykzkdncj", model.location()); - Assertions.assertEquals("nbzoggcu", model.tags().get("apzwyrpgog")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java deleted file mode 100644 index 7af4d09934cf0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPatchTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupVaultPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultPatch model - = BinaryData.fromString("{\"tags\":{\"rriloz\":\"vestmjl\"}}").toObject(BackupVaultPatch.class); - Assertions.assertEquals("vestmjl", model.tags().get("rriloz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultPatch model = new BackupVaultPatch().withTags(mapOf("rriloz", "vestmjl")); - model = BinaryData.fromObject(model).toObject(BackupVaultPatch.class); - Assertions.assertEquals("vestmjl", model.tags().get("rriloz")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java deleted file mode 100644 index 10de68c5dad9b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties; - -public final class BackupVaultPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultProperties model - = BinaryData.fromString("{\"provisioningState\":\"qvldspastjbkkd\"}").toObject(BackupVaultProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultProperties model = new BackupVaultProperties(); - model = BinaryData.fromObject(model).toObject(BackupVaultProperties.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java deleted file mode 100644 index 9bed2b9f06a80..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupVaultsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"uihywart\",\"tags\":{\"emmucfxh\":\"hkixkykxdssj\",\"s\":\"kkflrmymyincqlhr\",\"iiiovgqcgxuugq\":\"sl\",\"e\":\"ctotiowlx\"},\"id\":\"dptjgwdtgukranb\",\"name\":\"wphqlkccuzgygqw\",\"type\":\"hoi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupVault response = manager.backupVaults() - .define("blycsxzujksr") - .withRegion("bidyv") - .withExistingNetAppAccount("ywaeeczgf", "ukklelss") - .withTags(mapOf("paxwkufyk", "wxvgpiudeugfsxze")) - .create(); - - Assertions.assertEquals("uihywart", response.location()); - Assertions.assertEquals("hkixkykxdssj", response.tags().get("emmucfxh")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java deleted file mode 100644 index 12b59791954a6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupVaultsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"sqowxwc\"},\"location\":\"likytwvczcswka\",\"tags\":{\"b\":\"jyfdvlv\",\"th\":\"rnfxtgddp\",\"naoyank\":\"hn\",\"swankltytmh\":\"oe\"},\"id\":\"roznnhdrlktgj\",\"name\":\"sggux\",\"type\":\"eml\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupVault response = manager.backupVaults() - .getWithResponse("o", "gkkumuikjcj", "aztb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("likytwvczcswka", response.location()); - Assertions.assertEquals("jyfdvlv", response.tags().get("b")); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java deleted file mode 100644 index cdcc7e9cf2183..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListByNetAppAccountMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupVaultsListByNetAppAccountMockTests { - @Test - public void testListByNetAppAccount() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"jqo\"},\"location\":\"pihehce\",\"tags\":{\"kfrexcrseqwjks\":\"mrqbrjbbmpxdlv\",\"zhxogjggsvo\":\"hud\",\"hrkmdyomkxfbvfbh\":\"jkxibda\"},\"id\":\"y\",\"name\":\"rhpw\",\"type\":\"gddeimaw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.backupVaults().listByNetAppAccount("qejo", "ovyrrleaesinu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pihehce", response.iterator().next().location()); - Assertions.assertEquals("mrqbrjbbmpxdlv", response.iterator().next().tags().get("kfrexcrseqwjks")); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java deleted file mode 100644 index 3fd858ed5bdf3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupVaultsListTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner; -import com.azure.resourcemanager.netapp.models.BackupVaultsList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BackupVaultsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupVaultsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"slordilmyww\"},\"location\":\"gkxnyedabg\",\"tags\":{\"ewbcihxuuw\":\"dtj\",\"yxccyb\":\"c\",\"px\":\"payakkud\"},\"id\":\"wjplma\",\"name\":\"stcyohpfkyrkdbd\",\"type\":\"iogsjkmnwq\"},{\"properties\":{\"provisioningState\":\"baiyhddviaceg\"},\"location\":\"m\",\"tags\":{\"alxlllchp\":\"pmvmemfnczdwvv\",\"evwrdnhfuk\":\"db\",\"fcvlerch\":\"vsjcswsmystuluqy\"},\"id\":\"qbmfpjbabwidf\",\"name\":\"xsspuunnoxyhk\",\"type\":\"g\"}],\"nextLink\":\"drihpfhoqcaaewda\"}") - .toObject(BackupVaultsList.class); - Assertions.assertEquals("gkxnyedabg", model.value().get(0).location()); - Assertions.assertEquals("dtj", model.value().get(0).tags().get("ewbcihxuuw")); - Assertions.assertEquals("drihpfhoqcaaewda", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupVaultsList model = new BackupVaultsList().withValue(Arrays.asList( - new BackupVaultInner().withLocation("gkxnyedabg") - .withTags(mapOf("ewbcihxuuw", "dtj", "yxccyb", "c", "px", "payakkud")), - new BackupVaultInner().withLocation("m") - .withTags(mapOf("alxlllchp", "pmvmemfnczdwvv", "evwrdnhfuk", "db", "fcvlerch", "vsjcswsmystuluqy")))) - .withNextLink("drihpfhoqcaaewda"); - model = BinaryData.fromObject(model).toObject(BackupVaultsList.class); - Assertions.assertEquals("gkxnyedabg", model.value().get(0).location()); - Assertions.assertEquals("dtj", model.value().get(0).tags().get("ewbcihxuuw")); - Assertions.assertEquals("drihpfhoqcaaewda", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java deleted file mode 100644 index e9f36a8d8f097..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsCreateMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"backupId\":\"fhjirwgdnqzbrfk\",\"creationDate\":\"2021-02-01T12:15:25Z\",\"provisioningState\":\"Succeeded\",\"size\":4152875994708456428,\"label\":\"xcdglj\",\"backupType\":\"Scheduled\",\"failureReason\":\"ua\",\"volumeResourceId\":\"htomflrytswfp\",\"useExistingSnapshot\":true,\"snapshotName\":\"ycxnmskw\",\"backupPolicyResourceId\":\"jjyslurlps\"},\"id\":\"kvp\",\"name\":\"dwqslsrhmpqvw\",\"type\":\"skondcbrwimu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Backup response = manager.backups() - .define("nmzlanru") - .withExistingBackupVault("agpgdph", "vdulajv", "ejchcsrlz") - .withVolumeResourceId("gydlhqv") - .withLabel("hlaiwd") - .withUseExistingSnapshot(true) - .withSnapshotName("xybafiqgea") - .create(); - - Assertions.assertEquals("xcdglj", response.label()); - Assertions.assertEquals("htomflrytswfp", response.volumeResourceId()); - Assertions.assertEquals(true, response.useExistingSnapshot()); - Assertions.assertEquals("ycxnmskw", response.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java deleted file mode 100644 index 90b1ffe50b690..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetLatestStatusWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BackupStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsGetLatestStatusWithResponseMockTests { - @Test - public void testGetLatestStatusWithResponse() throws Exception { - String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Unknown\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"r\",\"errorMessage\":\"uyzlw\",\"lastTransferSize\":5515716031108163936,\"lastTransferType\":\"hoocl\",\"totalTransferBytes\":839239832013822699,\"transferProgressBytes\":3448292460840142228}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BackupStatus response = manager.backups() - .getLatestStatusWithResponse("pjrtws", "hv", "uic", "hvtrrmhwrbfdpyf", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java deleted file mode 100644 index 9dd78c9fd49fd..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetVolumeLatestRestoreStatusWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RestoreStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsGetVolumeLatestRestoreStatusWithResponseMockTests { - @Test - public void testGetVolumeLatestRestoreStatusWithResponse() throws Exception { - String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"zj\",\"errorMessage\":\"refqy\",\"totalTransferBytes\":9207554581349131081}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RestoreStatus response = manager.backups() - .getVolumeLatestRestoreStatusWithResponse("mczjkm", "ykyujxsg", "hsrrryejylmbkz", "dnigrfihot", - com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java deleted file mode 100644 index 93dc08017dd94..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsGetWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"backupId\":\"vvtzejetjkl\",\"creationDate\":\"2021-03-04T18:59:07Z\",\"provisioningState\":\"yjuzkdb\",\"size\":700409671675457936,\"label\":\"rzvh\",\"backupType\":\"Manual\",\"failureReason\":\"rhtgvgzpcrrkol\",\"volumeResourceId\":\"w\",\"useExistingSnapshot\":false,\"snapshotName\":\"mwrokcdxfzzzwyja\",\"backupPolicyResourceId\":\"tlhguynuchl\"},\"id\":\"ltxdwhmozu\",\"name\":\"gzvlnsnn\",\"type\":\"zfpafolpymwamxqz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Backup response = manager.backups() - .getWithResponse("z", "iblkujr", "lfojuidjp", "uyjucejikzo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rzvh", response.label()); - Assertions.assertEquals("w", response.volumeResourceId()); - Assertions.assertEquals(false, response.useExistingSnapshot()); - Assertions.assertEquals("mwrokcdxfzzzwyja", response.snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java deleted file mode 100644 index 412411ad13868..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Backup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BackupsListByVaultMockTests { - @Test - public void testListByVault() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"backupId\":\"qaxsipietgbebjf\",\"creationDate\":\"2021-08-07T23:47:59Z\",\"provisioningState\":\"oichdlpnfpubnt\",\"size\":6824297515299919028,\"label\":\"viqsowsaaelcattc\",\"backupType\":\"Scheduled\",\"failureReason\":\"lrvkmjc\",\"volumeResourceId\":\"mjvlgfgg\",\"useExistingSnapshot\":false,\"snapshotName\":\"y\",\"backupPolicyResourceId\":\"zrzbjpsfxs\"},\"id\":\"ztlvtmvagbwidqlv\",\"name\":\"ukoveofi\",\"type\":\"rvjfnmjmvlw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.backups().listByVault("oihiqak", "diw", "brkwpzdqt", "hcspo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("viqsowsaaelcattc", response.iterator().next().label()); - Assertions.assertEquals("mjvlgfgg", response.iterator().next().volumeResourceId()); - Assertions.assertEquals(false, response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("y", response.iterator().next().snapshotName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListTests.java deleted file mode 100644 index 5a5ee95c4564b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsListTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.BackupInner; -import com.azure.resourcemanager.netapp.models.BackupsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BackupsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"backupId\":\"jvewzcjznmwcp\",\"creationDate\":\"2021-03-18T03:28:02Z\",\"provisioningState\":\"adraufactkahzo\",\"size\":1201221594494672823,\"label\":\"iuxxpshneekulfg\",\"backupType\":\"Manual\",\"failureReason\":\"bkwdlenrds\",\"volumeResourceId\":\"tujbazpju\",\"useExistingSnapshot\":true,\"snapshotName\":\"nyfln\",\"backupPolicyResourceId\":\"wmd\"},\"id\":\"wpklvxw\",\"name\":\"ygdxpgpqchis\",\"type\":\"epn\"},{\"properties\":{\"backupId\":\"jcrxgibbdaxcon\",\"creationDate\":\"2021-04-01T06:09:38Z\",\"provisioningState\":\"uors\",\"size\":8150670572969062689,\"label\":\"bqplh\",\"backupType\":\"Scheduled\",\"failureReason\":\"uepzl\",\"volumeResourceId\":\"phwzsoldweyuqdu\",\"useExistingSnapshot\":false,\"snapshotName\":\"nrwrbiork\",\"backupPolicyResourceId\":\"lywjhh\"},\"id\":\"nhxmsi\",\"name\":\"fomiloxgg\",\"type\":\"ufiqndieuzaof\"},{\"properties\":{\"backupId\":\"hvcyyysfg\",\"creationDate\":\"2021-08-22T03:17:23Z\",\"provisioningState\":\"biipuip\",\"size\":7194165159471944548,\"label\":\"macjekn\",\"backupType\":\"Scheduled\",\"failureReason\":\"qvci\",\"volumeResourceId\":\"pevf\",\"useExistingSnapshot\":false,\"snapshotName\":\"rrilbywdxsmic\",\"backupPolicyResourceId\":\"rwfscjfnynszquj\"},\"id\":\"dvoqyt\",\"name\":\"byowbblgyavutp\",\"type\":\"hjoxo\"}],\"nextLink\":\"msksbp\"}") - .toObject(BackupsList.class); - Assertions.assertEquals("iuxxpshneekulfg", model.value().get(0).label()); - Assertions.assertEquals("tujbazpju", model.value().get(0).volumeResourceId()); - Assertions.assertEquals(true, model.value().get(0).useExistingSnapshot()); - Assertions.assertEquals("nyfln", model.value().get(0).snapshotName()); - Assertions.assertEquals("msksbp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupsList model = new BackupsList().withValue(Arrays.asList( - new BackupInner().withLabel("iuxxpshneekulfg") - .withVolumeResourceId("tujbazpju") - .withUseExistingSnapshot(true) - .withSnapshotName("nyfln"), - new BackupInner().withLabel("bqplh") - .withVolumeResourceId("phwzsoldweyuqdu") - .withUseExistingSnapshot(false) - .withSnapshotName("nrwrbiork"), - new BackupInner().withLabel("macjekn") - .withVolumeResourceId("pevf") - .withUseExistingSnapshot(false) - .withSnapshotName("rrilbywdxsmic"))) - .withNextLink("msksbp"); - model = BinaryData.fromObject(model).toObject(BackupsList.class); - Assertions.assertEquals("iuxxpshneekulfg", model.value().get(0).label()); - Assertions.assertEquals("tujbazpju", model.value().get(0).volumeResourceId()); - Assertions.assertEquals(true, model.value().get(0).useExistingSnapshot()); - Assertions.assertEquals("nyfln", model.value().get(0).snapshotName()); - Assertions.assertEquals("msksbp", model.nextLink()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java deleted file mode 100644 index b849b48490ec8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupsMigrationRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; -import org.junit.jupiter.api.Assertions; - -public final class BackupsMigrationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BackupsMigrationRequest model - = BinaryData.fromString("{\"backupVaultId\":\"rqzz\"}").toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("rqzz", model.backupVaultId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("rqzz"); - model = BinaryData.fromObject(model).toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("rqzz", model.backupVaultId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java deleted file mode 100644 index 6f8f4bb7c9b72..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakFileLocksRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; -import org.junit.jupiter.api.Assertions; - -public final class BreakFileLocksRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BreakFileLocksRequest model - = BinaryData.fromString("{\"clientIp\":\"uyfta\",\"confirmRunningDisruptiveOperation\":false}") - .toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("uyfta", model.clientIp()); - Assertions.assertEquals(false, model.confirmRunningDisruptiveOperation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BreakFileLocksRequest model - = new BreakFileLocksRequest().withClientIp("uyfta").withConfirmRunningDisruptiveOperation(false); - model = BinaryData.fromObject(model).toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("uyfta", model.clientIp()); - Assertions.assertEquals(false, model.confirmRunningDisruptiveOperation()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java deleted file mode 100644 index cc82c1729a120..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BreakReplicationRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import org.junit.jupiter.api.Assertions; - -public final class BreakReplicationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BreakReplicationRequest model - = BinaryData.fromString("{\"forceBreakReplication\":false}").toObject(BreakReplicationRequest.class); - Assertions.assertEquals(false, model.forceBreakReplication()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(false); - model = BinaryData.fromObject(model).toObject(BreakReplicationRequest.class); - Assertions.assertEquals(false, model.forceBreakReplication()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java deleted file mode 100644 index e919b7d1da21d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolInnerTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CapacityPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapacityPoolInner model = BinaryData.fromString( - "{\"etag\":\"ow\",\"properties\":{\"poolId\":\"przqlveu\",\"size\":4253810910381406422,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"mkh\",\"totalThroughputMibps\":23.892725,\"utilizedThroughputMibps\":43.313354,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"riplrbpbewtg\",\"tags\":{\"xzvlvqhjkbegib\":\"blcg\",\"wrtz\":\"nmxiebwwaloayqc\",\"ngmtsavjcb\":\"uzgwyzmhtx\"},\"id\":\"wxqpsrknftguvri\",\"name\":\"hprwmdyv\",\"type\":\"qtayri\"}") - .toObject(CapacityPoolInner.class); - Assertions.assertEquals("riplrbpbewtg", model.location()); - Assertions.assertEquals("blcg", model.tags().get("xzvlvqhjkbegib")); - Assertions.assertEquals(4253810910381406422L, model.size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("riplrbpbewtg") - .withTags(mapOf("xzvlvqhjkbegib", "blcg", "wrtz", "nmxiebwwaloayqc", "ngmtsavjcb", "uzgwyzmhtx")) - .withSize(4253810910381406422L) - .withServiceLevel(ServiceLevel.ULTRA) - .withQosType(QosType.AUTO) - .withCoolAccess(false) - .withEncryptionType(EncryptionType.SINGLE); - model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("riplrbpbewtg", model.location()); - Assertions.assertEquals("blcg", model.tags().get("xzvlvqhjkbegib")); - Assertions.assertEquals(4253810910381406422L, model.size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java deleted file mode 100644 index 8ab7a82d54dc9..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner; -import com.azure.resourcemanager.netapp.models.CapacityPoolList; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CapacityPoolListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapacityPoolList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"xywpmueefjzwfqkq\",\"properties\":{\"poolId\":\"ids\",\"size\":7570837536586623824,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"bglaocqxtccm\",\"totalThroughputMibps\":63.202667,\"utilizedThroughputMibps\":10.141272,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"location\":\"xv\",\"tags\":{\"zntxhdz\":\"dw\"},\"id\":\"lrqjbhckfr\",\"name\":\"hrxsbk\",\"type\":\"vpycanuzbp\"},{\"etag\":\"afkuwb\",\"properties\":{\"poolId\":\"nwbmeh\",\"size\":5146449711958438241,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"jusrtslhspk\",\"totalThroughputMibps\":72.538994,\"utilizedThroughputMibps\":68.91014,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"location\":\"vt\",\"tags\":{\"c\":\"mqkrhahvljuahaqu\",\"aex\":\"hmdua\",\"vxpvgomz\":\"pvfadmwsrcr\"},\"id\":\"fmisg\",\"name\":\"bnbbeldawkz\",\"type\":\"ali\"},{\"etag\":\"rqhakauha\",\"properties\":{\"poolId\":\"sfwxosowzxc\",\"size\":2516732809766062265,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"ooxdjebwpuc\",\"totalThroughputMibps\":83.48158,\"utilizedThroughputMibps\":65.76169,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"location\":\"civyhzceuo\",\"tags\":{\"ueiotwmcdyt\":\"rw\",\"it\":\"x\",\"hniskxfbkpyc\":\"nrjawgqwg\"},\"id\":\"klwndnhjdauwhv\",\"name\":\"l\",\"type\":\"zbtd\"}],\"nextLink\":\"ujznb\"}") - .toObject(CapacityPoolList.class); - Assertions.assertEquals("xv", model.value().get(0).location()); - Assertions.assertEquals("dw", model.value().get(0).tags().get("zntxhdz")); - Assertions.assertEquals(7570837536586623824L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); - Assertions.assertEquals(true, model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("ujznb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapacityPoolList model = new CapacityPoolList().withValue(Arrays.asList( - new CapacityPoolInner().withLocation("xv") - .withTags(mapOf("zntxhdz", "dw")) - .withSize(7570837536586623824L) - .withServiceLevel(ServiceLevel.ULTRA) - .withQosType(QosType.AUTO) - .withCoolAccess(true) - .withEncryptionType(EncryptionType.DOUBLE), - new CapacityPoolInner().withLocation("vt") - .withTags(mapOf("c", "mqkrhahvljuahaqu", "aex", "hmdua", "vxpvgomz", "pvfadmwsrcr")) - .withSize(5146449711958438241L) - .withServiceLevel(ServiceLevel.ULTRA) - .withQosType(QosType.AUTO) - .withCoolAccess(true) - .withEncryptionType(EncryptionType.DOUBLE), - new CapacityPoolInner().withLocation("civyhzceuo") - .withTags(mapOf("ueiotwmcdyt", "rw", "it", "x", "hniskxfbkpyc", "nrjawgqwg")) - .withSize(2516732809766062265L) - .withServiceLevel(ServiceLevel.STANDARD_ZRS) - .withQosType(QosType.MANUAL) - .withCoolAccess(false) - .withEncryptionType(EncryptionType.SINGLE))) - .withNextLink("ujznb"); - model = BinaryData.fromObject(model).toObject(CapacityPoolList.class); - Assertions.assertEquals("xv", model.value().get(0).location()); - Assertions.assertEquals("dw", model.value().get(0).tags().get("zntxhdz")); - Assertions.assertEquals(7570837536586623824L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); - Assertions.assertEquals(QosType.AUTO, model.value().get(0).qosType()); - Assertions.assertEquals(true, model.value().get(0).coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.value().get(0).encryptionType()); - Assertions.assertEquals("ujznb", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java deleted file mode 100644 index 7f389eb3de6af..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolPatchTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.CapacityPoolPatch; -import com.azure.resourcemanager.netapp.models.QosType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CapacityPoolPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapacityPoolPatch model = BinaryData.fromString( - "{\"properties\":{\"size\":8570792443067790415,\"qosType\":\"Manual\",\"coolAccess\":false},\"location\":\"jyzhpvgq\",\"tags\":{\"xkvugfhzov\":\"rvxdjzlmw\"},\"id\":\"wjvzunluthnn\",\"name\":\"rnxipei\",\"type\":\"pjzu\"}") - .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("jyzhpvgq", model.location()); - Assertions.assertEquals("rvxdjzlmw", model.tags().get("xkvugfhzov")); - Assertions.assertEquals(8570792443067790415L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("jyzhpvgq") - .withTags(mapOf("xkvugfhzov", "rvxdjzlmw")) - .withSize(8570792443067790415L) - .withQosType(QosType.MANUAL) - .withCoolAccess(false); - model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("jyzhpvgq", model.location()); - Assertions.assertEquals("rvxdjzlmw", model.tags().get("xkvugfhzov")); - Assertions.assertEquals(8570792443067790415L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java deleted file mode 100644 index c295ab32954ab..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import org.junit.jupiter.api.Assertions; - -public final class CheckAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckAvailabilityResponseInner model = BinaryData - .fromString("{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"czwtruwiqzbqjv\"}") - .toObject(CheckAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("czwtruwiqzbqjv", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckAvailabilityResponseInner model = new CheckAvailabilityResponseInner().withIsAvailable(true) - .withReason(InAvailabilityReasonType.ALREADY_EXISTS) - .withMessage("czwtruwiqzbqjv"); - model = BinaryData.fromObject(model).toObject(CheckAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("czwtruwiqzbqjv", model.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java deleted file mode 100644 index 7a1b60675c29a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DailyScheduleTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import org.junit.jupiter.api.Assertions; - -public final class DailyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DailySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1461761941,\"hour\":751127894,\"minute\":1947677125,\"usedBytes\":3612110443400649371}") - .toObject(DailySchedule.class); - Assertions.assertEquals(1461761941, model.snapshotsToKeep()); - Assertions.assertEquals(751127894, model.hour()); - Assertions.assertEquals(1947677125, model.minute()); - Assertions.assertEquals(3612110443400649371L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DailySchedule model = new DailySchedule().withSnapshotsToKeep(1461761941) - .withHour(751127894) - .withMinute(1947677125) - .withUsedBytes(3612110443400649371L); - model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(1461761941, model.snapshotsToKeep()); - Assertions.assertEquals(751127894, model.hour()); - Assertions.assertEquals(1947677125, model.minute()); - Assertions.assertEquals(3612110443400649371L, model.usedBytes()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DimensionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DimensionTests.java deleted file mode 100644 index 5bdc411ce2b17..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DimensionTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Dimension; -import org.junit.jupiter.api.Assertions; - -public final class DimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dimension model = BinaryData.fromString("{\"name\":\"mddystkiiux\",\"displayName\":\"yudxorrqnbp\"}") - .toObject(Dimension.class); - Assertions.assertEquals("mddystkiiux", model.name()); - Assertions.assertEquals("yudxorrqnbp", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dimension model = new Dimension().withName("mddystkiiux").withDisplayName("yudxorrqnbp"); - model = BinaryData.fromObject(model).toObject(Dimension.class); - Assertions.assertEquals("mddystkiiux", model.name()); - Assertions.assertEquals("yudxorrqnbp", model.displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java deleted file mode 100644 index 96a6ec56bdff4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.EncryptionIdentity; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionIdentity model = BinaryData - .fromString("{\"principalId\":\"ogtwrupqsxvnmi\",\"userAssignedIdentity\":\"kvceoveilovnotyf\"}") - .toObject(EncryptionIdentity.class); - Assertions.assertEquals("kvceoveilovnotyf", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EncryptionIdentity model = new EncryptionIdentity().withUserAssignedIdentity("kvceoveilovnotyf"); - model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("kvceoveilovnotyf", model.userAssignedIdentity()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java deleted file mode 100644 index ffbb8b0cb05e0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ExportPolicyRuleTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import org.junit.jupiter.api.Assertions; - -public final class ExportPolicyRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExportPolicyRule model = BinaryData.fromString( - "{\"ruleIndex\":1918631989,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":false,\"allowedClients\":\"dmoizpostmg\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}") - .toObject(ExportPolicyRule.class); - Assertions.assertEquals(1918631989, model.ruleIndex()); - Assertions.assertEquals(true, model.unixReadOnly()); - Assertions.assertEquals(false, model.unixReadWrite()); - Assertions.assertEquals(false, model.kerberos5ReadOnly()); - Assertions.assertEquals(true, model.kerberos5ReadWrite()); - Assertions.assertEquals(true, model.kerberos5IReadOnly()); - Assertions.assertEquals(true, model.kerberos5IReadWrite()); - Assertions.assertEquals(false, model.kerberos5PReadOnly()); - Assertions.assertEquals(false, model.kerberos5PReadWrite()); - Assertions.assertEquals(false, model.cifs()); - Assertions.assertEquals(true, model.nfsv3()); - Assertions.assertEquals(false, model.nfsv41()); - Assertions.assertEquals("dmoizpostmg", model.allowedClients()); - Assertions.assertEquals(true, model.hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.chownMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExportPolicyRule model = new ExportPolicyRule().withRuleIndex(1918631989) - .withUnixReadOnly(true) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(false) - .withCifs(false) - .withNfsv3(true) - .withNfsv41(false) - .withAllowedClients("dmoizpostmg") - .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED); - model = BinaryData.fromObject(model).toObject(ExportPolicyRule.class); - Assertions.assertEquals(1918631989, model.ruleIndex()); - Assertions.assertEquals(true, model.unixReadOnly()); - Assertions.assertEquals(false, model.unixReadWrite()); - Assertions.assertEquals(false, model.kerberos5ReadOnly()); - Assertions.assertEquals(true, model.kerberos5ReadWrite()); - Assertions.assertEquals(true, model.kerberos5IReadOnly()); - Assertions.assertEquals(true, model.kerberos5IReadWrite()); - Assertions.assertEquals(false, model.kerberos5PReadOnly()); - Assertions.assertEquals(false, model.kerberos5PReadWrite()); - Assertions.assertEquals(false, model.cifs()); - Assertions.assertEquals(true, model.nfsv3()); - Assertions.assertEquals(false, model.nfsv41()); - Assertions.assertEquals("dmoizpostmg", model.allowedClients()); - Assertions.assertEquals(true, model.hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.chownMode()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java deleted file mode 100644 index 7d6eecb25a6f8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class FilePathAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FilePathAvailabilityRequest model = BinaryData.fromString("{\"name\":\"ovm\",\"subnetId\":\"okacspk\"}") - .toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ovm", model.name()); - Assertions.assertEquals("okacspk", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FilePathAvailabilityRequest model = new FilePathAvailabilityRequest().withName("ovm").withSubnetId("okacspk"); - model = BinaryData.fromObject(model).toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ovm", model.name()); - Assertions.assertEquals("okacspk", model.subnetId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java deleted file mode 100644 index 72ef4863efc93..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; -import org.junit.jupiter.api.Assertions; - -public final class GetGroupIdListForLdapUserRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetGroupIdListForLdapUserRequest model - = BinaryData.fromString("{\"username\":\"pwiyzvqtm\"}").toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("pwiyzvqtm", model.username()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("pwiyzvqtm"); - model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("pwiyzvqtm", model.username()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java deleted file mode 100644 index d66b43ae18875..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/GetGroupIdListForLdapUserResponseInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GetGroupIdListForLdapUserResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetGroupIdListForLdapUserResponseInner model - = BinaryData.fromString("{\"groupIdsForLdapUser\":[\"exkpzksmondjmq\",\"xvy\",\"omgkopkwho\",\"v\"]}") - .toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("exkpzksmondjmq", model.groupIdsForLdapUser().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetGroupIdListForLdapUserResponseInner model = new GetGroupIdListForLdapUserResponseInner() - .withGroupIdsForLdapUser(Arrays.asList("exkpzksmondjmq", "xvy", "omgkopkwho", "v")); - model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("exkpzksmondjmq", model.groupIdsForLdapUser().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java deleted file mode 100644 index 829ded851b7a5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/HourlyScheduleTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import org.junit.jupiter.api.Assertions; - -public final class HourlyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HourlySchedule model = BinaryData - .fromString("{\"snapshotsToKeep\":1969431903,\"minute\":452446013,\"usedBytes\":7839409166109908201}") - .toObject(HourlySchedule.class); - Assertions.assertEquals(1969431903, model.snapshotsToKeep()); - Assertions.assertEquals(452446013, model.minute()); - Assertions.assertEquals(7839409166109908201L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(1969431903) - .withMinute(452446013) - .withUsedBytes(7839409166109908201L); - model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(1969431903, model.snapshotsToKeep()); - Assertions.assertEquals(452446013, model.minute()); - Assertions.assertEquals(7839409166109908201L, model.usedBytes()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java deleted file mode 100644 index e69d769fc5af7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt; -import org.junit.jupiter.api.Assertions; - -public final class LdapSearchScopeOptTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LdapSearchScopeOpt model = BinaryData.fromString( - "{\"userDN\":\"ckhsmtxpsieb\",\"groupDN\":\"hvpesapskrdqm\",\"groupMembershipFilter\":\"jdhtldwkyzxu\"}") - .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("ckhsmtxpsieb", model.userDN()); - Assertions.assertEquals("hvpesapskrdqm", model.groupDN()); - Assertions.assertEquals("jdhtldwkyzxu", model.groupMembershipFilter()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("ckhsmtxpsieb") - .withGroupDN("hvpesapskrdqm") - .withGroupMembershipFilter("jdhtldwkyzxu"); - model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("ckhsmtxpsieb", model.userDN()); - Assertions.assertEquals("hvpesapskrdqm", model.groupDN()); - Assertions.assertEquals("jdhtldwkyzxu", model.groupMembershipFilter()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java deleted file mode 100644 index bbd7f03d385af..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ListReplications; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListReplicationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListReplications model = BinaryData.fromString( - "{\"value\":[{\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"ciqibrhosx\",\"remoteVolumeRegion\":\"qrhzoymibmrqyib\"},{\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"uszdtmhrkwof\",\"remoteVolumeRegion\":\"voqacpiexpbt\"},{\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"oenwashr\",\"remoteVolumeRegion\":\"tkcnqxwb\"},{\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"pi\",\"remoteVolumeRegion\":\"waasip\"}]}") - .toObject(ListReplications.class); - Assertions.assertEquals(EndpointType.DST, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.DAILY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("ciqibrhosx", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("qrhzoymibmrqyib", model.value().get(0).remoteVolumeRegion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListReplications model = new ListReplications().withValue(Arrays.asList( - new ReplicationInner().withEndpointType(EndpointType.DST) - .withReplicationSchedule(ReplicationSchedule.DAILY) - .withRemoteVolumeResourceId("ciqibrhosx") - .withRemoteVolumeRegion("qrhzoymibmrqyib"), - new ReplicationInner().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.DAILY) - .withRemoteVolumeResourceId("uszdtmhrkwof") - .withRemoteVolumeRegion("voqacpiexpbt"), - new ReplicationInner().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.HOURLY) - .withRemoteVolumeResourceId("oenwashr") - .withRemoteVolumeRegion("tkcnqxwb"), - new ReplicationInner().withEndpointType(EndpointType.DST) - .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY) - .withRemoteVolumeResourceId("pi") - .withRemoteVolumeRegion("waasip"))); - model = BinaryData.fromObject(model).toObject(ListReplications.class); - Assertions.assertEquals(EndpointType.DST, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.DAILY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("ciqibrhosx", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("qrhzoymibmrqyib", model.value().get(0).remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LogSpecificationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LogSpecificationTests.java deleted file mode 100644 index 7b5a5f3ee0664..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LogSpecificationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = BinaryData.fromString("{\"name\":\"zvyifqrvkdvj\",\"displayName\":\"lrmv\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("zvyifqrvkdvj", model.name()); - Assertions.assertEquals("lrmv", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = new LogSpecification().withName("zvyifqrvkdvj").withDisplayName("lrmv"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("zvyifqrvkdvj", model.name()); - Assertions.assertEquals("lrmv", model.displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index bb833fc46a0e5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; -import com.azure.resourcemanager.netapp.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"126c7238-b97e-4c9e-9c58-8bc3d231e270\",\"tenantId\":\"517582fe-d102-4542-99ff-e0a3ba5f8305\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"nxdhbt\":{\"principalId\":\"ff5d1fcc-3d96-474b-ad50-b1a0413ea4fb\",\"clientId\":\"7df17ed4-6d45-4208-8ce2-b13c595d26ff\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model - = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("nxdhbt", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MetricSpecificationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MetricSpecificationTests.java deleted file mode 100644 index f1cd079ed4077..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = BinaryData.fromString( - "{\"name\":\"whybcib\",\"displayName\":\"vdcsitynn\",\"displayDescription\":\"mdectehfiqscjey\",\"unit\":\"hezrkgq\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"mkqsleyyv\"],\"internalMetricName\":\"qjpkcattpngjcrc\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"pjhvmdajvnys\",\"sourceMdmNamespace\":\"nqecanoaeup\",\"dimensions\":[{\"name\":\"ltrpmopj\",\"displayName\":\"matuok\"},{\"name\":\"fu\",\"displayName\":\"aodsfcpkv\"},{\"name\":\"dpuozmyz\",\"displayName\":\"agfuaxbezyiu\"},{\"name\":\"ktwh\",\"displayName\":\"xw\"}],\"aggregationType\":\"wqsmbsur\",\"fillGapWithZero\":true,\"category\":\"o\",\"resourceIdDimensionNameOverride\":\"ocfs\",\"isInternal\":false}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("whybcib", model.name()); - Assertions.assertEquals("vdcsitynn", model.displayName()); - Assertions.assertEquals("mdectehfiqscjey", model.displayDescription()); - Assertions.assertEquals("hezrkgq", model.unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("mkqsleyyv", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("qjpkcattpngjcrc", model.internalMetricName()); - Assertions.assertEquals(true, model.enableRegionalMdmAccount()); - Assertions.assertEquals("pjhvmdajvnys", model.sourceMdmAccount()); - Assertions.assertEquals("nqecanoaeup", model.sourceMdmNamespace()); - Assertions.assertEquals("ltrpmopj", model.dimensions().get(0).name()); - Assertions.assertEquals("matuok", model.dimensions().get(0).displayName()); - Assertions.assertEquals("wqsmbsur", model.aggregationType()); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("o", model.category()); - Assertions.assertEquals("ocfs", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.isInternal()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = new MetricSpecification().withName("whybcib") - .withDisplayName("vdcsitynn") - .withDisplayDescription("mdectehfiqscjey") - .withUnit("hezrkgq") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("mkqsleyyv")) - .withInternalMetricName("qjpkcattpngjcrc") - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("pjhvmdajvnys") - .withSourceMdmNamespace("nqecanoaeup") - .withDimensions(Arrays.asList(new Dimension().withName("ltrpmopj").withDisplayName("matuok"), - new Dimension().withName("fu").withDisplayName("aodsfcpkv"), - new Dimension().withName("dpuozmyz").withDisplayName("agfuaxbezyiu"), - new Dimension().withName("ktwh").withDisplayName("xw"))) - .withAggregationType("wqsmbsur") - .withFillGapWithZero(true) - .withCategory("o") - .withResourceIdDimensionNameOverride("ocfs") - .withIsInternal(false); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("whybcib", model.name()); - Assertions.assertEquals("vdcsitynn", model.displayName()); - Assertions.assertEquals("mdectehfiqscjey", model.displayDescription()); - Assertions.assertEquals("hezrkgq", model.unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("mkqsleyyv", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("qjpkcattpngjcrc", model.internalMetricName()); - Assertions.assertEquals(true, model.enableRegionalMdmAccount()); - Assertions.assertEquals("pjhvmdajvnys", model.sourceMdmAccount()); - Assertions.assertEquals("nqecanoaeup", model.sourceMdmNamespace()); - Assertions.assertEquals("ltrpmopj", model.dimensions().get(0).name()); - Assertions.assertEquals("matuok", model.dimensions().get(0).displayName()); - Assertions.assertEquals("wqsmbsur", model.aggregationType()); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("o", model.category()); - Assertions.assertEquals("ocfs", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.isInternal()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java deleted file mode 100644 index 48ba15389e1f4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MonthlyScheduleTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import org.junit.jupiter.api.Assertions; - -public final class MonthlyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonthlySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":1376846032,\"daysOfMonth\":\"tcje\",\"hour\":1652429831,\"minute\":125087632,\"usedBytes\":951780632353871524}") - .toObject(MonthlySchedule.class); - Assertions.assertEquals(1376846032, model.snapshotsToKeep()); - Assertions.assertEquals("tcje", model.daysOfMonth()); - Assertions.assertEquals(1652429831, model.hour()); - Assertions.assertEquals(125087632, model.minute()); - Assertions.assertEquals(951780632353871524L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(1376846032) - .withDaysOfMonth("tcje") - .withHour(1652429831) - .withMinute(125087632) - .withUsedBytes(951780632353871524L); - model = BinaryData.fromObject(model).toObject(MonthlySchedule.class); - Assertions.assertEquals(1376846032, model.snapshotsToKeep()); - Assertions.assertEquals("tcje", model.daysOfMonth()); - Assertions.assertEquals(1652429831, model.hour()); - Assertions.assertEquals(125087632, model.minute()); - Assertions.assertEquals(951780632353871524L, model.usedBytes()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java deleted file mode 100644 index 58018d863f341..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/MountTargetPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.MountTargetProperties; -import org.junit.jupiter.api.Assertions; - -public final class MountTargetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MountTargetProperties model = BinaryData.fromString( - "{\"mountTargetId\":\"rmfqjhhkxbpvj\",\"fileSystemId\":\"mjh\",\"ipAddress\":\"j\",\"smbServerFqdn\":\"gudivkrtswbxqz\"}") - .toObject(MountTargetProperties.class); - Assertions.assertEquals("mjh", model.fileSystemId()); - Assertions.assertEquals("gudivkrtswbxqz", model.smbServerFqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MountTargetProperties model - = new MountTargetProperties().withFileSystemId("mjh").withSmbServerFqdn("gudivkrtswbxqz"); - model = BinaryData.fromObject(model).toObject(MountTargetProperties.class); - Assertions.assertEquals("mjh", model.fileSystemId()); - Assertions.assertEquals("gudivkrtswbxqz", model.smbServerFqdn()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java deleted file mode 100644 index 83b1e7dace48d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourceQuotaLimitsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"current\":1056443499,\"default\":2111689562},\"id\":\"xcjzhqizxfpxt\",\"name\":\"qscjavftjuh\",\"type\":\"qaz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubscriptionQuotaItem response = manager.netAppResourceQuotaLimits() - .getWithResponse("hdjhlimmbcx", "h", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java deleted file mode 100644 index 477db249418b1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQuotaLimitsListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItem; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourceQuotaLimitsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"current\":89484579,\"default\":2118376270},\"id\":\"wpchwahf\",\"name\":\"ousnfepgfewe\",\"type\":\"wlyxgncxyk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.netAppResourceQuotaLimits().list("hwwn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java deleted file mode 100644 index 7b46ccec18c64..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosGetWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RegionInfoResource; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourceRegionInfosGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"storageToNetworkProximity\":\"T1AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"cqusr\",\"isAvailable\":true}]},\"id\":\"nwsdtutnwlduyc\",\"name\":\"uzhyrmewipmvekdx\",\"type\":\"kuqgsjjxundxgket\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RegionInfoResource response = manager.netAppResourceRegionInfos() - .getWithResponse("zflbqvg", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_ACROSS_T2, response.storageToNetworkProximity()); - Assertions.assertEquals("cqusr", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, response.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java deleted file mode 100644 index 68dd91348ed85..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceRegionInfosListMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RegionInfoResource; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourceRegionInfosListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"AcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"civmmg\",\"isAvailable\":false}]},\"id\":\"iwrxgkn\",\"name\":\"uvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.netAppResourceRegionInfos().list("mtggu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(RegionStorageToNetworkProximity.ACROSS_T2, - response.iterator().next().storageToNetworkProximity()); - Assertions.assertEquals("civmmg", - response.iterator().next().availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(false, response.iterator().next().availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java deleted file mode 100644 index 322249971b6a1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesCheckFilePathAvailabilityWithResponseMockTests { - @Test - public void testCheckFilePathAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"giagtcojo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckAvailabilityResponse response = manager.netAppResources() - .checkFilePathAvailabilityWithResponse("vodggxdbee", - new FilePathAvailabilityRequest().withName("mieknlraria").withSubnetId("wiuagydwqf"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("giagtcojo", response.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 4450cd1ac4a07..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"zqlqhyc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckAvailabilityResponse response = manager.netAppResources() - .checkNameAvailabilityWithResponse("srvhmgorffuki", - new ResourceNameAvailabilityRequest().withName("cvwmzhwplefa") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) - .withResourceGroup("xilcbtgnhnzey"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("zqlqhyc", response.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java deleted file mode 100644 index 53e72a73447a2..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CheckAvailabilityResponse; -import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; -import com.azure.resourcemanager.netapp.models.InAvailabilityReasonType; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesCheckQuotaAvailabilityWithResponseMockTests { - @Test - public void testCheckQuotaAvailabilityWithResponse() throws Exception { - String responseStr = "{\"isAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"cto\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckAvailabilityResponse response = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("qwogfnzjvus", - new QuotaAvailabilityRequest().withName("zldmozuxy") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS) - .withResourceGroup("sbtkadpysownbtgk"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("cto", response.message()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java deleted file mode 100644 index 066e73e8ba2d7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.NetworkSiblingSet; -import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesQueryNetworkSiblingSetWithResponseMockTests { - @Test - public void testQueryNetworkSiblingSetWithResponse() throws Exception { - String responseStr - = "{\"networkSiblingSetId\":\"vqikfxcvhrfsphu\",\"subnetId\":\"rttikteusqc\",\"networkSiblingSetStateId\":\"vyklxuby\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"lcqcuubgqibrt\",\"volumeResourceIds\":[\"etttwgdslqxihhr\",\"ooizqseyp\"]},{\"ipAddress\":\"utcxapzhy\",\"volumeResourceIds\":[\"togebjoxsl\",\"vnh\"]}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkSiblingSet response = manager.netAppResources() - .queryNetworkSiblingSetWithResponse("owcluqo", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("ekqvgqouwif").withSubnetId("mpjw"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vqikfxcvhrfsphu", response.networkSiblingSetId()); - Assertions.assertEquals("rttikteusqc", response.subnetId()); - Assertions.assertEquals("vyklxuby", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC, response.networkFeatures()); - Assertions.assertEquals("etttwgdslqxihhr", response.nicInfoList().get(0).volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java deleted file mode 100644 index eabfdb46c546f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesQueryRegionInfoWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.RegionInfo; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesQueryRegionInfoWithResponseMockTests { - @Test - public void testQueryRegionInfoWithResponse() throws Exception { - String responseStr - = "{\"storageToNetworkProximity\":\"T1AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"yqdhcuplcplcw\",\"isAvailable\":false},{\"availabilityZone\":\"ihlhzdsqtzb\",\"isAvailable\":true},{\"availabilityZone\":\"o\",\"isAvailable\":false},{\"availabilityZone\":\"fgmvecactxmwo\",\"isAvailable\":false}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RegionInfo response = manager.netAppResources() - .queryRegionInfoWithResponse("cmisofie", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_ACROSS_T2, response.storageToNetworkProximity()); - Assertions.assertEquals("yqdhcuplcplcw", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(false, response.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java deleted file mode 100644 index dc7beae8646f6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourcesUpdateNetworkSiblingSetMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.NetworkSiblingSet; -import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class NetAppResourcesUpdateNetworkSiblingSetMockTests { - @Test - public void testUpdateNetworkSiblingSet() throws Exception { - String responseStr - = "{\"networkSiblingSetId\":\"tidgfcwq\",\"subnetId\":\"imaq\",\"networkSiblingSetStateId\":\"hemjy\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"wkozz\",\"volumeResourceIds\":[\"lkb\"]},{\"ipAddress\":\"pfajnjwltlwtjj\",\"volumeResourceIds\":[\"talhsnvkcdmxzr\",\"oaimlnw\",\"aaomylweazu\",\"cse\"]}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkSiblingSet response = manager.netAppResources() - .updateNetworkSiblingSet("abrqnkkzj", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("jb") - .withSubnetId("rgaehvvibrxjj") - .withNetworkSiblingSetStateId("toqbeitpkxztmoob") - .withNetworkFeatures(NetworkFeatures.STANDARD_BASIC), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tidgfcwq", response.networkSiblingSetId()); - Assertions.assertEquals("imaq", response.subnetId()); - Assertions.assertEquals("hemjy", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); - Assertions.assertEquals("lkb", response.nicInfoList().get(0).volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java deleted file mode 100644 index 08a49ecb9849c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetworkSiblingSetInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.NicInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSiblingSetInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSiblingSetInner model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"gsncghkjeszz\",\"subnetId\":\"ijhtxf\",\"networkSiblingSetStateId\":\"xbf\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"vecxgodebfqkk\",\"volumeResourceIds\":[\"pukgriwflzlfb\",\"zpuzycisp\"]},{\"ipAddress\":\"zahmgkbrpyydhibn\",\"volumeResourceIds\":[\"kpikadrgvt\",\"agnb\",\"ynhijggme\",\"fsiarbutr\"]},{\"ipAddress\":\"pnazzm\",\"volumeResourceIds\":[\"unmpxttd\",\"hrbnlankxmyskpbh\"]},{\"ipAddress\":\"btkcxywnytnrsyn\",\"volumeResourceIds\":[\"dybyxczfclhaa\",\"dbabp\",\"lwrq\"]}]}") - .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("gsncghkjeszz", model.networkSiblingSetId()); - Assertions.assertEquals("ijhtxf", model.subnetId()); - Assertions.assertEquals("xbf", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); - Assertions.assertEquals("pukgriwflzlfb", model.nicInfoList().get(0).volumeResourceIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSiblingSetInner model = new NetworkSiblingSetInner().withNetworkSiblingSetId("gsncghkjeszz") - .withSubnetId("ijhtxf") - .withNetworkSiblingSetStateId("xbf") - .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD) - .withNicInfoList( - Arrays.asList(new NicInfo().withVolumeResourceIds(Arrays.asList("pukgriwflzlfb", "zpuzycisp")), - new NicInfo().withVolumeResourceIds(Arrays.asList("kpikadrgvt", "agnb", "ynhijggme", "fsiarbutr")), - new NicInfo().withVolumeResourceIds(Arrays.asList("unmpxttd", "hrbnlankxmyskpbh")), - new NicInfo().withVolumeResourceIds(Arrays.asList("dybyxczfclhaa", "dbabp", "lwrq")))); - model = BinaryData.fromObject(model).toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("gsncghkjeszz", model.networkSiblingSetId()); - Assertions.assertEquals("ijhtxf", model.subnetId()); - Assertions.assertEquals("xbf", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, model.networkFeatures()); - Assertions.assertEquals("pukgriwflzlfb", model.nicInfoList().get(0).volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java deleted file mode 100644 index a65097a0ae1d8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NicInfoTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.NicInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NicInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NicInfo model = BinaryData.fromString("{\"ipAddress\":\"ktsthsucocmny\",\"volumeResourceIds\":[\"t\"]}") - .toObject(NicInfo.class); - Assertions.assertEquals("t", model.volumeResourceIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NicInfo model = new NicInfo().withVolumeResourceIds(Arrays.asList("t")); - model = BinaryData.fromObject(model).toObject(NicInfo.class); - Assertions.assertEquals("t", model.volumeResourceIds().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationDisplayTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationDisplayTests.java deleted file mode 100644 index 9be1f2d76dfee..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationDisplayTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"cndvkaozwyiftyhx\",\"resource\":\"rokft\",\"operation\":\"olniwpwcukjf\",\"description\":\"iawxklry\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("cndvkaozwyiftyhx", model.provider()); - Assertions.assertEquals("rokft", model.resource()); - Assertions.assertEquals("olniwpwcukjf", model.operation()); - Assertions.assertEquals("iawxklry", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("cndvkaozwyiftyhx") - .withResource("rokft") - .withOperation("olniwpwcukjf") - .withDescription("iawxklry"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("cndvkaozwyiftyhx", model.provider()); - Assertions.assertEquals("rokft", model.resource()); - Assertions.assertEquals("olniwpwcukjf", model.operation()); - Assertions.assertEquals("iawxklry", model.description()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationInnerTests.java deleted file mode 100644 index b212936d44adc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationInnerTests.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"rd\",\"display\":{\"provider\":\"ewnwreitjzyfl\",\"resource\":\"arhmofcqhsmy\",\"operation\":\"kdtmlxhekuk\",\"description\":\"txukcdmp\"},\"origin\":\"cryuan\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"xtayr\",\"displayName\":\"m\",\"displayDescription\":\"fp\",\"unit\":\"qobmtukk\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"fxti\"],\"internalMetricName\":\"pzvgnwzsymglzufc\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"hdbihan\",\"sourceMdmNamespace\":\"hfcbjysa\",\"dimensions\":[{}],\"aggregationType\":\"xqhabi\",\"fillGapWithZero\":false,\"category\":\"xwczbyscnp\",\"resourceIdDimensionNameOverride\":\"uhivyqniw\",\"isInternal\":false},{\"name\":\"k\",\"displayName\":\"dumjgrtfwvuk\",\"displayDescription\":\"audccsnhs\",\"unit\":\"nyejhkryhtnap\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"yemkkvnip\"],\"internalMetricName\":\"xzjnchgejs\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"ailzydehojwyahu\",\"sourceMdmNamespace\":\"npmqnjaqwixjspro\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"utegjvwmfdats\",\"fillGapWithZero\":true,\"category\":\"pjhulsuuvmkj\",\"resourceIdDimensionNameOverride\":\"k\",\"isInternal\":false},{\"name\":\"dio\",\"displayName\":\"pslwejdpvw\",\"displayDescription\":\"oqpsoa\",\"unit\":\"tazak\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"yffdfdos\",\"gexpaojakhmsbz\",\"hcrzevd\"],\"internalMetricName\":\"lxaolthqtrgqjbp\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"inzgvfcj\",\"sourceMdmNamespace\":\"zoxxjtf\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"wfzitonpeqfpjk\",\"fillGapWithZero\":true,\"category\":\"fpdvhpfxxypi\",\"resourceIdDimensionNameOverride\":\"nmayhuybb\",\"isInternal\":true},{\"name\":\"epoo\",\"displayName\":\"nuvamiheogna\",\"displayDescription\":\"zxtheotusivyevcc\",\"unit\":\"ihnhun\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"gxg\",\"spemvtzfk\",\"fublj\"],\"internalMetricName\":\"xqeofjaeqjhqjba\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"mjqulngsn\",\"sourceMdmNamespace\":\"bybkzgcwrwclxx\",\"dimensions\":[{},{}],\"aggregationType\":\"douskcqvkocrcjdk\",\"fillGapWithZero\":false,\"category\":\"xbnjbiksq\",\"resourceIdDimensionNameOverride\":\"lssai\",\"isInternal\":false}],\"logSpecifications\":[{\"name\":\"zlljfmppeebvm\",\"displayName\":\"sabkyqduujitcjcz\"},{\"name\":\"evndh\",\"displayName\":\"wpdappdsbdkv\"},{\"name\":\"wjfeusnhutjel\",\"displayName\":\"rl\"},{\"name\":\"ugjzzdatqxhocdge\",\"displayName\":\"lgphu\"}]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("rd", model.name()); - Assertions.assertEquals("ewnwreitjzyfl", model.display().provider()); - Assertions.assertEquals("arhmofcqhsmy", model.display().resource()); - Assertions.assertEquals("kdtmlxhekuk", model.display().operation()); - Assertions.assertEquals("txukcdmp", model.display().description()); - Assertions.assertEquals("cryuan", model.origin()); - Assertions.assertEquals("xtayr", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("m", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fp", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qobmtukk", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("fxti", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("pzvgnwzsymglzufc", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hdbihan", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("hfcbjysa", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("xwczbyscnp", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("uhivyqniw", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("zlljfmppeebvm", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("sabkyqduujitcjcz", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("rd") - .withDisplay(new OperationDisplay().withProvider("ewnwreitjzyfl") - .withResource("arhmofcqhsmy") - .withOperation("kdtmlxhekuk") - .withDescription("txukcdmp")) - .withOrigin("cryuan") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList(new MetricSpecification().withName("xtayr") - .withDisplayName("m") - .withDisplayDescription("fp") - .withUnit("qobmtukk") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("fxti")) - .withInternalMetricName("pzvgnwzsymglzufc") - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("hdbihan") - .withSourceMdmNamespace("hfcbjysa") - .withDimensions(Arrays.asList(new Dimension())) - .withAggregationType("xqhabi") - .withFillGapWithZero(false) - .withCategory("xwczbyscnp") - .withResourceIdDimensionNameOverride("uhivyqniw") - .withIsInternal(false), - new MetricSpecification().withName("k") - .withDisplayName("dumjgrtfwvuk") - .withDisplayDescription("audccsnhs") - .withUnit("nyejhkryhtnap") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("yemkkvnip")) - .withInternalMetricName("xzjnchgejs") - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("ailzydehojwyahu") - .withSourceMdmNamespace("npmqnjaqwixjspro") - .withDimensions( - Arrays.asList(new Dimension(), new Dimension(), new Dimension(), new Dimension())) - .withAggregationType("utegjvwmfdats") - .withFillGapWithZero(true) - .withCategory("pjhulsuuvmkj") - .withResourceIdDimensionNameOverride("k") - .withIsInternal(false), - new MetricSpecification().withName("dio") - .withDisplayName("pslwejdpvw") - .withDisplayDescription("oqpsoa") - .withUnit("tazak") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("yffdfdos", "gexpaojakhmsbz", "hcrzevd")) - .withInternalMetricName("lxaolthqtrgqjbp") - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("inzgvfcj") - .withSourceMdmNamespace("zoxxjtf") - .withDimensions( - Arrays.asList(new Dimension(), new Dimension(), new Dimension(), new Dimension())) - .withAggregationType("wfzitonpeqfpjk") - .withFillGapWithZero(true) - .withCategory("fpdvhpfxxypi") - .withResourceIdDimensionNameOverride("nmayhuybb") - .withIsInternal(true), - new MetricSpecification().withName("epoo") - .withDisplayName("nuvamiheogna") - .withDisplayDescription("zxtheotusivyevcc") - .withUnit("ihnhun") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("gxg", "spemvtzfk", "fublj")) - .withInternalMetricName("xqeofjaeqjhqjba") - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("mjqulngsn") - .withSourceMdmNamespace("bybkzgcwrwclxx") - .withDimensions(Arrays.asList(new Dimension(), new Dimension())) - .withAggregationType("douskcqvkocrcjdk") - .withFillGapWithZero(false) - .withCategory("xbnjbiksq") - .withResourceIdDimensionNameOverride("lssai") - .withIsInternal(false))) - .withLogSpecifications( - Arrays.asList(new LogSpecification().withName("zlljfmppeebvm").withDisplayName("sabkyqduujitcjcz"), - new LogSpecification().withName("evndh").withDisplayName("wpdappdsbdkv"), - new LogSpecification().withName("wjfeusnhutjel").withDisplayName("rl"), - new LogSpecification().withName("ugjzzdatqxhocdge").withDisplayName("lgphu")))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("rd", model.name()); - Assertions.assertEquals("ewnwreitjzyfl", model.display().provider()); - Assertions.assertEquals("arhmofcqhsmy", model.display().resource()); - Assertions.assertEquals("kdtmlxhekuk", model.display().operation()); - Assertions.assertEquals("txukcdmp", model.display().description()); - Assertions.assertEquals("cryuan", model.origin()); - Assertions.assertEquals("xtayr", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("m", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("fp", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qobmtukk", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("fxti", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("pzvgnwzsymglzufc", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hdbihan", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("hfcbjysa", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("xqhabi", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("xwczbyscnp", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("uhivyqniw", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("zlljfmppeebvm", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("sabkyqduujitcjcz", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationListResultTests.java deleted file mode 100644 index 65c3cf79d34af..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationListResultTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.OperationInner; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.OperationDisplay; -import com.azure.resourcemanager.netapp.models.OperationListResult; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"ownoizhw\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{}]}}},{\"name\":\"qijgkd\",\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"origin\":\"kwm\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}],\"logSpecifications\":[{},{},{},{}]}}},{\"name\":\"to\",\"display\":{\"provider\":\"a\",\"resource\":\"ajpsquc\",\"operation\":\"o\",\"description\":\"dkfo\"},\"origin\":\"nygj\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}],\"logSpecifications\":[{}]}}}]}") - .toObject(OperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult().withValue(Arrays.asList( - new OperationInner().withName("quvgjxpybczme") - .withDisplay(new OperationDisplay().withProvider("zopbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withOrigin("ownoizhw") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList(new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification()))), - new OperationInner().withName("qijgkd") - .withDisplay(new OperationDisplay().withProvider("azlobcufpdznrbt") - .withResource("qjnqglhqgnufoooj") - .withOperation("ifsqesaagdfmg") - .withDescription("lhjxr")) - .withOrigin("kwm") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList(new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications(Arrays.asList(new LogSpecification(), new LogSpecification(), - new LogSpecification(), new LogSpecification()))), - new OperationInner().withName("to") - .withDisplay(new OperationDisplay().withProvider("a") - .withResource("ajpsquc") - .withOperation("o") - .withDescription("dkfo")) - .withOrigin("nygj") - .withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications( - Arrays.asList(new MetricSpecification(), new MetricSpecification(), new MetricSpecification())) - .withLogSpecifications(Arrays.asList(new LogSpecification()))))); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals("ownoizhw", model.value().get(0).origin()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationPropertiesTests.java deleted file mode 100644 index 86941fee3f2d7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.OperationProperties; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = BinaryData.fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"basyy\",\"displayName\":\"ddhsgcbacphe\",\"displayDescription\":\"ot\",\"unit\":\"qgoulznd\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"kgfg\",\"bmadgak\",\"qsrxybzqqed\"],\"internalMetricName\":\"tbciqfouflmm\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"modmglougpb\",\"sourceMdmNamespace\":\"tmut\",\"dimensions\":[{\"name\":\"ta\",\"displayName\":\"pwgcuertu\"},{\"name\":\"dosvqwhbmdgbbjf\",\"displayName\":\"gmbmbexppbh\"},{\"name\":\"qrolfpf\",\"displayName\":\"algbquxigjyjg\"},{\"name\":\"aoyfhrtxilnerkuj\",\"displayName\":\"vlejuvfqa\"}],\"aggregationType\":\"lyxwjkcprbnwbx\",\"fillGapWithZero\":false,\"category\":\"bvpyss\",\"resourceIdDimensionNameOverride\":\"nruj\",\"isInternal\":true},{\"name\":\"muouqfp\",\"displayName\":\"zw\",\"displayDescription\":\"g\",\"unit\":\"tnwu\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"fizuckyf\",\"hr\",\"idf\"],\"internalMetricName\":\"wdzuhtymwisd\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"wxmnteiwao\",\"sourceMdmNamespace\":\"km\",\"dimensions\":[{\"name\":\"mxdcufufsrp\",\"displayName\":\"zidnsezcxtbzsgfy\"}],\"aggregationType\":\"sne\",\"fillGapWithZero\":true,\"category\":\"z\",\"resourceIdDimensionNameOverride\":\"iachbo\",\"isInternal\":true},{\"name\":\"nrosfqpte\",\"displayName\":\"zzvypyqrimzinp\",\"displayDescription\":\"wjdk\",\"unit\":\"soodqxhcrmnoh\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"soifiyipjxsqw\",\"gr\",\"bznorcjxvsnby\"],\"internalMetricName\":\"abnmocpcyshu\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"bl\",\"sourceMdmNamespace\":\"gpbtoqcjmklj\",\"dimensions\":[{\"name\":\"idtqajzyu\",\"displayName\":\"kudjkrlkhb\"},{\"name\":\"fepgzgq\",\"displayName\":\"zloc\"}],\"aggregationType\":\"c\",\"fillGapWithZero\":true,\"category\":\"rhhbcs\",\"resourceIdDimensionNameOverride\":\"ummajtjaod\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"xkqpxo\",\"displayName\":\"jionpimexgstxgc\"},{\"name\":\"dg\",\"displayName\":\"ajrmvdjwzrlovmc\"},{\"name\":\"hijco\",\"displayName\":\"ctbzaq\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("basyy", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ddhsgcbacphe", - model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ot", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qgoulznd", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("kgfg", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("tbciqfouflmm", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("modmglougpb", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("tmut", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ta", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("pwgcuertu", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("lyxwjkcprbnwbx", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("bvpyss", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("nruj", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("xkqpxo", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jionpimexgstxgc", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = new OperationProperties().withServiceSpecification(new ServiceSpecification() - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("basyy") - .withDisplayName("ddhsgcbacphe") - .withDisplayDescription("ot") - .withUnit("qgoulznd") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("kgfg", "bmadgak", "qsrxybzqqed")) - .withInternalMetricName("tbciqfouflmm") - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("modmglougpb") - .withSourceMdmNamespace("tmut") - .withDimensions(Arrays.asList(new Dimension().withName("ta").withDisplayName("pwgcuertu"), - new Dimension().withName("dosvqwhbmdgbbjf").withDisplayName("gmbmbexppbh"), - new Dimension().withName("qrolfpf").withDisplayName("algbquxigjyjg"), - new Dimension().withName("aoyfhrtxilnerkuj").withDisplayName("vlejuvfqa"))) - .withAggregationType("lyxwjkcprbnwbx") - .withFillGapWithZero(false) - .withCategory("bvpyss") - .withResourceIdDimensionNameOverride("nruj") - .withIsInternal(true), - new MetricSpecification().withName("muouqfp") - .withDisplayName("zw") - .withDisplayDescription("g") - .withUnit("tnwu") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("fizuckyf", "hr", "idf")) - .withInternalMetricName("wdzuhtymwisd") - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("wxmnteiwao") - .withSourceMdmNamespace("km") - .withDimensions( - Arrays.asList(new Dimension().withName("mxdcufufsrp").withDisplayName("zidnsezcxtbzsgfy"))) - .withAggregationType("sne") - .withFillGapWithZero(true) - .withCategory("z") - .withResourceIdDimensionNameOverride("iachbo") - .withIsInternal(true), - new MetricSpecification().withName("nrosfqpte") - .withDisplayName("zzvypyqrimzinp") - .withDisplayDescription("wjdk") - .withUnit("soodqxhcrmnoh") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("soifiyipjxsqw", "gr", "bznorcjxvsnby")) - .withInternalMetricName("abnmocpcyshu") - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("bl") - .withSourceMdmNamespace("gpbtoqcjmklj") - .withDimensions(Arrays.asList(new Dimension().withName("idtqajzyu").withDisplayName("kudjkrlkhb"), - new Dimension().withName("fepgzgq").withDisplayName("zloc"))) - .withAggregationType("c") - .withFillGapWithZero(true) - .withCategory("rhhbcs") - .withResourceIdDimensionNameOverride("ummajtjaod") - .withIsInternal(true))) - .withLogSpecifications( - Arrays.asList(new LogSpecification().withName("xkqpxo").withDisplayName("jionpimexgstxgc"), - new LogSpecification().withName("dg").withDisplayName("ajrmvdjwzrlovmc"), - new LogSpecification().withName("hijco").withDisplayName("ctbzaq")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("basyy", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ddhsgcbacphe", - model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("ot", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qgoulznd", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("kgfg", - model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("tbciqfouflmm", - model.serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, - model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("modmglougpb", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("tmut", - model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ta", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("pwgcuertu", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("lyxwjkcprbnwbx", - model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("bvpyss", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("nruj", - model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("xkqpxo", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("jionpimexgstxgc", - model.serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java deleted file mode 100644 index 5e006dafdab70..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OperationsListMockTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"jvpglydzgk\",\"display\":{\"provider\":\"eevt\",\"resource\":\"pryu\",\"operation\":\"wytpzdmovz\",\"description\":\"va\"},\"origin\":\"zqadf\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"glae\",\"displayName\":\"ndtic\",\"displayDescription\":\"pvz\",\"unit\":\"qtmldgxo\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"pkc\"],\"internalMetricName\":\"yzriykhy\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"jlb\",\"sourceMdmNamespace\":\"qvkjlmxho\",\"dimensions\":[{},{},{}],\"aggregationType\":\"hdwdi\",\"fillGapWithZero\":true,\"category\":\"nraauzz\",\"resourceIdDimensionNameOverride\":\"jazysdzhezwwvaiq\",\"isInternal\":false},{\"name\":\"fonkphhqyikvyla\",\"displayName\":\"avluwmncs\",\"displayDescription\":\"ijf\",\"unit\":\"vpo\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"gbdhuzqgnjdg\",\"ynscl\"],\"internalMetricName\":\"hzvhxnkomtkubo\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"vdxzxhihfrbbc\",\"sourceMdmNamespace\":\"qagt\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"lfkqojpy\",\"fillGapWithZero\":false,\"category\":\"rdcnifmzzsdy\",\"resourceIdDimensionNameOverride\":\"rnysux\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"g\",\"displayName\":\"hocxvdfffwafqrou\"},{\"name\":\"spave\",\"displayName\":\"r\"},{\"name\":\"bunzozudh\",\"displayName\":\"gkmoyxcdyuibhmfd\"},{\"name\":\"zydvfvf\",\"displayName\":\"naeo\"}]}}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jvpglydzgk", response.iterator().next().name()); - Assertions.assertEquals("eevt", response.iterator().next().display().provider()); - Assertions.assertEquals("pryu", response.iterator().next().display().resource()); - Assertions.assertEquals("wytpzdmovz", response.iterator().next().display().operation()); - Assertions.assertEquals("va", response.iterator().next().display().description()); - Assertions.assertEquals("zqadf", response.iterator().next().origin()); - Assertions.assertEquals("glae", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("ndtic", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("pvz", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("qtmldgxo", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - response.iterator() - .next() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions.assertEquals("pkc", - response.iterator() - .next() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions.assertEquals("yzriykhy", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(true, - response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("jlb", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("qvkjlmxho", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("hdwdi", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(true, - response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("nraauzz", - response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("jazysdzhezwwvaiq", - response.iterator() - .next() - .serviceSpecification() - .metricSpecifications() - .get(0) - .resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, - response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("g", - response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("hocxvdfffwafqrou", - response.iterator().next().serviceSpecification().logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java deleted file mode 100644 index 03b62398d4bc8..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolChangeRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import org.junit.jupiter.api.Assertions; - -public final class PoolChangeRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolChangeRequest model - = BinaryData.fromString("{\"newPoolResourceId\":\"t\"}").toObject(PoolChangeRequest.class); - Assertions.assertEquals("t", model.newPoolResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("t"); - model = BinaryData.fromObject(model).toObject(PoolChangeRequest.class); - Assertions.assertEquals("t", model.newPoolResourceId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java deleted file mode 100644 index f94815bbd57d5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPatchPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties; -import com.azure.resourcemanager.netapp.models.QosType; -import org.junit.jupiter.api.Assertions; - -public final class PoolPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolPatchProperties model - = BinaryData.fromString("{\"size\":7642090703106785822,\"qosType\":\"Manual\",\"coolAccess\":true}") - .toObject(PoolPatchProperties.class); - Assertions.assertEquals(7642090703106785822L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolPatchProperties model - = new PoolPatchProperties().withSize(7642090703106785822L).withQosType(QosType.MANUAL).withCoolAccess(true); - model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(7642090703106785822L, model.size()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(true, model.coolAccess()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java deleted file mode 100644 index 015b46c9d3eab..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.PoolProperties; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import org.junit.jupiter.api.Assertions; - -public final class PoolPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PoolProperties model = BinaryData.fromString( - "{\"poolId\":\"ro\",\"size\":4284842638181152780,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"rmcqiby\",\"totalThroughputMibps\":97.50943,\"utilizedThroughputMibps\":0.45861602,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"}") - .toObject(PoolProperties.class); - Assertions.assertEquals(4284842638181152780L, model.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PoolProperties model = new PoolProperties().withSize(4284842638181152780L) - .withServiceLevel(ServiceLevel.STANDARD_ZRS) - .withQosType(QosType.MANUAL) - .withCoolAccess(false) - .withEncryptionType(EncryptionType.DOUBLE); - model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(4284842638181152780L, model.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 29ac150da531f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"etag\":\"ftxfkf\",\"properties\":{\"poolId\":\"gpr\",\"size\":3590995156465983687,\"serviceLevel\":\"Standard\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":86.32173,\"utilizedThroughputMibps\":61.287212,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"location\":\"bra\",\"tags\":{\"qzmiza\":\"ibph\",\"ankjpdnjzh\":\"a\"},\"id\":\"joylh\",\"name\":\"lmuoyxprimrsopte\",\"type\":\"cjmeislstvasy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CapacityPool response = manager.pools() - .define("oylaxxul") - .withRegion("btmvpdvjdhttza") - .withExistingNetAppAccount("aaeranokqgukk", "qnvb") - .withSize(3166275760865387668L) - .withServiceLevel(ServiceLevel.STANDARD) - .withTags(mapOf("rphkmcrjdqnsdfz", "dxihc", "gkylkdghr", "bg", "kvbwnhhtqlgeh", "euutlwxezwzh", "vgcxtx", - "ppipifhpfeoa")) - .withQosType(QosType.MANUAL) - .withCoolAccess(true) - .withEncryptionType(EncryptionType.DOUBLE) - .create(); - - Assertions.assertEquals("bra", response.location()); - Assertions.assertEquals("ibph", response.tags().get("qzmiza")); - Assertions.assertEquals(3590995156465983687L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, response.qosType()); - Assertions.assertEquals(true, response.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java deleted file mode 100644 index 62a43802ee8dc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"etag\":\"sawddjibabxvi\",\"properties\":{\"poolId\":\"tvtzeexavoxtfg\",\"size\":1664959543187176928,\"serviceLevel\":\"Premium\",\"provisioningState\":\"dqbwpypqtgsfja\",\"totalThroughputMibps\":60.76816,\"utilizedThroughputMibps\":30.688173,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"odhtnsirudhzm\",\"tags\":{\"rcxfailcfxwmdb\":\"ckdlpag\",\"lnacgcc\":\"xdfgsftufqobr\"},\"id\":\"knh\",\"name\":\"kizvytn\",\"type\":\"zvulj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CapacityPool response - = manager.pools().getWithResponse("cuijpxt", "s", "wprtu", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("odhtnsirudhzm", response.location()); - Assertions.assertEquals("ckdlpag", response.tags().get("rcxfailcfxwmdb")); - Assertions.assertEquals(1664959543187176928L, response.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, response.serviceLevel()); - Assertions.assertEquals(QosType.AUTO, response.qosType()); - Assertions.assertEquals(false, response.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java deleted file mode 100644 index ca3cea65fc613..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.CapacityPool; -import com.azure.resourcemanager.netapp.models.EncryptionType; -import com.azure.resourcemanager.netapp.models.QosType; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PoolsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"qgatjeaahhvjhhn\",\"properties\":{\"poolId\":\"zybbj\",\"size\":5643077949136379172,\"serviceLevel\":\"Standard\",\"provisioningState\":\"syxkyxvxevblb\",\"totalThroughputMibps\":18.978483,\"utilizedThroughputMibps\":70.981125,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"location\":\"ulxunsmjbnkpp\",\"tags\":{\"rmffeyc\":\"enlsvxeizzgwkln\",\"iymerteeammxqi\":\"ckt\",\"zddrt\":\"kk\"},\"id\":\"g\",\"name\":\"ojbmxv\",\"type\":\"vrefdeesv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.pools().list("ddyvvjskgfmo", "wa", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ulxunsmjbnkpp", response.iterator().next().location()); - Assertions.assertEquals("enlsvxeizzgwkln", response.iterator().next().tags().get("rmffeyc")); - Assertions.assertEquals(5643077949136379172L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.STANDARD, response.iterator().next().serviceLevel()); - Assertions.assertEquals(QosType.MANUAL, response.iterator().next().qosType()); - Assertions.assertEquals(false, response.iterator().next().coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, response.iterator().next().encryptionType()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java deleted file mode 100644 index 4b418c5506191..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; -import org.junit.jupiter.api.Assertions; - -public final class QueryNetworkSiblingSetRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QueryNetworkSiblingSetRequest model - = BinaryData.fromString("{\"networkSiblingSetId\":\"uujqgidokgjljyo\",\"subnetId\":\"gvcl\"}") - .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("uujqgidokgjljyo", model.networkSiblingSetId()); - Assertions.assertEquals("gvcl", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("uujqgidokgjljyo").withSubnetId("gvcl"); - model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("uujqgidokgjljyo", model.networkSiblingSetId()); - Assertions.assertEquals("gvcl", model.subnetId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java deleted file mode 100644 index e53c175ac83b6..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaAvailabilityRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes; -import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class QuotaAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"lhzdobp\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes\",\"resourceGroup\":\"mflbv\"}") - .toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("lhzdobp", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES, - model.type()); - Assertions.assertEquals("mflbv", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("lhzdobp") - .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) - .withResourceGroup("mflbv"); - model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("lhzdobp", model.name()); - Assertions.assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES, - model.type()); - Assertions.assertEquals("mflbv", model.resourceGroup()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java deleted file mode 100644 index df5895aa229e7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReestablishReplicationRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; -import org.junit.jupiter.api.Assertions; - -public final class ReestablishReplicationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReestablishReplicationRequest model = BinaryData.fromString("{\"sourceVolumeId\":\"gxysmocmbqfqvm\"}") - .toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("gxysmocmbqfqvm", model.sourceVolumeId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("gxysmocmbqfqvm"); - model = BinaryData.fromObject(model).toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("gxysmocmbqfqvm", model.sourceVolumeId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java deleted file mode 100644 index be85868daaacc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoAvailabilityZoneMappingsItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfoAvailabilityZoneMappingsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfoAvailabilityZoneMappingsItem model - = BinaryData.fromString("{\"availabilityZone\":\"fbishcbkha\",\"isAvailable\":false}") - .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("fbishcbkha", model.availabilityZone()); - Assertions.assertEquals(false, model.isAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfoAvailabilityZoneMappingsItem model - = new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fbishcbkha").withIsAvailable(false); - model = BinaryData.fromObject(model).toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("fbishcbkha", model.availabilityZone()); - Assertions.assertEquals(false, model.isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java deleted file mode 100644 index 1a62697c13984..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfoInner model = BinaryData.fromString( - "{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"c\",\"isAvailable\":true},{\"availabilityZone\":\"sdpydnfyhxdeoejz\",\"isAvailable\":false},{\"availabilityZone\":\"fsj\",\"isAvailable\":true}]}") - .toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.storageToNetworkProximity()); - Assertions.assertEquals("c", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfoInner model - = new RegionInfoInner().withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("c").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("sdpydnfyhxdeoejz") - .withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fsj").withIsAvailable(true))); - model = BinaryData.fromObject(model).toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.storageToNetworkProximity()); - Assertions.assertEquals("c", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java deleted file mode 100644 index 011c73568ad8e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfoResourceInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfoResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfoResourceInner model = BinaryData.fromString( - "{\"properties\":{\"storageToNetworkProximity\":\"T2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"nkymuctqhjfbebrj\",\"isAvailable\":true},{\"availabilityZone\":\"fuwutttxf\",\"isAvailable\":false},{\"availabilityZone\":\"i\",\"isAvailable\":true}]},\"id\":\"epcyvahfnlj\",\"name\":\"yq\",\"type\":\"j\"}") - .toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T2, model.storageToNetworkProximity()); - Assertions.assertEquals("nkymuctqhjfbebrj", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfoResourceInner model = new RegionInfoResourceInner() - .withStorageToNetworkProximity(RegionStorageToNetworkProximity.T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("nkymuctqhjfbebrj") - .withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("fuwutttxf").withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("i").withIsAvailable(true))); - model = BinaryData.fromObject(model).toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T2, model.storageToNetworkProximity()); - Assertions.assertEquals("nkymuctqhjfbebrj", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.availabilityZoneMappings().get(0).isAvailable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java deleted file mode 100644 index 22ea9c7ca4173..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner; -import com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem; -import com.azure.resourcemanager.netapp.models.RegionInfosList; -import com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegionInfosListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionInfosList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"g\",\"isAvailable\":true},{\"availabilityZone\":\"uxwgipwho\",\"isAvailable\":false},{\"availabilityZone\":\"gshwankixz\",\"isAvailable\":true},{\"availabilityZone\":\"eputtmrywnuzoqf\",\"isAvailable\":true}]},\"id\":\"zrnkcqvyxlwh\",\"name\":\"lsicohoqqnwv\",\"type\":\"ryavwhheunmmqh\"},{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ocukoklyax\",\"isAvailable\":false},{\"availabilityZone\":\"uqszfk\",\"isAvailable\":true}]},\"id\":\"ewrmjmwvvjektc\",\"name\":\"senhwlrs\",\"type\":\"frzpwvlqdqgb\"}],\"nextLink\":\"ylihkaetckt\"}") - .toObject(RegionInfosList.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("g", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("ylihkaetckt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionInfosList model = new RegionInfosList().withValue(Arrays.asList(new RegionInfoResourceInner() - .withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("g").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("uxwgipwho").withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("gshwankixz").withIsAvailable(true), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("eputtmrywnuzoqf") - .withIsAvailable(true))), - new RegionInfoResourceInner().withStorageToNetworkProximity(RegionStorageToNetworkProximity.T1) - .withAvailabilityZoneMappings(Arrays.asList( - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("ocukoklyax") - .withIsAvailable(false), - new RegionInfoAvailabilityZoneMappingsItem().withAvailabilityZone("uqszfk") - .withIsAvailable(true))))) - .withNextLink("ylihkaetckt"); - model = BinaryData.fromObject(model).toObject(RegionInfosList.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, - model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("g", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertEquals(true, model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("ylihkaetckt", model.nextLink()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java deleted file mode 100644 index 4aaec6009f519..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationInner model = BinaryData.fromString( - "{\"endpointType\":\"src\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"yuq\",\"remoteVolumeRegion\":\"pqlpq\"}") - .toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replicationSchedule()); - Assertions.assertEquals("yuq", model.remoteVolumeResourceId()); - Assertions.assertEquals("pqlpq", model.remoteVolumeRegion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationInner model = new ReplicationInner().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY) - .withRemoteVolumeResourceId("yuq") - .withRemoteVolumeRegion("pqlpq"); - model = BinaryData.fromObject(model).toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replicationSchedule()); - Assertions.assertEquals("yuq", model.remoteVolumeResourceId()); - Assertions.assertEquals("pqlpq", model.remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java deleted file mode 100644 index 8e67c197541bf..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ReplicationObject; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationObject model = BinaryData.fromString( - "{\"replicationId\":\"hxcr\",\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"asrru\",\"remoteVolumeRegion\":\"bhsqfsubcgjbirxb\"}") - .toObject(ReplicationObject.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("asrru", model.remoteVolumeResourceId()); - Assertions.assertEquals("bhsqfsubcgjbirxb", model.remoteVolumeRegion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationObject model = new ReplicationObject().withEndpointType(EndpointType.SRC) - .withReplicationSchedule(ReplicationSchedule.DAILY) - .withRemoteVolumeResourceId("asrru") - .withRemoteVolumeRegion("bhsqfsubcgjbirxb"); - model = BinaryData.fromObject(model).toObject(ReplicationObject.class); - Assertions.assertEquals(EndpointType.SRC, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("asrru", model.remoteVolumeResourceId()); - Assertions.assertEquals("bhsqfsubcgjbirxb", model.remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java deleted file mode 100644 index 07230eb3b9609..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationStatusInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import org.junit.jupiter.api.Assertions; - -public final class ReplicationStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationStatusInner model = BinaryData.fromString( - "{\"healthy\":false,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Broken\",\"totalProgress\":\"helxprglya\",\"errorMessage\":\"dckcbc\"}") - .toObject(ReplicationStatusInner.class); - Assertions.assertEquals(false, model.healthy()); - Assertions.assertEquals(RelationshipStatus.TRANSFERRING, model.relationshipStatus()); - Assertions.assertEquals(MirrorState.BROKEN, model.mirrorState()); - Assertions.assertEquals("helxprglya", model.totalProgress()); - Assertions.assertEquals("dckcbc", model.errorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationStatusInner model = new ReplicationStatusInner().withHealthy(false) - .withRelationshipStatus(RelationshipStatus.TRANSFERRING) - .withMirrorState(MirrorState.BROKEN) - .withTotalProgress("helxprglya") - .withErrorMessage("dckcbc"); - model = BinaryData.fromObject(model).toObject(ReplicationStatusInner.class); - Assertions.assertEquals(false, model.healthy()); - Assertions.assertEquals(RelationshipStatus.TRANSFERRING, model.relationshipStatus()); - Assertions.assertEquals(MirrorState.BROKEN, model.mirrorState()); - Assertions.assertEquals("helxprglya", model.totalProgress()); - Assertions.assertEquals("dckcbc", model.errorMessage()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java deleted file mode 100644 index fb22e1b2d7939..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.CheckNameResourceTypes; -import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class ResourceNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceNameAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"d\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"atkpnp\"}") - .toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("d", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("atkpnp", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("d") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("atkpnp"); - model = BinaryData.fromObject(model).toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("d", model.name()); - Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("atkpnp", model.resourceGroup()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java deleted file mode 100644 index 5bb24fb5fe692..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RestoreStatusInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner; - -public final class RestoreStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestoreStatusInner model = BinaryData.fromString( - "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"emvvhm\",\"errorMessage\":\"drjf\",\"totalTransferBytes\":6646451916229099217}") - .toObject(RestoreStatusInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestoreStatusInner model = new RestoreStatusInner(); - model = BinaryData.fromObject(model).toObject(RestoreStatusInner.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ServiceSpecificationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ServiceSpecificationTests.java deleted file mode 100644 index a04135dc83517..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Dimension; -import com.azure.resourcemanager.netapp.models.LogSpecification; -import com.azure.resourcemanager.netapp.models.MetricAggregationType; -import com.azure.resourcemanager.netapp.models.MetricSpecification; -import com.azure.resourcemanager.netapp.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = BinaryData.fromString( - "{\"metricSpecifications\":[{\"name\":\"cbkbfkg\",\"displayName\":\"dkexxppofm\",\"displayDescription\":\"x\",\"unit\":\"jpgd\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"pmouexhdz\",\"i\",\"qeojnxqbzvddntw\",\"deicbtwnpzao\"],\"internalMetricName\":\"uhrhcffcyddgl\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"jqkwpyeicx\",\"sourceMdmNamespace\":\"ciwqvhk\",\"dimensions\":[{\"name\":\"igdtopbob\",\"displayName\":\"ghmewuam\"},{\"name\":\"hrzayvvtpgvdf\",\"displayName\":\"otkftutqxlngx\"},{\"name\":\"fgugnxkrxdqmid\",\"displayName\":\"hzrvqd\"}],\"aggregationType\":\"bhj\",\"fillGapWithZero\":false,\"category\":\"ehoqfbowskan\",\"resourceIdDimensionNameOverride\":\"tzlcuiywgqywgn\",\"isInternal\":true},{\"name\":\"nhzgpphrcgyn\",\"displayName\":\"cpecfvmmcoofs\",\"displayDescription\":\"zevgb\",\"unit\":\"jqabcypmivkwlzuv\",\"supportedAggregationTypes\":[\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"bacfionlebxetq\",\"tzxdpnqbqqwx\"],\"internalMetricName\":\"feallnwsu\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"jampmngnzscxaqw\",\"sourceMdmNamespace\":\"chcbonqvpkvlrxnj\",\"dimensions\":[{\"name\":\"ipheoflokeyyien\",\"displayName\":\"dlwtgrhpdj\"},{\"name\":\"umasxazjpq\",\"displayName\":\"gual\"}],\"aggregationType\":\"xxhejjzzvd\",\"fillGapWithZero\":true,\"category\":\"dslfhotwmcy\",\"resourceIdDimensionNameOverride\":\"wlbjnpgacftade\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"fsoppusuesnzw\",\"displayName\":\"jbavorxzdm\"},{\"name\":\"ctbqvudwx\",\"displayName\":\"dnvowg\"},{\"name\":\"jugwdkcglhsl\",\"displayName\":\"jdyggdtji\"},{\"name\":\"b\",\"displayName\":\"ofqweykhmenevfye\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("cbkbfkg", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("dkexxppofm", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("x", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("jpgd", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("pmouexhdz", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("uhrhcffcyddgl", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("jqkwpyeicx", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("ciwqvhk", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("igdtopbob", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("ghmewuam", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("bhj", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("ehoqfbowskan", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("tzlcuiywgqywgn", - model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("fsoppusuesnzw", model.logSpecifications().get(0).name()); - Assertions.assertEquals("jbavorxzdm", model.logSpecifications().get(0).displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = new ServiceSpecification() - .withMetricSpecifications(Arrays.asList( - new MetricSpecification().withName("cbkbfkg") - .withDisplayName("dkexxppofm") - .withDisplayDescription("x") - .withUnit("jpgd") - .withSupportedAggregationTypes(Arrays.asList(MetricAggregationType.AVERAGE, - MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("pmouexhdz", "i", "qeojnxqbzvddntw", "deicbtwnpzao")) - .withInternalMetricName("uhrhcffcyddgl") - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("jqkwpyeicx") - .withSourceMdmNamespace("ciwqvhk") - .withDimensions( - Arrays.asList(new Dimension().withName("igdtopbob").withDisplayName("ghmewuam"), - new Dimension().withName("hrzayvvtpgvdf").withDisplayName("otkftutqxlngx"), - new Dimension().withName("fgugnxkrxdqmid").withDisplayName("hzrvqd"))) - .withAggregationType("bhj") - .withFillGapWithZero(false) - .withCategory("ehoqfbowskan") - .withResourceIdDimensionNameOverride("tzlcuiywgqywgn") - .withIsInternal(true), - new MetricSpecification().withName("nhzgpphrcgyn") - .withDisplayName("cpecfvmmcoofs") - .withDisplayDescription("zevgb") - .withUnit("jqabcypmivkwlzuv") - .withSupportedAggregationTypes( - Arrays.asList(MetricAggregationType.AVERAGE, MetricAggregationType.AVERAGE)) - .withSupportedTimeGrainTypes(Arrays.asList("bacfionlebxetq", "tzxdpnqbqqwx")) - .withInternalMetricName("feallnwsu") - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("jampmngnzscxaqw") - .withSourceMdmNamespace("chcbonqvpkvlrxnj") - .withDimensions( - Arrays.asList(new Dimension().withName("ipheoflokeyyien").withDisplayName("dlwtgrhpdj"), - new Dimension().withName("umasxazjpq").withDisplayName("gual"))) - .withAggregationType("xxhejjzzvd") - .withFillGapWithZero(true) - .withCategory("dslfhotwmcy") - .withResourceIdDimensionNameOverride("wlbjnpgacftade") - .withIsInternal(true))) - .withLogSpecifications( - Arrays.asList(new LogSpecification().withName("fsoppusuesnzw").withDisplayName("jbavorxzdm"), - new LogSpecification().withName("ctbqvudwx").withDisplayName("dnvowg"), - new LogSpecification().withName("jugwdkcglhsl").withDisplayName("jdyggdtji"), - new LogSpecification().withName("b").withDisplayName("ofqweykhmenevfye"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("cbkbfkg", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("dkexxppofm", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("x", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("jpgd", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(MetricAggregationType.AVERAGE, - model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("pmouexhdz", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals("uhrhcffcyddgl", model.metricSpecifications().get(0).internalMetricName()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("jqkwpyeicx", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("ciwqvhk", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("igdtopbob", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("ghmewuam", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("bhj", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("ehoqfbowskan", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("tzlcuiywgqywgn", - model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("fsoppusuesnzw", model.logSpecifications().get(0).name()); - Assertions.assertEquals("jbavorxzdm", model.logSpecifications().get(0).displayName()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java deleted file mode 100644 index 847ee03bf4b3a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotInner model = BinaryData.fromString( - "{\"location\":\"gsyocogj\",\"properties\":{\"snapshotId\":\"tbnnha\",\"created\":\"2021-08-07T12:30:48Z\",\"provisioningState\":\"rkvcikhnvpa\"},\"id\":\"gxqquezik\",\"name\":\"wggxkallat\",\"type\":\"elwuipi\"}") - .toObject(SnapshotInner.class); - Assertions.assertEquals("gsyocogj", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotInner model = new SnapshotInner().withLocation("gsyocogj"); - model = BinaryData.fromObject(model).toObject(SnapshotInner.class); - Assertions.assertEquals("gsyocogj", model.location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java deleted file mode 100644 index 26b3bc333f896..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesCreateWithResponseMockTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.SnapshotPolicy; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"etag\":\"tft\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1034709707,\"minute\":498260807,\"usedBytes\":5239547603354777125},\"dailySchedule\":{\"snapshotsToKeep\":1037799347,\"hour\":1872397233,\"minute\":505151536,\"usedBytes\":3502756066973311769},\"weeklySchedule\":{\"snapshotsToKeep\":1808572524,\"day\":\"ipgawtxx\",\"hour\":156137612,\"minute\":2059766507,\"usedBytes\":8743829512964463352},\"monthlySchedule\":{\"snapshotsToKeep\":607861165,\"daysOfMonth\":\"tfmpcycilrmcayk\",\"hour\":297687924,\"minute\":275753325,\"usedBytes\":3377592071635505398},\"enabled\":false,\"provisioningState\":\"xwpndfcpf\"},\"location\":\"nthjtwkjaosrxuzv\",\"tags\":{\"mgbzahgxqdlyrtl\":\"ktcqio\",\"katbhjm\":\"laprlt\",\"arvlagunbt\":\"nnbsoqeqa\",\"av\":\"febwlnbmhyreeudz\"},\"id\":\"pdqmjxlyyzglgouw\",\"name\":\"lmjjyuo\",\"type\":\"qtobaxkjeyt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SnapshotPolicy response = manager.snapshotPolicies() - .define("qwhix") - .withRegion("crwnamikz") - .withExistingNetAppAccount("gehkfkimrtixokff", "yinljqe") - .withTags(mapOf("ziqgfuh", "qbsms", "hczznvf", "kzruswh", "wwixzvumw", "ycjsx")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2089696921) - .withMinute(1519805829) - .withUsedBytes(4952257041034089193L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1065880701) - .withHour(1806892496) - .withMinute(667519337) - .withUsedBytes(3451295234524077317L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1949096000) - .withDay("b") - .withHour(1840305152) - .withMinute(1547135133) - .withUsedBytes(8260240583130824742L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(648351672) - .withDaysOfMonth("zcilnghg") - .withHour(403294934) - .withMinute(884114239) - .withUsedBytes(4618802136241516087L)) - .withEnabled(false) - .create(); - - Assertions.assertEquals("nthjtwkjaosrxuzv", response.location()); - Assertions.assertEquals("ktcqio", response.tags().get("mgbzahgxqdlyrtl")); - Assertions.assertEquals(1034709707, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(498260807, response.hourlySchedule().minute()); - Assertions.assertEquals(5239547603354777125L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1037799347, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1872397233, response.dailySchedule().hour()); - Assertions.assertEquals(505151536, response.dailySchedule().minute()); - Assertions.assertEquals(3502756066973311769L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(1808572524, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("ipgawtxx", response.weeklySchedule().day()); - Assertions.assertEquals(156137612, response.weeklySchedule().hour()); - Assertions.assertEquals(2059766507, response.weeklySchedule().minute()); - Assertions.assertEquals(8743829512964463352L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(607861165, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("tfmpcycilrmcayk", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(297687924, response.monthlySchedule().hour()); - Assertions.assertEquals(275753325, response.monthlySchedule().minute()); - Assertions.assertEquals(3377592071635505398L, response.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, response.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java deleted file mode 100644 index f564ea32e1f4d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.snapshotPolicies().delete("zvaylptrsqqw", "tcmwqkchc", "waxfewzjkj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java deleted file mode 100644 index c259d5f60d7d3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SnapshotPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"etag\":\"qihebw\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":730785712,\"minute\":1832502698,\"usedBytes\":3351326267748259519},\"dailySchedule\":{\"snapshotsToKeep\":1527664829,\"hour\":770460161,\"minute\":307322349,\"usedBytes\":8212495412619748670},\"weeklySchedule\":{\"snapshotsToKeep\":87980458,\"day\":\"lisdjubggbq\",\"hour\":1820494144,\"minute\":2003917859,\"usedBytes\":5918202422727737393},\"monthlySchedule\":{\"snapshotsToKeep\":1063611109,\"daysOfMonth\":\"gacyrcmjdmspo\",\"hour\":361382788,\"minute\":283706298,\"usedBytes\":2234682115333576707},\"enabled\":false,\"provisioningState\":\"ofrzgb\"},\"location\":\"edm\",\"tags\":{\"nsnvpd\":\"vnlvxbcuiiznktwf\",\"z\":\"bmikost\",\"fy\":\"kiwbuqnyoph\",\"elfwy\":\"sgcrpfbcunezzce\"},\"id\":\"wl\",\"name\":\"xjwet\",\"type\":\"psihcla\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SnapshotPolicy response = manager.snapshotPolicies() - .getWithResponse("wwinhehf", "pofvwb", "blembnkbwvqvxkd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("edm", response.location()); - Assertions.assertEquals("vnlvxbcuiiznktwf", response.tags().get("nsnvpd")); - Assertions.assertEquals(730785712, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1832502698, response.hourlySchedule().minute()); - Assertions.assertEquals(3351326267748259519L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1527664829, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(770460161, response.dailySchedule().hour()); - Assertions.assertEquals(307322349, response.dailySchedule().minute()); - Assertions.assertEquals(8212495412619748670L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(87980458, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("lisdjubggbq", response.weeklySchedule().day()); - Assertions.assertEquals(1820494144, response.weeklySchedule().hour()); - Assertions.assertEquals(2003917859, response.weeklySchedule().minute()); - Assertions.assertEquals(5918202422727737393L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1063611109, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("gacyrcmjdmspo", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(361382788, response.monthlySchedule().hour()); - Assertions.assertEquals(283706298, response.monthlySchedule().minute()); - Assertions.assertEquals(2234682115333576707L, response.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, response.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java deleted file mode 100644 index befb3ac0fd0be..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListMockTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SnapshotPolicy; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotPoliciesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"etag\":\"ltyjedexxmlfmk\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1445110632,\"minute\":1734867159,\"usedBytes\":3494695317807035352},\"dailySchedule\":{\"snapshotsToKeep\":16143450,\"hour\":810465454,\"minute\":400870213,\"usedBytes\":5532317119730945052},\"weeklySchedule\":{\"snapshotsToKeep\":1757124194,\"day\":\"xcushs\",\"hour\":1333151238,\"minute\":107973649,\"usedBytes\":4154943067306073010},\"monthlySchedule\":{\"snapshotsToKeep\":666736445,\"daysOfMonth\":\"vgsgzwywakoihkn\",\"hour\":874789657,\"minute\":1233115603,\"usedBytes\":2710381116141094215},\"enabled\":true,\"provisioningState\":\"ymzotqyryuzcbmq\"},\"location\":\"xmvwfg\",\"tags\":{\"supe\":\"xo\",\"sqltnzo\":\"jlzqnhc\"},\"id\":\"bgsxgnxfyqonmpq\",\"name\":\"xwdofdb\",\"type\":\"iqxeiiqbimht\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.snapshotPolicies().list("lkafhonqjuje", "ckpzvcpopmxeln", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xmvwfg", response.iterator().next().location()); - Assertions.assertEquals("xo", response.iterator().next().tags().get("supe")); - Assertions.assertEquals(1445110632, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1734867159, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(3494695317807035352L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(16143450, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(810465454, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(400870213, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(5532317119730945052L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(1757124194, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xcushs", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(1333151238, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(107973649, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(4154943067306073010L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(666736445, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("vgsgzwywakoihkn", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(874789657, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(1233115603, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(2710381116141094215L, response.iterator().next().monthlySchedule().usedBytes()); - Assertions.assertEquals(true, response.iterator().next().enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java deleted file mode 100644 index adf8d91292240..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPoliciesListTests.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.SnapshotPoliciesList; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotPoliciesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPoliciesList model = BinaryData.fromString( - "{\"value\":[{\"etag\":\"mtdaa\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":76843266,\"minute\":712155204,\"usedBytes\":2693420757845693746},\"dailySchedule\":{\"snapshotsToKeep\":114567922,\"hour\":11348761,\"minute\":2141817167,\"usedBytes\":4267712994723917741},\"weeklySchedule\":{\"snapshotsToKeep\":999653937,\"day\":\"gyqagvrvmnpkuk\",\"hour\":101100234,\"minute\":972343553,\"usedBytes\":2732082136167741922},\"monthlySchedule\":{\"snapshotsToKeep\":261614569,\"daysOfMonth\":\"fnjhfjxwmszkkfo\",\"hour\":272856491,\"minute\":1631223460,\"usedBytes\":2234038582671997054},\"enabled\":true,\"provisioningState\":\"aw\"},\"location\":\"a\",\"tags\":{\"elsfeaen\":\"wczelpci\",\"dxbjhwuaanozj\":\"abfatkl\",\"l\":\"sphyoulpjrvxa\"},\"id\":\"vimjwos\",\"name\":\"tx\",\"type\":\"tcs\"},{\"etag\":\"cktqumiekkezzi\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":533136991,\"minute\":1852856811,\"usedBytes\":870123737032837195},\"dailySchedule\":{\"snapshotsToKeep\":757390701,\"hour\":558583308,\"minute\":248292806,\"usedBytes\":7503859559209455505},\"weeklySchedule\":{\"snapshotsToKeep\":2021053825,\"day\":\"db\",\"hour\":1233334035,\"minute\":1541394178,\"usedBytes\":2451673053694449606},\"monthlySchedule\":{\"snapshotsToKeep\":1459715111,\"daysOfMonth\":\"jmoadsuv\",\"hour\":171529990,\"minute\":1301778060,\"usedBytes\":6230833948035893197},\"enabled\":false,\"provisioningState\":\"bjhhyx\"},\"location\":\"wlycoduhpkxkg\",\"tags\":{\"n\":\"re\",\"ubeddg\":\"jxqugjhky\"},\"id\":\"sofwqmzqalkrmnji\",\"name\":\"pxacqqudfn\",\"type\":\"yxbaaabjyvayf\"},{\"etag\":\"m\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":543650546,\"minute\":1520746749,\"usedBytes\":3305179615922528552},\"dailySchedule\":{\"snapshotsToKeep\":239466068,\"hour\":218306871,\"minute\":850324011,\"usedBytes\":6600025114283053959},\"weeklySchedule\":{\"snapshotsToKeep\":2059840008,\"day\":\"wzsyyceuzs\",\"hour\":1342883301,\"minute\":414197490,\"usedBytes\":3706325358985550286},\"monthlySchedule\":{\"snapshotsToKeep\":1769429451,\"daysOfMonth\":\"thzvaytdwkqbrqu\",\"hour\":749295202,\"minute\":31333478,\"usedBytes\":6004961335529412054},\"enabled\":false,\"provisioningState\":\"vpdtiirqtdqoa\"},\"location\":\"r\",\"tags\":{\"amxjezwlw\":\"gsquyfxrxxlept\",\"ojknio\":\"wxuqlcvydypatdoo\"},\"id\":\"kooebwnu\",\"name\":\"hemms\",\"type\":\"vdkcrodtj\"}]}") - .toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals("wczelpci", model.value().get(0).tags().get("elsfeaen")); - Assertions.assertEquals(76843266, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(712155204, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(2693420757845693746L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(114567922, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(11348761, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(2141817167, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(4267712994723917741L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(999653937, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("gyqagvrvmnpkuk", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(101100234, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(972343553, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(2732082136167741922L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(261614569, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("fnjhfjxwmszkkfo", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(272856491, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(1631223460, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(2234038582671997054L, model.value().get(0).monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.value().get(0).enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPoliciesList model = new SnapshotPoliciesList().withValue(Arrays.asList( - new SnapshotPolicyInner().withLocation("a") - .withTags(mapOf("elsfeaen", "wczelpci", "dxbjhwuaanozj", "abfatkl", "l", "sphyoulpjrvxa")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(76843266) - .withMinute(712155204) - .withUsedBytes(2693420757845693746L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(114567922) - .withHour(11348761) - .withMinute(2141817167) - .withUsedBytes(4267712994723917741L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(999653937) - .withDay("gyqagvrvmnpkuk") - .withHour(101100234) - .withMinute(972343553) - .withUsedBytes(2732082136167741922L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(261614569) - .withDaysOfMonth("fnjhfjxwmszkkfo") - .withHour(272856491) - .withMinute(1631223460) - .withUsedBytes(2234038582671997054L)) - .withEnabled(true), - new SnapshotPolicyInner().withLocation("wlycoduhpkxkg") - .withTags(mapOf("n", "re", "ubeddg", "jxqugjhky")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(533136991) - .withMinute(1852856811) - .withUsedBytes(870123737032837195L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(757390701) - .withHour(558583308) - .withMinute(248292806) - .withUsedBytes(7503859559209455505L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(2021053825) - .withDay("db") - .withHour(1233334035) - .withMinute(1541394178) - .withUsedBytes(2451673053694449606L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1459715111) - .withDaysOfMonth("jmoadsuv") - .withHour(171529990) - .withMinute(1301778060) - .withUsedBytes(6230833948035893197L)) - .withEnabled(false), - new SnapshotPolicyInner().withLocation("r") - .withTags(mapOf("amxjezwlw", "gsquyfxrxxlept", "ojknio", "wxuqlcvydypatdoo")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(543650546) - .withMinute(1520746749) - .withUsedBytes(3305179615922528552L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(239466068) - .withHour(218306871) - .withMinute(850324011) - .withUsedBytes(6600025114283053959L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(2059840008) - .withDay("wzsyyceuzs") - .withHour(1342883301) - .withMinute(414197490) - .withUsedBytes(3706325358985550286L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1769429451) - .withDaysOfMonth("thzvaytdwkqbrqu") - .withHour(749295202) - .withMinute(31333478) - .withUsedBytes(6004961335529412054L)) - .withEnabled(false))); - model = BinaryData.fromObject(model).toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("a", model.value().get(0).location()); - Assertions.assertEquals("wczelpci", model.value().get(0).tags().get("elsfeaen")); - Assertions.assertEquals(76843266, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(712155204, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(2693420757845693746L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(114567922, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(11348761, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(2141817167, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(4267712994723917741L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(999653937, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("gyqagvrvmnpkuk", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(101100234, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(972343553, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(2732082136167741922L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(261614569, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("fnjhfjxwmszkkfo", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(272856491, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(1631223460, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(2234038582671997054L, model.value().get(0).monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.value().get(0).enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java deleted file mode 100644 index bee3612b99cfc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyInnerTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPolicyInner model = BinaryData.fromString( - "{\"etag\":\"fw\",\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":274733430,\"minute\":896449803,\"usedBytes\":2193419628649134444},\"dailySchedule\":{\"snapshotsToKeep\":216115077,\"hour\":632843013,\"minute\":1442047591,\"usedBytes\":104331388781277512},\"weeklySchedule\":{\"snapshotsToKeep\":1706699033,\"day\":\"pagao\",\"hour\":1739461107,\"minute\":1784212142,\"usedBytes\":5057262440850695627},\"monthlySchedule\":{\"snapshotsToKeep\":97386610,\"daysOfMonth\":\"xkqjnsjervt\",\"hour\":1109301596,\"minute\":1353667842,\"usedBytes\":1824695374727321161},\"enabled\":false,\"provisioningState\":\"psbzkfzbeyvpn\"},\"location\":\"cvinvkjjxdxrbuuk\",\"tags\":{\"paztzpofncck\":\"ewyhml\",\"qa\":\"yfzqwhxxbu\",\"lxorjaltolmncws\":\"zfeqztppri\"},\"id\":\"bqwcsdbnwdcf\",\"name\":\"ucqdpfuvglsb\",\"type\":\"jcanvxbvtvudut\"}") - .toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("cvinvkjjxdxrbuuk", model.location()); - Assertions.assertEquals("ewyhml", model.tags().get("paztzpofncck")); - Assertions.assertEquals(274733430, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(896449803, model.hourlySchedule().minute()); - Assertions.assertEquals(2193419628649134444L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(216115077, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(632843013, model.dailySchedule().hour()); - Assertions.assertEquals(1442047591, model.dailySchedule().minute()); - Assertions.assertEquals(104331388781277512L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1706699033, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("pagao", model.weeklySchedule().day()); - Assertions.assertEquals(1739461107, model.weeklySchedule().hour()); - Assertions.assertEquals(1784212142, model.weeklySchedule().minute()); - Assertions.assertEquals(5057262440850695627L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(97386610, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xkqjnsjervt", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1109301596, model.monthlySchedule().hour()); - Assertions.assertEquals(1353667842, model.monthlySchedule().minute()); - Assertions.assertEquals(1824695374727321161L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("cvinvkjjxdxrbuuk") - .withTags(mapOf("paztzpofncck", "ewyhml", "qa", "yfzqwhxxbu", "lxorjaltolmncws", "zfeqztppri")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(274733430) - .withMinute(896449803) - .withUsedBytes(2193419628649134444L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(216115077) - .withHour(632843013) - .withMinute(1442047591) - .withUsedBytes(104331388781277512L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1706699033) - .withDay("pagao") - .withHour(1739461107) - .withMinute(1784212142) - .withUsedBytes(5057262440850695627L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(97386610) - .withDaysOfMonth("xkqjnsjervt") - .withHour(1109301596) - .withMinute(1353667842) - .withUsedBytes(1824695374727321161L)) - .withEnabled(false); - model = BinaryData.fromObject(model).toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("cvinvkjjxdxrbuuk", model.location()); - Assertions.assertEquals("ewyhml", model.tags().get("paztzpofncck")); - Assertions.assertEquals(274733430, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(896449803, model.hourlySchedule().minute()); - Assertions.assertEquals(2193419628649134444L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(216115077, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(632843013, model.dailySchedule().hour()); - Assertions.assertEquals(1442047591, model.dailySchedule().minute()); - Assertions.assertEquals(104331388781277512L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1706699033, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("pagao", model.weeklySchedule().day()); - Assertions.assertEquals(1739461107, model.weeklySchedule().hour()); - Assertions.assertEquals(1784212142, model.weeklySchedule().minute()); - Assertions.assertEquals(5057262440850695627L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(97386610, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xkqjnsjervt", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1109301596, model.monthlySchedule().hour()); - Assertions.assertEquals(1353667842, model.monthlySchedule().minute()); - Assertions.assertEquals(1824695374727321161L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java deleted file mode 100644 index 68781abb4fbd0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPatchTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotPolicyPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPolicyPatch model = BinaryData.fromString( - "{\"location\":\"ojvdcpzfoqo\",\"id\":\"cybxa\",\"name\":\"gszufoxciqopid\",\"type\":\"mciodhkhazxkhn\",\"tags\":{\"okdwb\":\"nlwntoe\",\"cmrvexzt\":\"hksz\",\"gsfraoyzkoow\":\"bt\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1663606623,\"minute\":1523878268,\"usedBytes\":8390359388948965260},\"dailySchedule\":{\"snapshotsToKeep\":1506529335,\"hour\":2048944312,\"minute\":590697552,\"usedBytes\":4613349711608649524},\"weeklySchedule\":{\"snapshotsToKeep\":1784889478,\"day\":\"obwyznkb\",\"hour\":1828204425,\"minute\":1183252215,\"usedBytes\":6293103125482065030},\"monthlySchedule\":{\"snapshotsToKeep\":2014772944,\"daysOfMonth\":\"hrskdsnfd\",\"hour\":1139028210,\"minute\":357492176,\"usedBytes\":2205573976502795115},\"enabled\":true,\"provisioningState\":\"kzevdlhewpusds\"}}") - .toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("ojvdcpzfoqo", model.location()); - Assertions.assertEquals("nlwntoe", model.tags().get("okdwb")); - Assertions.assertEquals(1663606623, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1523878268, model.hourlySchedule().minute()); - Assertions.assertEquals(8390359388948965260L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1506529335, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2048944312, model.dailySchedule().hour()); - Assertions.assertEquals(590697552, model.dailySchedule().minute()); - Assertions.assertEquals(4613349711608649524L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1784889478, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("obwyznkb", model.weeklySchedule().day()); - Assertions.assertEquals(1828204425, model.weeklySchedule().hour()); - Assertions.assertEquals(1183252215, model.weeklySchedule().minute()); - Assertions.assertEquals(6293103125482065030L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(2014772944, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("hrskdsnfd", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1139028210, model.monthlySchedule().hour()); - Assertions.assertEquals(357492176, model.monthlySchedule().minute()); - Assertions.assertEquals(2205573976502795115L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("ojvdcpzfoqo") - .withTags(mapOf("okdwb", "nlwntoe", "cmrvexzt", "hksz", "gsfraoyzkoow", "bt")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1663606623) - .withMinute(1523878268) - .withUsedBytes(8390359388948965260L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1506529335) - .withHour(2048944312) - .withMinute(590697552) - .withUsedBytes(4613349711608649524L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1784889478) - .withDay("obwyznkb") - .withHour(1828204425) - .withMinute(1183252215) - .withUsedBytes(6293103125482065030L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(2014772944) - .withDaysOfMonth("hrskdsnfd") - .withHour(1139028210) - .withMinute(357492176) - .withUsedBytes(2205573976502795115L)) - .withEnabled(true); - model = BinaryData.fromObject(model).toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("ojvdcpzfoqo", model.location()); - Assertions.assertEquals("nlwntoe", model.tags().get("okdwb")); - Assertions.assertEquals(1663606623, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1523878268, model.hourlySchedule().minute()); - Assertions.assertEquals(8390359388948965260L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1506529335, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2048944312, model.dailySchedule().hour()); - Assertions.assertEquals(590697552, model.dailySchedule().minute()); - Assertions.assertEquals(4613349711608649524L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1784889478, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("obwyznkb", model.weeklySchedule().day()); - Assertions.assertEquals(1828204425, model.weeklySchedule().hour()); - Assertions.assertEquals(1183252215, model.weeklySchedule().minute()); - Assertions.assertEquals(6293103125482065030L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(2014772944, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("hrskdsnfd", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1139028210, model.monthlySchedule().hour()); - Assertions.assertEquals(357492176, model.monthlySchedule().minute()); - Assertions.assertEquals(2205573976502795115L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(true, model.enabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java deleted file mode 100644 index a4468d4ce98e5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPolicyPropertiesTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties; -import com.azure.resourcemanager.netapp.models.DailySchedule; -import com.azure.resourcemanager.netapp.models.HourlySchedule; -import com.azure.resourcemanager.netapp.models.MonthlySchedule; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotPolicyProperties model = BinaryData.fromString( - "{\"hourlySchedule\":{\"snapshotsToKeep\":574519404,\"minute\":175295404,\"usedBytes\":8357004354243931890},\"dailySchedule\":{\"snapshotsToKeep\":1229712399,\"hour\":754766432,\"minute\":1395198209,\"usedBytes\":5859921089947739287},\"weeklySchedule\":{\"snapshotsToKeep\":585875953,\"day\":\"bgdknnqv\",\"hour\":1989846717,\"minute\":2039923498,\"usedBytes\":3284262391210683675},\"monthlySchedule\":{\"snapshotsToKeep\":577659304,\"daysOfMonth\":\"gsahmkycgrauw\",\"hour\":1509662637,\"minute\":391026651,\"usedBytes\":6617635569838446210},\"enabled\":false,\"provisioningState\":\"dmovsm\"}") - .toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(574519404, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(175295404, model.hourlySchedule().minute()); - Assertions.assertEquals(8357004354243931890L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1229712399, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(754766432, model.dailySchedule().hour()); - Assertions.assertEquals(1395198209, model.dailySchedule().minute()); - Assertions.assertEquals(5859921089947739287L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(585875953, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("bgdknnqv", model.weeklySchedule().day()); - Assertions.assertEquals(1989846717, model.weeklySchedule().hour()); - Assertions.assertEquals(2039923498, model.weeklySchedule().minute()); - Assertions.assertEquals(3284262391210683675L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(577659304, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("gsahmkycgrauw", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1509662637, model.monthlySchedule().hour()); - Assertions.assertEquals(391026651, model.monthlySchedule().minute()); - Assertions.assertEquals(6617635569838446210L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotPolicyProperties model = new SnapshotPolicyProperties() - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(574519404) - .withMinute(175295404) - .withUsedBytes(8357004354243931890L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1229712399) - .withHour(754766432) - .withMinute(1395198209) - .withUsedBytes(5859921089947739287L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(585875953) - .withDay("bgdknnqv") - .withHour(1989846717) - .withMinute(2039923498) - .withUsedBytes(3284262391210683675L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(577659304) - .withDaysOfMonth("gsahmkycgrauw") - .withHour(1509662637) - .withMinute(391026651) - .withUsedBytes(6617635569838446210L)) - .withEnabled(false); - model = BinaryData.fromObject(model).toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(574519404, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(175295404, model.hourlySchedule().minute()); - Assertions.assertEquals(8357004354243931890L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(1229712399, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(754766432, model.dailySchedule().hour()); - Assertions.assertEquals(1395198209, model.dailySchedule().minute()); - Assertions.assertEquals(5859921089947739287L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(585875953, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("bgdknnqv", model.weeklySchedule().day()); - Assertions.assertEquals(1989846717, model.weeklySchedule().hour()); - Assertions.assertEquals(2039923498, model.weeklySchedule().minute()); - Assertions.assertEquals(3284262391210683675L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(577659304, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("gsahmkycgrauw", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1509662637, model.monthlySchedule().hour()); - Assertions.assertEquals(391026651, model.monthlySchedule().minute()); - Assertions.assertEquals(6617635569838446210L, model.monthlySchedule().usedBytes()); - Assertions.assertEquals(false, model.enabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java deleted file mode 100644 index 022f4cbf281eb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties; - -public final class SnapshotPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotProperties model = BinaryData - .fromString("{\"snapshotId\":\"jzkzi\",\"created\":\"2021-12-08T15:57:22Z\",\"provisioningState\":\"c\"}") - .toObject(SnapshotProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotProperties model = new SnapshotProperties(); - model = BinaryData.fromObject(model).toObject(SnapshotProperties.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java deleted file mode 100644 index a366a249c731e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotRestoreFilesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotRestoreFilesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotRestoreFiles model - = BinaryData.fromString("{\"filePaths\":[\"y\",\"hyrnxxmu\"],\"destinationPath\":\"dndrdvstkwqqtche\"}") - .toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("y", model.filePaths().get(0)); - Assertions.assertEquals("dndrdvstkwqqtche", model.destinationPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotRestoreFiles model = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("y", "hyrnxxmu")) - .withDestinationPath("dndrdvstkwqqtche"); - model = BinaryData.fromObject(model).toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("y", model.filePaths().get(0)); - Assertions.assertEquals("dndrdvstkwqqtche", model.destinationPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java deleted file mode 100644 index a8322d1463aef..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.snapshots() - .delete("nzrdpsovwxz", "ptgoeiybbabp", "hv", "slkvntjl", "igjkskyrio", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java deleted file mode 100644 index 5bdd63d12dfbd..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsGetWithResponseMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Snapshot; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"location\":\"ap\",\"properties\":{\"snapshotId\":\"ferr\",\"created\":\"2021-05-25T15:13:52Z\",\"provisioningState\":\"jkmfxapjwo\"},\"id\":\"qnobp\",\"name\":\"dcdab\",\"type\":\"qwpwyawbzasqbuc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Snapshot response = manager.snapshots() - .getWithResponse("a", "zv", "chndbnwie", "olewjwi", "ubwefqs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ap", response.location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java deleted file mode 100644 index 3d459593f4a23..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Snapshot; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"location\":\"tmzlbiojlv\",\"properties\":{\"snapshotId\":\"bbpneqvcwwy\",\"created\":\"2021-08-18T23:17:52Z\",\"provisioningState\":\"ochpprpr\"},\"id\":\"mo\",\"name\":\"ayzejnhlbkpbz\",\"type\":\"cpilj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.snapshots() - .list("fbzdixzmqpnoda", "opqhewjptmc", "sbostzel", "dlat", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tmzlbiojlv", response.iterator().next().location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java deleted file mode 100644 index fd7b384589f40..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsListTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SnapshotInner; -import com.azure.resourcemanager.netapp.models.SnapshotsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SnapshotsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SnapshotsList model = BinaryData.fromString( - "{\"value\":[{\"location\":\"ykojoxafnndlpic\",\"properties\":{\"snapshotId\":\"ymkcdyhb\",\"created\":\"2021-01-04T13:26:20Z\",\"provisioningState\":\"wdreqnovvqfovl\"},\"id\":\"ywsuwsy\",\"name\":\"s\",\"type\":\"dsytgadgvr\"},{\"location\":\"ea\",\"properties\":{\"snapshotId\":\"qnzarrwl\",\"created\":\"2021-09-03T09:11:52Z\",\"provisioningState\":\"jfqka\"},\"id\":\"wiipfpub\",\"name\":\"ibwwiftohqkv\",\"type\":\"uvksgplsaknynfsy\"},{\"location\":\"ljphuopxodl\",\"properties\":{\"snapshotId\":\"ntorzihleosjswsr\",\"created\":\"2021-01-12T15:56:27Z\",\"provisioningState\":\"rpzbchckqqzqi\"},\"id\":\"iysui\",\"name\":\"zynkedya\",\"type\":\"rwyhqmibzyhwitsm\"},{\"location\":\"pyy\",\"properties\":{\"snapshotId\":\"dpumnzgmw\",\"created\":\"2021-05-04T13:21:35Z\",\"provisioningState\":\"biknsorgjhxbld\"},\"id\":\"wwrlkdmtncv\",\"name\":\"kotl\",\"type\":\"xdy\"}]}") - .toObject(SnapshotsList.class); - Assertions.assertEquals("ykojoxafnndlpic", model.value().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SnapshotsList model = new SnapshotsList().withValue( - Arrays.asList(new SnapshotInner().withLocation("ykojoxafnndlpic"), new SnapshotInner().withLocation("ea"), - new SnapshotInner().withLocation("ljphuopxodl"), new SnapshotInner().withLocation("pyy"))); - model = BinaryData.fromObject(model).toObject(SnapshotsList.class); - Assertions.assertEquals("ykojoxafnndlpic", model.value().get(0).location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java deleted file mode 100644 index 340352d437432..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotsRestoreFilesMockTests { - @Test - public void testRestoreFiles() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.snapshots() - .restoreFiles("vzidsxwaab", "mifrygznmma", "ri", "kzobgopxlhsln", "lxieixynllxecwcr", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("phslhcawjutifdw", "mvi", "orq")) - .withDestinationPath("ttzhra"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java deleted file mode 100644 index 3d7374c106ce3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsUpdateMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Snapshot; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SnapshotsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"location\":\"azlnqnmcjngzqdqx\",\"properties\":{\"snapshotId\":\"wgnyfusfzsvtui\",\"created\":\"2021-03-01T07:50:01Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"fh\",\"name\":\"l\",\"type\":\"qryxyn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Snapshot response = manager.snapshots() - .update("jg", "yexaoguy", "i", "ids", "ault", "dataijjumfq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("azlnqnmcjngzqdqx", response.location()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemInnerTests.java deleted file mode 100644 index 1952ff6bba4c7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; - -public final class SubscriptionQuotaItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaItemInner model = BinaryData.fromString( - "{\"properties\":{\"current\":124550903,\"default\":1175944343},\"id\":\"kbldngkpocipa\",\"name\":\"yxoegukgjnp\",\"type\":\"ucgygevqz\"}") - .toObject(SubscriptionQuotaItemInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaItemInner model = new SubscriptionQuotaItemInner(); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaItemInner.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemListTests.java deleted file mode 100644 index 966145f614886..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemListTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner; -import com.azure.resourcemanager.netapp.models.SubscriptionQuotaItemList; -import java.util.Arrays; - -public final class SubscriptionQuotaItemListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaItemList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"current\":1201119723,\"default\":682758161},\"id\":\"wwzjuqkhrsajiwku\",\"name\":\"foskghsauuimj\",\"type\":\"vxieduugidyj\"},{\"properties\":{\"current\":857489891,\"default\":786534004},\"id\":\"svexcsonpclhoco\",\"name\":\"slkevle\",\"type\":\"gz\"},{\"properties\":{\"current\":635098272,\"default\":1240175495},\"id\":\"faxkffeii\",\"name\":\"hl\",\"type\":\"m\"},{\"properties\":{\"current\":72720177,\"default\":1090911341},\"id\":\"mzsb\",\"name\":\"zoggigrxwburvjxx\",\"type\":\"nspydptkoenkoukn\"}]}") - .toObject(SubscriptionQuotaItemList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaItemList model - = new SubscriptionQuotaItemList().withValue(Arrays.asList(new SubscriptionQuotaItemInner(), - new SubscriptionQuotaItemInner(), new SubscriptionQuotaItemInner(), new SubscriptionQuotaItemInner())); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaItemList.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemPropertiesTests.java deleted file mode 100644 index 6f48a1e70ccd0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubscriptionQuotaItemPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemProperties; - -public final class SubscriptionQuotaItemPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaItemProperties model = BinaryData.fromString("{\"current\":278176639,\"default\":599264802}") - .toObject(SubscriptionQuotaItemProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaItemProperties model = new SubscriptionQuotaItemProperties(); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaItemProperties.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java deleted file mode 100644 index 610e706a8ff8d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumeInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"path\":\"ftul\",\"size\":9148960841724922095,\"parentPath\":\"ceamtm\",\"provisioningState\":\"u\"},\"id\":\"ejwcwwqiok\",\"name\":\"ssxmojms\",\"type\":\"p\"}") - .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("ftul", model.path()); - Assertions.assertEquals(9148960841724922095L, model.size()); - Assertions.assertEquals("ceamtm", model.parentPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeInfoInner model - = new SubvolumeInfoInner().withPath("ftul").withSize(9148960841724922095L).withParentPath("ceamtm"); - model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("ftul", model.path()); - Assertions.assertEquals(9148960841724922095L, model.size()); - Assertions.assertEquals("ceamtm", model.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java deleted file mode 100644 index e396d43022b4b..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelInnerTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumeModelInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeModelInner model = BinaryData.fromString( - "{\"id\":\"yklyhpluodpvruud\",\"name\":\"zibt\",\"type\":\"stgktst\",\"properties\":{\"path\":\"eclze\",\"parentPath\":\"bcvhzlhpl\",\"size\":4639837566947642597,\"bytesUsed\":7621126373333808650,\"permissions\":\"qfbumlkxtrqjf\",\"creationTimeStamp\":\"2021-09-13T05:47Z\",\"accessedTimeStamp\":\"2021-09-19T15:04:58Z\",\"modifiedTimeStamp\":\"2021-04-24T16:12:25Z\",\"changedTimeStamp\":\"2021-03-23T13:40:47Z\",\"provisioningState\":\"fwsrtawcoezbrhu\"}}") - .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("eclze", model.path()); - Assertions.assertEquals("bcvhzlhpl", model.parentPath()); - Assertions.assertEquals(4639837566947642597L, model.size()); - Assertions.assertEquals(7621126373333808650L, model.bytesUsed()); - Assertions.assertEquals("qfbumlkxtrqjf", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T05:47Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T15:04:58Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T16:12:25Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T13:40:47Z"), model.changedTimestamp()); - Assertions.assertEquals("fwsrtawcoezbrhu", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeModelInner model = new SubvolumeModelInner().withPath("eclze") - .withParentPath("bcvhzlhpl") - .withSize(4639837566947642597L) - .withBytesUsed(7621126373333808650L) - .withPermissions("qfbumlkxtrqjf") - .withCreationTimestamp(OffsetDateTime.parse("2021-09-13T05:47Z")) - .withAccessedTimestamp(OffsetDateTime.parse("2021-09-19T15:04:58Z")) - .withModifiedTimestamp(OffsetDateTime.parse("2021-04-24T16:12:25Z")) - .withChangedTimestamp(OffsetDateTime.parse("2021-03-23T13:40:47Z")) - .withProvisioningState("fwsrtawcoezbrhu"); - model = BinaryData.fromObject(model).toObject(SubvolumeModelInner.class); - Assertions.assertEquals("eclze", model.path()); - Assertions.assertEquals("bcvhzlhpl", model.parentPath()); - Assertions.assertEquals(4639837566947642597L, model.size()); - Assertions.assertEquals(7621126373333808650L, model.bytesUsed()); - Assertions.assertEquals("qfbumlkxtrqjf", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T05:47Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T15:04:58Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T16:12:25Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T13:40:47Z"), model.changedTimestamp()); - Assertions.assertEquals("fwsrtawcoezbrhu", model.provisioningState()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java deleted file mode 100644 index 98533070087b3..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeModelPropertiesTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumeModelPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeModelProperties model = BinaryData.fromString( - "{\"path\":\"kh\",\"parentPath\":\"ygo\",\"size\":1410009075037068900,\"bytesUsed\":9221028808795014470,\"permissions\":\"bvleorfmluiqtqzf\",\"creationTimeStamp\":\"2021-05-04T19:19:19Z\",\"accessedTimeStamp\":\"2021-06-05T20:28:23Z\",\"modifiedTimeStamp\":\"2021-03-05T04:35Z\",\"changedTimeStamp\":\"2021-05-23T06:21:06Z\",\"provisioningState\":\"ryeu\"}") - .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("kh", model.path()); - Assertions.assertEquals("ygo", model.parentPath()); - Assertions.assertEquals(1410009075037068900L, model.size()); - Assertions.assertEquals(9221028808795014470L, model.bytesUsed()); - Assertions.assertEquals("bvleorfmluiqtqzf", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T19:19:19Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T20:28:23Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T04:35Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T06:21:06Z"), model.changedTimestamp()); - Assertions.assertEquals("ryeu", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeModelProperties model = new SubvolumeModelProperties().withPath("kh") - .withParentPath("ygo") - .withSize(1410009075037068900L) - .withBytesUsed(9221028808795014470L) - .withPermissions("bvleorfmluiqtqzf") - .withCreationTimestamp(OffsetDateTime.parse("2021-05-04T19:19:19Z")) - .withAccessedTimestamp(OffsetDateTime.parse("2021-06-05T20:28:23Z")) - .withModifiedTimestamp(OffsetDateTime.parse("2021-03-05T04:35Z")) - .withChangedTimestamp(OffsetDateTime.parse("2021-05-23T06:21:06Z")) - .withProvisioningState("ryeu"); - model = BinaryData.fromObject(model).toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("kh", model.path()); - Assertions.assertEquals("ygo", model.parentPath()); - Assertions.assertEquals(1410009075037068900L, model.size()); - Assertions.assertEquals(9221028808795014470L, model.bytesUsed()); - Assertions.assertEquals("bvleorfmluiqtqzf", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T19:19:19Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T20:28:23Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T04:35Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T06:21:06Z"), model.changedTimestamp()); - Assertions.assertEquals("ryeu", model.provisioningState()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java deleted file mode 100644 index 9ef3897f2d6ce..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchParamsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumePatchParamsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumePatchParams model = BinaryData.fromString("{\"size\":3671939650811911074,\"path\":\"rc\"}") - .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(3671939650811911074L, model.size()); - Assertions.assertEquals("rc", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumePatchParams model = new SubvolumePatchParams().withSize(3671939650811911074L).withPath("rc"); - model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(3671939650811911074L, model.size()); - Assertions.assertEquals("rc", model.path()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java deleted file mode 100644 index ed2a779b6210e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePatchRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.SubvolumePatchRequest; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumePatchRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumePatchRequest model - = BinaryData.fromString("{\"properties\":{\"size\":5324799638709264406,\"path\":\"x\"}}") - .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(5324799638709264406L, model.size()); - Assertions.assertEquals("x", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumePatchRequest model = new SubvolumePatchRequest().withSize(5324799638709264406L).withPath("x"); - model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(5324799638709264406L, model.size()); - Assertions.assertEquals("x", model.path()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java deleted file mode 100644 index a5a19974c0bf0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumeProperties model = BinaryData.fromString( - "{\"path\":\"prvkwcfzqljyxgtc\",\"size\":6617307512008189308,\"parentPath\":\"bsdshmkxmaehvbbx\",\"provisioningState\":\"iplt\"}") - .toObject(SubvolumeProperties.class); - Assertions.assertEquals("prvkwcfzqljyxgtc", model.path()); - Assertions.assertEquals(6617307512008189308L, model.size()); - Assertions.assertEquals("bsdshmkxmaehvbbx", model.parentPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("prvkwcfzqljyxgtc") - .withSize(6617307512008189308L) - .withParentPath("bsdshmkxmaehvbbx"); - model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("prvkwcfzqljyxgtc", model.path()); - Assertions.assertEquals(6617307512008189308L, model.size()); - Assertions.assertEquals("bsdshmkxmaehvbbx", model.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java deleted file mode 100644 index 37b90ecf9d30c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesCreateMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeInfo; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SubvolumesCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"path\":\"ohec\",\"size\":4724039728117987325,\"parentPath\":\"ndyqleal\",\"provisioningState\":\"Succeeded\"},\"id\":\"br\",\"name\":\"fjmzsyzfho\",\"type\":\"lhikcyychunsj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubvolumeInfo response = manager.subvolumes() - .define("bsxtkcudfbsfarfs") - .withExistingVolume("orim", "rsrrmoucsofldp", "viyfcaabeolhbhlv", "mxuq") - .withPath("lkjxnqpvwgf") - .withSize(4335540278124764929L) - .withParentPath("ykizmdksaoaf") - .create(); - - Assertions.assertEquals("ohec", response.path()); - Assertions.assertEquals(4724039728117987325L, response.size()); - Assertions.assertEquals("ndyqleal", response.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java deleted file mode 100644 index c1ad3745f2d76..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SubvolumesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.subvolumes().delete("fg", "qbawpcbbnzqcykn", "p", "ofyuicd", "zb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java deleted file mode 100644 index 6981ff2d4f12e..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetMetadataMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeModel; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SubvolumesGetMetadataMockTests { - @Test - public void testGetMetadata() throws Exception { - String responseStr - = "{\"id\":\"qboshbra\",\"name\":\"pyyrmfs\",\"type\":\"pavbo\",\"properties\":{\"path\":\"pdbwnupgahxkum\",\"parentPath\":\"jcaacfdmmcpugm\",\"size\":2799453974287418624,\"bytesUsed\":5289288139576843863,\"permissions\":\"hbzehewho\",\"creationTimeStamp\":\"2021-08-24T10:40:17Z\",\"accessedTimeStamp\":\"2021-07-22T20:31:39Z\",\"modifiedTimeStamp\":\"2021-02-23T10:26:16Z\",\"changedTimeStamp\":\"2021-07-12T10:48:01Z\",\"provisioningState\":\"Succeeded\"}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubvolumeModel response = manager.subvolumes() - .getMetadata("ybww", "bdvibidmhmwffpl", "muvapc", "ccrrvweyoxoyyu", "phaimmoi", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pdbwnupgahxkum", response.path()); - Assertions.assertEquals("jcaacfdmmcpugm", response.parentPath()); - Assertions.assertEquals(2799453974287418624L, response.size()); - Assertions.assertEquals(5289288139576843863L, response.bytesUsed()); - Assertions.assertEquals("hbzehewho", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-24T10:40:17Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-22T20:31:39Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-23T10:26:16Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-12T10:48:01Z"), response.changedTimestamp()); - Assertions.assertEquals("Succeeded", response.provisioningState()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java deleted file mode 100644 index bea6de32052ab..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesGetWithResponseMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeInfo; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SubvolumesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"path\":\"rymo\",\"size\":8486820161769932410,\"parentPath\":\"klobdxnazpmk\",\"provisioningState\":\"mv\"},\"id\":\"f\",\"name\":\"zopjhbzxliohr\",\"type\":\"dd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SubvolumeInfo response = manager.subvolumes() - .getWithResponse("zna", "xbannovvoxc", "ytprwnwvroev", "tlyo", "rrrouuxvnsa", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rymo", response.path()); - Assertions.assertEquals(8486820161769932410L, response.size()); - Assertions.assertEquals("klobdxnazpmk", response.parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java deleted file mode 100644 index 01acf59d81140..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListByVolumeMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.SubvolumeInfo; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SubvolumesListByVolumeMockTests { - @Test - public void testListByVolume() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"path\":\"qxypokkhminq\",\"size\":6418388718617598308,\"parentPath\":\"ngnbdxxew\",\"provisioningState\":\"invudbch\"},\"id\":\"dtvqe\",\"name\":\"rqctmxxdtdd\",\"type\":\"flhuytxzv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.subvolumes() - .listByVolume("kfuarenlv", "htkln", "nafvvkyfedev", "bo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qxypokkhminq", response.iterator().next().path()); - Assertions.assertEquals(6418388718617598308L, response.iterator().next().size()); - Assertions.assertEquals("ngnbdxxew", response.iterator().next().parentPath()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java deleted file mode 100644 index 8c381f4653bbc..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesListTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner; -import com.azure.resourcemanager.netapp.models.SubvolumesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubvolumesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubvolumesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"path\":\"aeqphchqnr\",\"size\":4162908248726599775,\"parentPath\":\"huwrykqgaifm\",\"provisioningState\":\"klbydv\"},\"id\":\"bejdznxcv\",\"name\":\"srhnjivo\",\"type\":\"v\"}],\"nextLink\":\"ovqfzge\"}") - .toObject(SubvolumesList.class); - Assertions.assertEquals("aeqphchqnr", model.value().get(0).path()); - Assertions.assertEquals(4162908248726599775L, model.value().get(0).size()); - Assertions.assertEquals("huwrykqgaifm", model.value().get(0).parentPath()); - Assertions.assertEquals("ovqfzge", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubvolumesList model - = new SubvolumesList().withValue(Arrays.asList(new SubvolumeInfoInner().withPath("aeqphchqnr") - .withSize(4162908248726599775L) - .withParentPath("huwrykqgaifm"))).withNextLink("ovqfzge"); - model = BinaryData.fromObject(model).toObject(SubvolumesList.class); - Assertions.assertEquals("aeqphchqnr", model.value().get(0).path()); - Assertions.assertEquals(4162908248726599775L, model.value().get(0).size()); - Assertions.assertEquals("huwrykqgaifm", model.value().get(0).parentPath()); - Assertions.assertEquals("ovqfzge", model.nextLink()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java deleted file mode 100644 index f97a9aaada39f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.NetworkFeatures; -import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; -import org.junit.jupiter.api.Assertions; - -public final class UpdateNetworkSiblingSetRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"bt\",\"subnetId\":\"wrqpue\",\"networkSiblingSetStateId\":\"ckzywbiexzfeyue\",\"networkFeatures\":\"Standard_Basic\"}") - .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("bt", model.networkSiblingSetId()); - Assertions.assertEquals("wrqpue", model.subnetId()); - Assertions.assertEquals("ckzywbiexzfeyue", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("bt") - .withSubnetId("wrqpue") - .withNetworkSiblingSetStateId("ckzywbiexzfeyue") - .withNetworkFeatures(NetworkFeatures.STANDARD_BASIC); - model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("bt", model.networkSiblingSetId()); - Assertions.assertEquals("wrqpue", model.subnetId()); - Assertions.assertEquals("ckzywbiexzfeyue", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 6d7354f5bcb4d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"c2219a93-8f68-415f-8679-4c9609948c6e\",\"clientId\":\"5da0ad3a-d8a7-41d1-9fd0-522aca04aea1\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java deleted file mode 100644 index 0303fde900e33..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumeBackupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeBackupProperties model - = BinaryData.fromString("{\"backupPolicyId\":\"rn\",\"policyEnforced\":true,\"backupVaultId\":\"q\"}") - .toObject(VolumeBackupProperties.class); - Assertions.assertEquals("rn", model.backupPolicyId()); - Assertions.assertEquals(true, model.policyEnforced()); - Assertions.assertEquals("q", model.backupVaultId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeBackupProperties model - = new VolumeBackupProperties().withBackupPolicyId("rn").withPolicyEnforced(true).withBackupVaultId("q"); - model = BinaryData.fromObject(model).toObject(VolumeBackupProperties.class); - Assertions.assertEquals("rn", model.backupPolicyId()); - Assertions.assertEquals(true, model.policyEnforced()); - Assertions.assertEquals("q", model.backupVaultId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java deleted file mode 100644 index 8b51bd4e4b357..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeBackups; -import org.junit.jupiter.api.Assertions; - -public final class VolumeBackupsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeBackups model = BinaryData.fromString( - "{\"volumeName\":\"vrwxkv\",\"volumeResourceId\":\"k\",\"backupsCount\":1409023771,\"policyEnabled\":true}") - .toObject(VolumeBackups.class); - Assertions.assertEquals("vrwxkv", model.volumeName()); - Assertions.assertEquals("k", model.volumeResourceId()); - Assertions.assertEquals(1409023771, model.backupsCount()); - Assertions.assertEquals(true, model.policyEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeBackups model = new VolumeBackups().withVolumeName("vrwxkv") - .withVolumeResourceId("k") - .withBackupsCount(1409023771) - .withPolicyEnabled(true); - model = BinaryData.fromObject(model).toObject(VolumeBackups.class); - Assertions.assertEquals("vrwxkv", model.volumeName()); - Assertions.assertEquals("k", model.volumeResourceId()); - Assertions.assertEquals(1409023771, model.backupsCount()); - Assertions.assertEquals(true, model.policyEnabled()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java deleted file mode 100644 index f7490a1dd2b51..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumeGroupsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumeGroups().delete("qwtehtuevr", "rljyoogwxhnsdu", "gwbsreurf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java deleted file mode 100644 index 1bcd8232f8726..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchPropertiesDataProtectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatchPropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"uoegrpkhjwniyqs\",\"policyEnforced\":false,\"backupVaultId\":\"pdggkzzlvm\"},\"snapshot\":{\"snapshotPolicyId\":\"axmodfvuef\"}}") - .toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("uoegrpkhjwniyqs", model.backup().backupPolicyId()); - Assertions.assertEquals(false, model.backup().policyEnforced()); - Assertions.assertEquals("pdggkzzlvm", model.backup().backupVaultId()); - Assertions.assertEquals("axmodfvuef", model.snapshot().snapshotPolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatchPropertiesDataProtection model = new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("uoegrpkhjwniyqs") - .withPolicyEnforced(false) - .withBackupVaultId("pdggkzzlvm")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("axmodfvuef")); - model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("uoegrpkhjwniyqs", model.backup().backupPolicyId()); - Assertions.assertEquals(false, model.backup().policyEnforced()); - Assertions.assertEquals("pdggkzzlvm", model.backup().backupVaultId()); - Assertions.assertEquals("axmodfvuef", model.snapshot().snapshotPolicyId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java deleted file mode 100644 index 7f69b63ce8435..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesExportPolicyTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchPropertiesExportPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatchPropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":1421621714,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"kfvhqcrailvpn\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"},{\"ruleIndex\":1374740690,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"apnedgfbcvkc\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":346770564,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"vnhdldwmgxcxr\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]}") - .toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1421621714, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("kfvhqcrailvpn", model.rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatchPropertiesExportPolicy model = new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1421621714) - .withUnixReadOnly(false) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(true) - .withNfsv41(true) - .withAllowedClients("kfvhqcrailvpn") - .withHasRootAccess(true) - .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(1374740690) - .withUnixReadOnly(true) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) - .withNfsv41(true) - .withAllowedClients("apnedgfbcvkc") - .withHasRootAccess(false) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(346770564) - .withUnixReadOnly(true) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) - .withNfsv41(false) - .withAllowedClients("vnhdldwmgxcxr") - .withHasRootAccess(false) - .withChownMode(ChownMode.RESTRICTED))); - model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1421621714, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("kfvhqcrailvpn", model.rules().get(0).allowedClients()); - Assertions.assertEquals(true, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java deleted file mode 100644 index b9a13d20f8873..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; -import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatchProperties model = BinaryData.fromString( - "{\"serviceLevel\":\"StandardZRS\",\"usageThreshold\":719850312604044810,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":143823433,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"u\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"}]},\"throughputMibps\":98.184135,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"morppxebmnzbtbh\",\"policyEnforced\":false,\"backupVaultId\":\"kfgohdneue\"},\"snapshot\":{\"snapshotPolicyId\":\"hsd\"}},\"isDefaultQuotaEnabled\":false,\"defaultUserQuotaInKiBs\":5565577585562531934,\"defaultGroupQuotaInKiBs\":1588588646000724324,\"unixPermissions\":\"wwquuvxzxclvithh\",\"coolAccess\":false,\"coolnessPeriod\":1712807279,\"coolAccessRetrievalPolicy\":\"Never\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Enabled\"}") - .toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(719850312604044810L, model.usageThreshold()); - Assertions.assertEquals(143823433, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("u", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(98.184135F, model.throughputMibps()); - Assertions.assertEquals("morppxebmnzbtbh", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(false, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("kfgohdneue", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("hsd", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(false, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(5565577585562531934L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1588588646000724324L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("wwquuvxzxclvithh", model.unixPermissions()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(1712807279, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.NEVER, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.STANDARD_ZRS) - .withUsageThreshold(719850312604044810L) - .withExportPolicy(new VolumePatchPropertiesExportPolicy() - .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(143823433) - .withUnixReadOnly(false) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) - .withNfsv41(true) - .withAllowedClients("u") - .withHasRootAccess(false) - .withChownMode(ChownMode.RESTRICTED)))) - .withThroughputMibps(98.184135F) - .withDataProtection(new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("morppxebmnzbtbh") - .withPolicyEnforced(false) - .withBackupVaultId("kfgohdneue")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("hsd"))) - .withIsDefaultQuotaEnabled(false) - .withDefaultUserQuotaInKiBs(5565577585562531934L) - .withDefaultGroupQuotaInKiBs(1588588646000724324L) - .withUnixPermissions("wwquuvxzxclvithh") - .withCoolAccess(false) - .withCoolnessPeriod(1712807279) - .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.NEVER) - .withSnapshotDirectoryVisible(false) - .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) - .withSmbNonBrowsable(SmbNonBrowsable.ENABLED); - model = BinaryData.fromObject(model).toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); - Assertions.assertEquals(719850312604044810L, model.usageThreshold()); - Assertions.assertEquals(143823433, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("u", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.RESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(98.184135F, model.throughputMibps()); - Assertions.assertEquals("morppxebmnzbtbh", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(false, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("kfgohdneue", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("hsd", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(false, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(5565577585562531934L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1588588646000724324L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("wwquuvxzxclvithh", model.unixPermissions()); - Assertions.assertEquals(false, model.coolAccess()); - Assertions.assertEquals(1712807279, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.NEVER, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java deleted file mode 100644 index a0cc6abce69a1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.ServiceLevel; -import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; -import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import com.azure.resourcemanager.netapp.models.VolumePatch; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePatch model = BinaryData.fromString( - "{\"properties\":{\"serviceLevel\":\"Premium\",\"usageThreshold\":651752597881008375,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":267122524,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"r\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1463995661,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":true,\"cifs\":false,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"fthnzdn\",\"hasRootAccess\":false,\"chownMode\":\"Restricted\"},{\"ruleIndex\":424120477,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"gycdu\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":626119368,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":true,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"swiydmcwyhzdx\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]},\"throughputMibps\":39.878826,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"fznudaodvxzb\",\"policyEnforced\":true,\"backupVaultId\":\"ylpstdbhhxsrzdz\"},\"snapshot\":{\"snapshotPolicyId\":\"rsc\"}},\"isDefaultQuotaEnabled\":false,\"defaultUserQuotaInKiBs\":1189606992396926172,\"defaultGroupQuotaInKiBs\":4604879226339647444,\"unixPermissions\":\"mygtdssls\",\"coolAccess\":true,\"coolnessPeriod\":478767297,\"coolAccessRetrievalPolicy\":\"OnRead\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Enabled\"},\"location\":\"semwabnet\",\"tags\":{\"wubmwmbesldn\":\"szhedplvw\",\"lcxog\":\"wwtppj\",\"qqkdltfzxmhhvhgu\":\"okonzmnsikvmkqz\",\"xtibqdxbxwakbog\":\"eodkwobda\"},\"id\":\"xndlkzgxhu\",\"name\":\"iplbpodxunkbebxm\",\"type\":\"byyntwlrbqt\"}") - .toObject(VolumePatch.class); - Assertions.assertEquals("semwabnet", model.location()); - Assertions.assertEquals("szhedplvw", model.tags().get("wubmwmbesldn")); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(651752597881008375L, model.usageThreshold()); - Assertions.assertEquals(267122524, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("r", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(39.878826F, model.throughputMibps()); - Assertions.assertEquals("fznudaodvxzb", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(true, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("rsc", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(false, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(1189606992396926172L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4604879226339647444L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("mygtdssls", model.unixPermissions()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(478767297, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePatch model = new VolumePatch().withLocation("semwabnet") - .withTags(mapOf("wubmwmbesldn", "szhedplvw", "lcxog", "wwtppj", "qqkdltfzxmhhvhgu", "okonzmnsikvmkqz", - "xtibqdxbxwakbog", "eodkwobda")) - .withServiceLevel(ServiceLevel.PREMIUM) - .withUsageThreshold(651752597881008375L) - .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(267122524) - .withUnixReadOnly(false) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(false) - .withCifs(false) - .withNfsv3(true) - .withNfsv41(true) - .withAllowedClients("r") - .withHasRootAccess(false) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(1463995661) - .withUnixReadOnly(true) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(true) - .withCifs(false) - .withNfsv3(false) - .withNfsv41(true) - .withAllowedClients("fthnzdn") - .withHasRootAccess(false) - .withChownMode(ChownMode.RESTRICTED), - new ExportPolicyRule().withRuleIndex(424120477) - .withUnixReadOnly(true) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(true) - .withCifs(true) - .withNfsv3(false) - .withNfsv41(false) - .withAllowedClients("gycdu") - .withHasRootAccess(false) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(626119368) - .withUnixReadOnly(false) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(false) - .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(true) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(true) - .withCifs(true) - .withNfsv3(true) - .withNfsv41(true) - .withAllowedClients("swiydmcwyhzdx") - .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED)))) - .withThroughputMibps(39.878826F) - .withDataProtection(new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("fznudaodvxzb") - .withPolicyEnforced(true) - .withBackupVaultId("ylpstdbhhxsrzdz")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("rsc"))) - .withIsDefaultQuotaEnabled(false) - .withDefaultUserQuotaInKiBs(1189606992396926172L) - .withDefaultGroupQuotaInKiBs(4604879226339647444L) - .withUnixPermissions("mygtdssls") - .withCoolAccess(true) - .withCoolnessPeriod(478767297) - .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) - .withSnapshotDirectoryVisible(false) - .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) - .withSmbNonBrowsable(SmbNonBrowsable.ENABLED); - model = BinaryData.fromObject(model).toObject(VolumePatch.class); - Assertions.assertEquals("semwabnet", model.location()); - Assertions.assertEquals("szhedplvw", model.tags().get("wubmwmbesldn")); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(651752597881008375L, model.usageThreshold()); - Assertions.assertEquals(267122524, model.exportPolicy().rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).cifs()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("r", model.exportPolicy().rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.exportPolicy().rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.exportPolicy().rules().get(0).chownMode()); - Assertions.assertEquals(39.878826F, model.throughputMibps()); - Assertions.assertEquals("fznudaodvxzb", model.dataProtection().backup().backupPolicyId()); - Assertions.assertEquals(true, model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("rsc", model.dataProtection().snapshot().snapshotPolicyId()); - Assertions.assertEquals(false, model.isDefaultQuotaEnabled()); - Assertions.assertEquals(1189606992396926172L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4604879226339647444L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("mygtdssls", model.unixPermissions()); - Assertions.assertEquals(true, model.coolAccess()); - Assertions.assertEquals(478767297, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(false, model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java deleted file mode 100644 index 53a415c3a95f1..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.ReplicationObject; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; -import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; -import com.azure.resourcemanager.netapp.models.VolumeRelocationProperties; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumePropertiesDataProtectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"jfauvjfdxxi\",\"policyEnforced\":false,\"backupVaultId\":\"t\"},\"replication\":{\"replicationId\":\"qtdo\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"vwvxyslqbhsfx\",\"remoteVolumeRegion\":\"lyt\"},\"snapshot\":{\"snapshotPolicyId\":\"mpew\"},\"volumeRelocation\":{\"relocationRequested\":true,\"readyToBeFinalized\":true}}") - .toObject(VolumePropertiesDataProtection.class); - Assertions.assertEquals("jfauvjfdxxi", model.backup().backupPolicyId()); - Assertions.assertEquals(false, model.backup().policyEnforced()); - Assertions.assertEquals("t", model.backup().backupVaultId()); - Assertions.assertEquals(EndpointType.DST, model.replication().endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replication().replicationSchedule()); - Assertions.assertEquals("vwvxyslqbhsfx", model.replication().remoteVolumeResourceId()); - Assertions.assertEquals("lyt", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("mpew", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.volumeRelocation().relocationRequested()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePropertiesDataProtection model = new VolumePropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("jfauvjfdxxi") - .withPolicyEnforced(false) - .withBackupVaultId("t")) - .withReplication(new ReplicationObject().withEndpointType(EndpointType.DST) - .withReplicationSchedule(ReplicationSchedule.ONE_ZEROMINUTELY) - .withRemoteVolumeResourceId("vwvxyslqbhsfx") - .withRemoteVolumeRegion("lyt")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("mpew")) - .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(true)); - model = BinaryData.fromObject(model).toObject(VolumePropertiesDataProtection.class); - Assertions.assertEquals("jfauvjfdxxi", model.backup().backupPolicyId()); - Assertions.assertEquals(false, model.backup().policyEnforced()); - Assertions.assertEquals("t", model.backup().backupVaultId()); - Assertions.assertEquals(EndpointType.DST, model.replication().endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replication().replicationSchedule()); - Assertions.assertEquals("vwvxyslqbhsfx", model.replication().remoteVolumeResourceId()); - Assertions.assertEquals("lyt", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("mpew", model.snapshot().snapshotPolicyId()); - Assertions.assertEquals(true, model.volumeRelocation().relocationRequested()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java deleted file mode 100644 index 07e8373416a26..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesExportPolicyTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.ChownMode; -import com.azure.resourcemanager.netapp.models.ExportPolicyRule; -import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VolumePropertiesExportPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumePropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":1554305939,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":false,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"qwwncw\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":808952037,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"fqbuaceopzf\",\"hasRootAccess\":false,\"chownMode\":\"Unrestricted\"}]}") - .toObject(VolumePropertiesExportPolicy.class); - Assertions.assertEquals(1554305939, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("qwwncw", model.rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumePropertiesExportPolicy model = new VolumePropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1554305939) - .withUnixReadOnly(false) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(true) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) - .withKerberos5PReadWrite(false) - .withCifs(false) - .withNfsv3(true) - .withNfsv41(true) - .withAllowedClients("qwwncw") - .withHasRootAccess(false) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(808952037) - .withUnixReadOnly(false) - .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) - .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) - .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) - .withNfsv41(true) - .withAllowedClients("fqbuaceopzf") - .withHasRootAccess(false) - .withChownMode(ChownMode.UNRESTRICTED))); - model = BinaryData.fromObject(model).toObject(VolumePropertiesExportPolicy.class); - Assertions.assertEquals(1554305939, model.rules().get(0).ruleIndex()); - Assertions.assertEquals(false, model.rules().get(0).unixReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).unixReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadOnly()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertEquals(true, model.rules().get(0).kerberos5PReadOnly()); - Assertions.assertEquals(false, model.rules().get(0).kerberos5PReadWrite()); - Assertions.assertEquals(false, model.rules().get(0).cifs()); - Assertions.assertEquals(true, model.rules().get(0).nfsv3()); - Assertions.assertEquals(true, model.rules().get(0).nfsv41()); - Assertions.assertEquals("qwwncw", model.rules().get(0).allowedClients()); - Assertions.assertEquals(false, model.rules().get(0).hasRootAccess()); - Assertions.assertEquals(ChownMode.UNRESTRICTED, model.rules().get(0).chownMode()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java deleted file mode 100644 index ba6a5a1f3e123..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRuleInnerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; -import com.azure.resourcemanager.netapp.models.Type; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRuleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Moving\",\"quotaSizeInKiBs\":2185926262396381637,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"zphv\"},\"location\":\"uyqncygupkvipmd\",\"tags\":{\"totxhojujb\":\"xqupevzhf\"},\"id\":\"pelmcuvhixbjxyf\",\"name\":\"n\",\"type\":\"lrcoolsttpki\"}") - .toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("uyqncygupkvipmd", model.location()); - Assertions.assertEquals("xqupevzhf", model.tags().get("totxhojujb")); - Assertions.assertEquals(2185926262396381637L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("zphv", model.quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("uyqncygupkvipmd") - .withTags(mapOf("totxhojujb", "xqupevzhf")) - .withQuotaSizeInKiBs(2185926262396381637L) - .withQuotaType(Type.DEFAULT_GROUP_QUOTA) - .withQuotaTarget("zphv"); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("uyqncygupkvipmd", model.location()); - Assertions.assertEquals("xqupevzhf", model.tags().get("totxhojujb")); - Assertions.assertEquals(2185926262396381637L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); - Assertions.assertEquals("zphv", model.quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java deleted file mode 100644 index 95e5b79eced77..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulePatchTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRulePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRulePatch model = BinaryData.fromString( - "{\"tags\":{\"xcbihw\":\"ithtywu\",\"twjchrdg\":\"knfd\"},\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":7107037042754238104,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"ndz\"}}") - .toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("ithtywu", model.tags().get("xcbihw")); - Assertions.assertEquals(7107037042754238104L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("ndz", model.quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRulePatch model = new VolumeQuotaRulePatch().withTags(mapOf("xcbihw", "ithtywu", "twjchrdg", "knfd")) - .withQuotaSizeInKiBs(7107037042754238104L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("ndz"); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("ithtywu", model.tags().get("xcbihw")); - Assertions.assertEquals(7107037042754238104L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("ndz", model.quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java deleted file mode 100644 index a167d437c0126..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesCreateMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":4495626237459310184,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"urbuhhlkyqltq\"},\"location\":\"ogtu\",\"tags\":{\"n\":\"fdjktsysidfvclgl\",\"qogsfikayian\":\"uijtkbu\",\"t\":\"haru\",\"yjqtt\":\"iqxf\"},\"id\":\"wkpqhjpenuygbq\",\"name\":\"qqekewvnqvcdlgu\",\"type\":\"ucmfdj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VolumeQuotaRule response = manager.volumeQuotaRules() - .define("jbgdlfgtdysnaquf") - .withRegion("yjleziunjx") - .withExistingVolume("o", "gebx", "cnwfepbnwgfmxjg", "g") - .withTags(mapOf("qa", "antkwcegyamlbns", "m", "jjvpilguooqja", "hrtdtpdelq", "itgueiookjbs")) - .withQuotaSizeInKiBs(989283416847724320L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("jrwdkqz") - .create(); - - Assertions.assertEquals("ogtu", response.location()); - Assertions.assertEquals("fdjktsysidfvclgl", response.tags().get("n")); - Assertions.assertEquals(4495626237459310184L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.quotaType()); - Assertions.assertEquals("urbuhhlkyqltq", response.quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java deleted file mode 100644 index 266a3ad64c061..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumeQuotaRules() - .delete("cbuewmrswnjlxuz", "hwpusxj", "aqehg", "dohzjq", "tu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java deleted file mode 100644 index 607b40539781d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":907482374428904956,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"fjmyccxlzhco\"},\"location\":\"vnekhenlusfnrdtj\",\"tags\":{\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\"},\"id\":\"iesfuug\",\"name\":\"tuqfecjxeygtu\",\"type\":\"xu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VolumeQuotaRule response = manager.volumeQuotaRules() - .getWithResponse("ctfjgtixr", "vzuyturmlmu", "wolba", "iropionszon", "pngajin", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vnekhenlusfnrdtj", response.location()); - Assertions.assertEquals("r", response.tags().get("cq")); - Assertions.assertEquals(907482374428904956L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("fjmyccxlzhco", response.quotaTarget()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java deleted file mode 100644 index da2c2fd8c0970..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListByVolumeMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumeQuotaRulesListByVolumeMockTests { - @Test - public void testListByVolume() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":1476688386116323232,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"uahokq\"},\"location\":\"bkau\",\"tags\":{\"phwpnulaiywzej\":\"sh\",\"llndnpd\":\"whslwkoj\"},\"id\":\"rpqaf\",\"name\":\"fugsnnfhyetefy\",\"type\":\"oc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.volumeQuotaRules() - .listByVolume("ozqvbubqmam", "sycxhxzgaz", "taboidvmf", "hppubowsepdfgkmt", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bkau", response.iterator().next().location()); - Assertions.assertEquals("sh", response.iterator().next().tags().get("phwpnulaiywzej")); - Assertions.assertEquals(1476688386116323232L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("uahokq", response.iterator().next().quotaTarget()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java deleted file mode 100644 index e27de5a7e0220..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesListTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner; -import com.azure.resourcemanager.netapp.models.Type; -import com.azure.resourcemanager.netapp.models.VolumeQuotaRulesList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRulesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRulesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":4753379128237183611,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"tsgumhj\"},\"location\":\"ikkx\",\"tags\":{\"vuzlm\":\"olbq\"},\"id\":\"felfktg\",\"name\":\"lcrpw\",\"type\":\"xeznoi\"},{\"properties\":{\"provisioningState\":\"Patching\",\"quotaSizeInKiBs\":336408309015246228,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"nbsazejjoqkag\"},\"location\":\"sxtta\",\"tags\":{\"mkqjj\":\"xnfaazpxdtnk\",\"pyouaibrebqaays\":\"wuenvr\"},\"id\":\"kixqtnqtt\",\"name\":\"zlwfffiakp\",\"type\":\"pqqmted\"}]}") - .toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("ikkx", model.value().get(0).location()); - Assertions.assertEquals("olbq", model.value().get(0).tags().get("vuzlm")); - Assertions.assertEquals(4753379128237183611L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("tsgumhj", model.value().get(0).quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRulesList model = new VolumeQuotaRulesList().withValue(Arrays.asList( - new VolumeQuotaRuleInner().withLocation("ikkx") - .withTags(mapOf("vuzlm", "olbq")) - .withQuotaSizeInKiBs(4753379128237183611L) - .withQuotaType(Type.DEFAULT_GROUP_QUOTA) - .withQuotaTarget("tsgumhj"), - new VolumeQuotaRuleInner().withLocation("sxtta") - .withTags(mapOf("mkqjj", "xnfaazpxdtnk", "pyouaibrebqaays", "wuenvr")) - .withQuotaSizeInKiBs(336408309015246228L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("nbsazejjoqkag"))); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("ikkx", model.value().get(0).location()); - Assertions.assertEquals("olbq", model.value().get(0).tags().get("vuzlm")); - Assertions.assertEquals(4753379128237183611L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("tsgumhj", model.value().get(0).quotaTarget()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java deleted file mode 100644 index bc3634a52bf7a..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeQuotaRulesPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties; -import com.azure.resourcemanager.netapp.models.Type; -import org.junit.jupiter.api.Assertions; - -public final class VolumeQuotaRulesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeQuotaRulesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Moving\",\"quotaSizeInKiBs\":1232834909698748994,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"wvtylbfpncurdo\"}") - .toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(1232834909698748994L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("wvtylbfpncurdo", model.quotaTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(1232834909698748994L) - .withQuotaType(Type.INDIVIDUAL_USER_QUOTA) - .withQuotaTarget("wvtylbfpncurdo"); - model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(1232834909698748994L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("wvtylbfpncurdo", model.quotaTarget()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java deleted file mode 100644 index 7ebdaf532ab9f..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeRelocationProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumeRelocationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeRelocationProperties model - = BinaryData.fromString("{\"relocationRequested\":false,\"readyToBeFinalized\":false}") - .toObject(VolumeRelocationProperties.class); - Assertions.assertEquals(false, model.relocationRequested()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeRelocationProperties model = new VolumeRelocationProperties().withRelocationRequested(false); - model = BinaryData.fromObject(model).toObject(VolumeRelocationProperties.class); - Assertions.assertEquals(false, model.relocationRequested()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java deleted file mode 100644 index 043f0a9595bcb..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeRevert; -import org.junit.jupiter.api.Assertions; - -public final class VolumeRevertTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"sbpfvmwyhr\"}").toObject(VolumeRevert.class); - Assertions.assertEquals("sbpfvmwyhr", model.snapshotId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeRevert model = new VolumeRevert().withSnapshotId("sbpfvmwyhr"); - model = BinaryData.fromObject(model).toObject(VolumeRevert.class); - Assertions.assertEquals("sbpfvmwyhr", model.snapshotId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java deleted file mode 100644 index 5e2622fc1e70d..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; -import org.junit.jupiter.api.Assertions; - -public final class VolumeSnapshotPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeSnapshotProperties model - = BinaryData.fromString("{\"snapshotPolicyId\":\"bsrfbj\"}").toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("bsrfbj", model.snapshotPolicyId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("bsrfbj"); - model = BinaryData.fromObject(model).toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("bsrfbj", model.snapshotPolicyId()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java deleted file mode 100644 index 39700d6b12fd0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesAuthorizeReplicationMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.AuthorizeRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesAuthorizeReplicationMockTests { - @Test - public void testAuthorizeReplication() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .authorizeReplication("qgleohibetnluank", "rfxeeebtij", "acvbmqz", "qqxlajr", - new AuthorizeRequest().withRemoteVolumeResourceId("xaceve"), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java deleted file mode 100644 index 85e2d6feedeb7..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakFileLocksMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesBreakFileLocksMockTests { - @Test - public void testBreakFileLocks() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .breakFileLocks("vacqpbtuodxesz", "bbelawumuaslzk", "rrwoycqucwyhahn", "mdr", - new BreakFileLocksRequest().withClientIp("wuhpsvfuur").withConfirmRunningDisruptiveOperation(false), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java deleted file mode 100644 index 503b394c588f0..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesBreakReplicationMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesBreakReplicationMockTests { - @Test - public void testBreakReplication() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .breakReplication("mysu", "swqrntvlwijp", "ttexoqqpwcyyufmh", "uncuw", - new BreakReplicationRequest().withForceBreakReplication(false), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java deleted file mode 100644 index c2a8f8866b1e5..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesDeleteReplicationMockTests { - @Test - public void testDeleteReplication() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .deleteReplication("absnmfpp", "ojeevy", "yhsgz", "czbgomfgbeg", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java deleted file mode 100644 index e7c5166b7a003..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesFinalizeRelocationMockTests { - @Test - public void testFinalizeRelocation() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .finalizeRelocation("gcmjkavl", "or", "mftpmdtz", "jltfvnzcyjtotpv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java deleted file mode 100644 index 7ad33144463ec..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; -import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesListGetGroupIdListForLdapUserMockTests { - @Test - public void testListGetGroupIdListForLdapUser() throws Exception { - String responseStr = "{\"groupIdsForLdapUser\":[\"bn\"]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - GetGroupIdListForLdapUserResponse response = manager.volumes() - .listGetGroupIdListForLdapUser("we", "xwlalniexzsrzpg", "pqtybb", "wpgdak", - new GetGroupIdListForLdapUserRequest().withUsername("hzyvlixqnrkcx"), com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bn", response.groupIdsForLdapUser().get(0)); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java deleted file mode 100644 index d11148497fdaf..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.EndpointType; -import com.azure.resourcemanager.netapp.models.Replication; -import com.azure.resourcemanager.netapp.models.ReplicationSchedule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesListReplicationsMockTests { - @Test - public void testListReplications() throws Exception { - String responseStr - = "{\"value\":[{\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"sccbiuimzd\",\"remoteVolumeRegion\":\"jdfqwmkyoqufdvr\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.volumes() - .listReplications("olihrra", "ouau", "rjtloq", "fuojrngif", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(EndpointType.SRC, response.iterator().next().endpointType()); - Assertions.assertEquals(ReplicationSchedule.HOURLY, response.iterator().next().replicationSchedule()); - Assertions.assertEquals("sccbiuimzd", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("jdfqwmkyoqufdvr", response.iterator().next().remoteVolumeRegion()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java deleted file mode 100644 index 0a4408211e5b4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesPoolChangeMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.PoolChangeRequest; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesPoolChangeMockTests { - @Test - public void testPoolChange() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .poolChange("irpghriypoqeyh", "qhykprlpyzn", "ciqdsme", "iitdfuxt", - new PoolChangeRequest().withNewPoolResourceId("asiibmiybnnust"), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java deleted file mode 100644 index ca62cf44162ca..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesReInitializeReplicationMockTests { - @Test - public void testReInitializeReplication() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .reInitializeReplication("jkuyxoafgaoq", "tfaeyl", "nm", "gv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java deleted file mode 100644 index 4eacc4bc6d55c..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.MirrorState; -import com.azure.resourcemanager.netapp.models.RelationshipStatus; -import com.azure.resourcemanager.netapp.models.ReplicationStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesReplicationStatusWithResponseMockTests { - @Test - public void testReplicationStatusWithResponse() throws Exception { - String responseStr - = "{\"healthy\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"cw\",\"errorMessage\":\"xjumvq\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicationStatus response = manager.volumes() - .replicationStatusWithResponse("pkcdqzhlct", "dunqnd", "fpch", "qbnj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.healthy()); - Assertions.assertEquals(RelationshipStatus.IDLE, response.relationshipStatus()); - Assertions.assertEquals(MirrorState.MIRRORED, response.mirrorState()); - Assertions.assertEquals("cw", response.totalProgress()); - Assertions.assertEquals("xjumvq", response.errorMessage()); - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java deleted file mode 100644 index 09af184ede856..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesResyncReplicationMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesResyncReplicationMockTests { - @Test - public void testResyncReplication() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .resyncReplication("zslzojhp", "tfnmdx", "tngfdgugeyzihgr", "yui", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java deleted file mode 100644 index d13c5e4f7e2c4..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import com.azure.resourcemanager.netapp.models.VolumeRevert; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesRevertMockTests { - @Test - public void testRevert() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .revert("qjctzenkeif", "zhmkdasvflyh", "xcudchxgsr", "oldforobw", - new VolumeRevert().withSnapshotId("vizbfhfo"), com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java deleted file mode 100644 index e6a7118b91944..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesRevertRelocationMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.netapp.NetAppFilesManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VolumesRevertRelocationMockTests { - @Test - public void testRevertRelocation() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NetAppFilesManager manager = NetAppFilesManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.volumes() - .revertRelocation("pvpbdbzqgqqiheds", "qwthmky", "bcysih", "gqcwdhohsdtmc", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java deleted file mode 100644 index 483bcb9add813..0000000000000 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/WeeklyScheduleTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.netapp.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.netapp.models.WeeklySchedule; -import org.junit.jupiter.api.Assertions; - -public final class WeeklyScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WeeklySchedule model = BinaryData.fromString( - "{\"snapshotsToKeep\":32059747,\"day\":\"ujmqlgkfbtndoa\",\"hour\":1440714343,\"minute\":1443237539,\"usedBytes\":4713729032495268823}") - .toObject(WeeklySchedule.class); - Assertions.assertEquals(32059747, model.snapshotsToKeep()); - Assertions.assertEquals("ujmqlgkfbtndoa", model.day()); - Assertions.assertEquals(1440714343, model.hour()); - Assertions.assertEquals(1443237539, model.minute()); - Assertions.assertEquals(4713729032495268823L, model.usedBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(32059747) - .withDay("ujmqlgkfbtndoa") - .withHour(1440714343) - .withMinute(1443237539) - .withUsedBytes(4713729032495268823L); - model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(32059747, model.snapshotsToKeep()); - Assertions.assertEquals("ujmqlgkfbtndoa", model.day()); - Assertions.assertEquals(1440714343, model.hour()); - Assertions.assertEquals(1443237539, model.minute()); - Assertions.assertEquals(4713729032495268823L, model.usedBytes()); - } -}