From 976a89d4e4673c861f7310494aeddfca0c5a2011 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Mon, 12 Oct 2026 03:51:40 +0000 Subject: [PATCH 1/3] Configurations: 'specification/databox/resource-manager/Microsoft.DataBox/DataBox/tspconfig.yaml', and CommitSHA: '53fc8d667c2b484f58c938166b1cd146e69467c5' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6943420 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 525 ++++- .../azure-resourcemanager-databox/README.md | 8 +- .../azure-resourcemanager-databox/SAMPLE.md | 86 +- .../azure-resourcemanager-databox/pom.xml | 12 +- .../databox/DataBoxManager.java | 42 +- .../fluent/DataBoxManagementClient.java | 34 +- .../databox/fluent/JobsClient.java | 260 +-- .../databox/fluent/OperationsClient.java | 10 +- .../fluent/ResourceProvidersClient.java | 6 +- .../databox/fluent/ServicesClient.java | 142 +- .../models/AddressValidationOutputInner.java | 15 +- .../databox/fluent/models/JobProperties.java | 26 +- .../fluent/models/JobResourceInner.java | 149 +- .../databox/fluent/models/OperationInner.java | 42 +- .../fluent/models/OperationProperties.java | 55 + .../RegionConfigurationResponseInner.java | 24 +- .../models/ShipmentPickUpResponseInner.java | 12 +- .../fluent/models/SkuInformationInner.java | 18 +- .../databox/fluent/models/SkuProperties.java | 21 +- .../models/UnencryptedCredentialsInner.java | 15 +- .../fluent/models/UpdateJobProperties.java | 13 +- .../models/ValidationResponseInner.java | 15 +- .../models/ValidationResponseProperties.java | 15 +- .../databox/fluent/models/package-info.java | 5 +- .../databox/fluent/package-info.java | 5 +- .../AddressValidationOutputImpl.java | 2 +- .../DataBoxManagementClientBuilder.java | 28 +- .../DataBoxManagementClientImpl.java | 100 +- .../implementation/JobResourceImpl.java | 56 +- .../implementation/JobsClientImpl.java | 1979 +++++++---------- .../databox/implementation/JobsImpl.java | 82 +- .../databox/implementation/OperationImpl.java | 6 +- .../implementation/OperationsClientImpl.java | 141 +- .../implementation/OperationsImpl.java | 2 +- .../RegionConfigurationResponseImpl.java | 2 +- .../implementation/ResourceManagerUtils.java | 2 +- .../ResourceProvidersClientImpl.java | 111 +- .../implementation/ResourceProvidersImpl.java | 2 +- .../implementation/ServicesClientImpl.java | 962 +++----- .../databox/implementation/ServicesImpl.java | 122 +- .../ShipmentPickUpResponseImpl.java | 2 +- .../implementation/SkuInformationImpl.java | 2 +- .../UnencryptedCredentialsImpl.java | 2 +- .../ValidationResponseImpl.java | 2 +- .../models/AvailableSkusResult.java | 41 +- .../models/JobResourceList.java | 52 +- .../models/OperationList.java | 42 +- .../models/UnencryptedCredentialsList.java | 52 +- .../databox/implementation/package-info.java | 5 +- .../databox/models/AccessProtocol.java | 8 +- .../models/AccountCredentialDetails.java | 15 +- .../databox/models/AdditionalErrorInfo.java | 42 +- .../databox/models/AddressType.java | 8 +- .../models/AddressValidationOutput.java | 2 +- .../models/AddressValidationProperties.java | 19 +- .../models/AddressValidationStatus.java | 8 +- .../models/ApplianceNetworkConfiguration.java | 12 +- .../databox/models/AvailableSkuRequest.java | 26 +- .../models/AzureFileFilterDetails.java | 10 +- .../databox/models/BlobFilterDetails.java | 10 +- .../databox/models/CancellationReason.java | 17 +- .../databox/models/ClassDiscriminator.java | 10 +- .../databox/models/CloudError.java | 55 +- .../databox/models/ContactDetails.java | 28 +- .../databox/models/ContactInfo.java | 21 +- .../databox/models/CopyLogDetails.java | 12 +- .../databox/models/CopyProgress.java | 15 +- .../databox/models/CopyStatus.java | 38 +- .../databox/models/CreateJobValidations.java | 21 +- ...LimitForSubscriptionValidationRequest.java | 19 +- ...scriptionValidationResponseProperties.java | 16 +- .../models/CustomerDiskJobSecrets.java | 22 +- .../models/CustomerResolutionCode.java | 14 +- .../databox/models/DataAccountDetails.java | 10 +- .../databox/models/DataAccountType.java | 6 +- .../models/DataBoxAccountCopyLogDetails.java | 13 +- .../DataBoxCustomerDiskCopyLogDetails.java | 13 +- .../DataBoxCustomerDiskCopyProgress.java | 16 +- .../models/DataBoxCustomerDiskJobDetails.java | 87 +- .../models/DataBoxDiskCopyLogDetails.java | 13 +- .../models/DataBoxDiskCopyProgress.java | 15 +- .../DataBoxDiskGranularCopyLogDetails.java | 13 +- .../DataBoxDiskGranularCopyProgress.java | 16 +- .../databox/models/DataBoxDiskJobDetails.java | 69 +- .../databox/models/DataBoxDiskJobSecrets.java | 22 +- .../DataBoxHeavyAccountCopyLogDetails.java | 13 +- .../models/DataBoxHeavyJobDetails.java | 63 +- .../models/DataBoxHeavyJobSecrets.java | 22 +- .../databox/models/DataBoxHeavySecret.java | 18 +- .../databox/models/DataBoxJobDetails.java | 63 +- .../DataBoxScheduleAvailabilityRequest.java | 19 +- .../databox/models/DataBoxSecret.java | 18 +- .../databox/models/DataCenterCode.java | 20 +- .../databox/models/DataExportDetails.java | 27 +- .../databox/models/DataImportDetails.java | 20 +- .../DataLocationToServiceLocationMap.java | 12 +- .../DataTransferDetailsValidationRequest.java | 30 +- ...erDetailsValidationResponseProperties.java | 16 +- .../databox/models/DataboxJobSecrets.java | 37 +- .../DatacenterAddressInstructionResponse.java | 13 +- .../DatacenterAddressLocationResponse.java | 13 +- .../models/DatacenterAddressRequest.java | 23 +- .../models/DatacenterAddressResponse.java | 12 +- .../databox/models/DatacenterAddressType.java | 6 +- .../databox/models/DcAccessSecurityCode.java | 38 +- .../models/DelayNotificationStatus.java | 6 +- .../models/DeviceCapabilityDetails.java | 12 +- .../models/DeviceCapabilityRequest.java | 10 +- .../models/DeviceCapabilityResponse.java | 15 +- .../databox/models/DeviceErasureDetails.java | 21 +- .../DiskScheduleAvailabilityRequest.java | 19 +- .../databox/models/DiskSecret.java | 12 +- .../databox/models/DoubleEncryption.java | 6 +- .../databox/models/EncryptionPreferences.java | 10 +- .../databox/models/ExportDiskDetails.java | 12 +- .../databox/models/FilterFileDetails.java | 23 +- .../databox/models/FilterFileType.java | 6 +- .../models/GranularCopyLogDetails.java | 12 +- .../databox/models/GranularCopyProgress.java | 15 +- .../databox/models/HardwareEncryption.java | 6 +- .../HeavyScheduleAvailabilityRequest.java | 19 +- .../databox/models/IdentityProperties.java | 13 +- .../databox/models/ImportDiskDetails.java | 25 +- .../databox/models/JobDelayDetails.java | 12 +- .../databox/models/JobDeliveryInfo.java | 10 +- .../databox/models/JobDeliveryType.java | 6 +- .../databox/models/JobDetails.java | 58 +- .../databox/models/JobResource.java | 88 +- .../models/JobResourceUpdateParameter.java | 16 +- .../databox/models/JobSecrets.java | 18 +- .../databox/models/JobStages.java | 15 +- .../resourcemanager/databox/models/Jobs.java | 138 +- .../databox/models/KekType.java | 6 +- .../databox/models/KeyEncryptionKey.java | 20 +- .../models/LastMitigationActionOnJob.java | 50 +- .../databox/models/LogCollectionLevel.java | 6 +- .../databox/models/ManagedDiskDetails.java | 24 +- .../models/MarkDevicesShippedRequest.java | 20 +- .../databox/models/MitigateJobRequest.java | 10 +- .../databox/models/ModelName.java | 14 +- .../models/NotificationPreference.java | 18 +- .../databox/models/NotificationStageName.java | 18 +- .../databox/models/Operation.java | 9 +- .../databox/models/OperationDisplay.java | 60 +- .../databox/models/Operations.java | 10 +- .../models/OverallValidationStatus.java | 8 +- .../databox/models/PackageCarrierDetails.java | 10 +- .../databox/models/PackageCarrierInfo.java | 10 +- .../models/PackageShippingDetails.java | 12 +- .../databox/models/PortalDelayErrorCode.java | 10 +- .../databox/models/Preferences.java | 19 +- .../models/PreferencesValidationRequest.java | 22 +- ...eferencesValidationResponseProperties.java | 16 +- .../models/RegionConfigurationRequest.java | 22 +- .../models/RegionConfigurationResponse.java | 2 +- .../databox/models/ResourceIdentity.java | 17 +- .../databox/models/ResourceProviders.java | 6 +- .../models/ReverseShippingDetails.java | 16 +- .../ReverseShippingDetailsEditStatus.java | 9 +- .../ReverseTransportPreferenceEditStatus.java | 9 +- .../models/ScheduleAvailabilityRequest.java | 18 +- .../models/ScheduleAvailabilityResponse.java | 12 +- .../databox/models/Services.java | 134 +- .../models/ShareCredentialDetails.java | 12 +- .../models/ShareDestinationFormatType.java | 14 +- .../databox/models/ShipmentPickUpRequest.java | 27 +- .../models/ShipmentPickUpResponse.java | 2 +- .../databox/models/ShippingAddress.java | 21 +- .../resourcemanager/databox/models/Sku.java | 16 +- .../SkuAvailabilityValidationRequest.java | 34 +- ...ilabilityValidationResponseProperties.java | 16 +- .../databox/models/SkuCapacity.java | 12 +- .../databox/models/SkuCost.java | 12 +- .../databox/models/SkuDisabledReason.java | 14 +- .../databox/models/SkuInformation.java | 2 +- .../databox/models/SkuName.java | 12 +- .../databox/models/StageName.java | 44 +- .../databox/models/StageStatus.java | 28 +- .../databox/models/StorageAccountDetails.java | 19 +- ...IsAllowedToCreateJobValidationRequest.java | 11 +- ...CreateJobValidationResponseProperties.java | 16 +- .../databox/models/TransferAllDetails.java | 18 +- .../databox/models/TransferConfiguration.java | 24 +- ...ansferConfigurationTransferAllDetails.java | 13 +- ...ferConfigurationTransferFilterDetails.java | 13 +- .../models/TransferConfigurationType.java | 6 +- .../databox/models/TransferFilterDetails.java | 27 +- .../databox/models/TransferType.java | 6 +- .../models/TransportAvailabilityDetails.java | 12 +- .../models/TransportAvailabilityRequest.java | 10 +- .../models/TransportAvailabilityResponse.java | 15 +- .../databox/models/TransportPreferences.java | 18 +- .../models/TransportShipmentTypes.java | 6 +- .../models/UnencryptedCredentials.java | 2 +- .../databox/models/UpdateJobDetails.java | 28 +- .../databox/models/UserAssignedIdentity.java | 20 +- .../models/UserAssignedProperties.java | 10 +- .../databox/models/ValidateAddress.java | 28 +- .../models/ValidationInputDiscriminator.java | 14 +- .../models/ValidationInputRequest.java | 16 +- .../models/ValidationInputResponse.java | 21 +- .../databox/models/ValidationRequest.java | 20 +- .../databox/models/ValidationResponse.java | 2 +- .../databox/models/ValidationStatus.java | 8 +- .../databox/models/package-info.java | 5 +- .../resourcemanager/databox/package-info.java | 5 +- .../src/main/java/module-info.java | 3 +- ...zure-resourcemanager-databox_metadata.json | 1 + .../JobsBookShipmentPickUpSamples.java | 5 +- .../databox/generated/JobsCancelSamples.java | 5 +- .../databox/generated/JobsCreateSamples.java | 18 +- .../databox/generated/JobsDeleteSamples.java | 5 +- .../JobsGetByResourceGroupSamples.java | 17 +- .../JobsListByResourceGroupSamples.java | 5 +- .../generated/JobsListCredentialsSamples.java | 5 +- .../databox/generated/JobsListSamples.java | 5 +- .../JobsMarkDevicesShippedSamples.java | 5 +- .../databox/generated/JobsUpdateSamples.java | 11 +- .../generated/OperationsListSamples.java | 5 +- .../ResourceProviderMitigateSamples.java | 5 +- ...stAvailableSkusByResourceGroupSamples.java | 5 +- ...onConfigurationByResourceGroupSamples.java | 5 +- .../ServiceRegionConfigurationSamples.java | 5 +- .../ServiceValidateAddressSamples.java | 5 +- ...eValidateInputsByResourceGroupSamples.java | 6 +- .../ServiceValidateInputsSamples.java | 5 +- .../generated/AdditionalErrorInfoTests.java | 13 +- .../ApplianceNetworkConfigurationTests.java | 10 +- .../generated/AvailableSkuRequestTests.java | 23 +- .../generated/AvailableSkusResultTests.java | 15 +- .../AzureFileFilterDetailsTests.java | 24 +- .../generated/BlobFilterDetailsTests.java | 23 +- .../generated/CancellationReasonTests.java | 10 +- .../generated/ContactDetailsTests.java | 44 +- .../databox/generated/ContactInfoTests.java | 28 +- .../generated/CopyLogDetailsTests.java | 8 +- .../generated/CreateJobValidationsTests.java | 8 +- ...ForSubscriptionValidationRequestTests.java | 10 +- .../DataBoxAccountCopyLogDetailsTests.java | 10 +- ...ataBoxCustomerDiskCopyLogDetailsTests.java | 10 +- .../DataBoxDiskCopyLogDetailsTests.java | 10 +- ...ataBoxDiskGranularCopyLogDetailsTests.java | 10 +- ...ataBoxHeavyAccountCopyLogDetailsTests.java | 10 +- ...taBoxScheduleAvailabilityRequestTests.java | 26 +- ...DataLocationToServiceLocationMapTests.java | 10 +- ...centerAddressInstructionResponseTests.java | 10 +- ...atacenterAddressLocationResponseTests.java | 10 +- .../DatacenterAddressRequestTests.java | 23 +- .../DatacenterAddressResponseTests.java | 10 +- .../DeviceCapabilityDetailsTests.java | 8 +- .../DeviceCapabilityRequestTests.java | 17 +- .../DeviceCapabilityResponseTests.java | 10 +- .../DiskScheduleAvailabilityRequestTests.java | 28 +- .../generated/EncryptionPreferencesTests.java | 10 +- .../generated/ExportDiskDetailsTests.java | 10 +- .../generated/FilterFileDetailsTests.java | 10 +- .../GranularCopyLogDetailsTests.java | 8 +- ...HeavyScheduleAvailabilityRequestTests.java | 23 +- .../generated/IdentityPropertiesTests.java | 16 +- .../generated/JobDeliveryInfoTests.java | 10 +- ...okShipmentPickUpWithResponseMockTests.java | 12 +- .../JobsCancelWithResponseMockTests.java | 4 +- .../generated/JobsDeleteMockTests.java | 4 +- ...rkDevicesShippedWithResponseMockTests.java | 6 +- .../generated/KeyEncryptionKeyTests.java | 34 +- .../LastMitigationActionOnJobTests.java | 22 +- .../MarkDevicesShippedRequestTests.java | 17 +- .../NotificationPreferenceTests.java | 14 +- .../generated/OperationDisplayTests.java | 25 +- .../generated/OperationInnerTests.java | 13 +- .../databox/generated/OperationListTests.java | 15 +- .../generated/OperationPropertiesTests.java | 15 + .../generated/OperationsListMockTests.java | 6 +- .../generated/PackageCarrierDetailsTests.java | 22 +- .../generated/PackageCarrierInfoTests.java | 14 +- .../PackageShippingDetailsTests.java | 10 +- .../databox/generated/PreferencesTests.java | 41 +- .../PreferencesValidationRequestTests.java | 36 +- .../RegionConfigurationRequestTests.java | 54 +- ...RegionConfigurationResponseInnerTests.java | 10 +- .../generated/ResourceIdentityTests.java | 13 +- .../ScheduleAvailabilityRequestTests.java | 16 +- .../ScheduleAvailabilityResponseTests.java | 10 +- ...AvailableSkusByResourceGroupMockTests.java | 14 +- ...nByResourceGroupWithResponseMockTests.java | 25 +- ...ionConfigurationWithResponseMockTests.java | 28 +- .../generated/ShipmentPickUpRequestTests.java | 22 +- .../ShipmentPickUpResponseInnerTests.java | 10 +- ...SkuAvailabilityValidationRequestTests.java | 34 +- .../databox/generated/SkuCapacityTests.java | 10 +- .../databox/generated/SkuCostTests.java | 10 +- .../generated/SkuInformationInnerTests.java | 10 +- .../databox/generated/SkuPropertiesTests.java | 10 +- .../databox/generated/SkuTests.java | 22 +- ...owedToCreateJobValidationRequestTests.java | 2 +- .../generated/TransferAllDetailsTests.java | 16 +- .../generated/TransferConfigurationTests.java | 91 +- ...rConfigurationTransferAllDetailsTests.java | 14 +- ...nfigurationTransferFilterDetailsTests.java | 67 +- .../generated/TransferFilterDetailsTests.java | 57 +- .../TransportAvailabilityDetailsTests.java | 8 +- .../TransportAvailabilityRequestTests.java | 2 +- .../TransportAvailabilityResponseTests.java | 14 +- .../generated/TransportPreferencesTests.java | 2 +- .../generated/UserAssignedIdentityTests.java | 7 +- .../UserAssignedPropertiesTests.java | 10 +- .../ValidationInputRequestTests.java | 2 +- .../generated/ValidationRequestTests.java | 2 +- .../tsp-location.yaml | 4 + 310 files changed, 3763 insertions(+), 6231 deletions(-) create mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java rename sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/{ => implementation}/models/AvailableSkusResult.java (72%) rename sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/{ => implementation}/models/JobResourceList.java (67%) rename sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/{ => implementation}/models/OperationList.java (71%) rename sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/{ => implementation}/models/UnencryptedCredentialsList.java (67%) create mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/resources/META-INF/azure-resourcemanager-databox_metadata.json create mode 100644 sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationPropertiesTests.java create mode 100644 sdk/databox/azure-resourcemanager-databox/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 7dc52a84669dd..2b2227973bd50 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -351,7 +351,7 @@ com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-cognitiveservices;1.4.0;1.5.0-beta.5 com.azure.resourcemanager:azure-resourcemanager-customerinsights;1.0.0-beta.3;1.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-databox;1.1.0;1.2.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-databox;1.1.0;1.2.0 com.azure.resourcemanager:azure-resourcemanager-datamigration;1.2.0;1.3.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-devspaces;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-devtestlabs;1.2.0;1.3.0-beta.1 diff --git a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md index 5c7677224de5d..0bfa53844169d 100644 --- a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md +++ b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md @@ -1,14 +1,531 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0 (2026-10-12) -### Features Added +- Azure Resource Manager Data Box client library for Java. This package contains Microsoft Azure SDK for Data Box Management SDK. Package api-version 2025-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.UnencryptedCredentialsList` was removed + +#### `models.OperationList` was removed + +#### `models.JobResourceList` was removed + +#### `models.AvailableSkusResult` was removed + +#### `models.DataBoxAccountCopyLogDetails` was modified + +* `DataBoxAccountCopyLogDetails()` was changed to private access +* `validate()` was removed + +#### `models.TransportAvailabilityRequest` was modified + +* `validate()` was removed + +#### `models.DataBoxDiskCopyProgress` was modified + +* `DataBoxDiskCopyProgress()` was changed to private access +* `validate()` was removed + +#### `models.TransferConfiguration` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentity` was modified + +* `validate()` was removed + +#### `models.TransferConfigurationTransferAllDetails` was modified + +* `validate()` was removed + +#### `models.AccountCredentialDetails` was modified + +* `AccountCredentialDetails()` was changed to private access +* `validate()` was removed + +#### `models.UpdateJobDetails` was modified + +* `validate()` was removed + +#### `models.DataBoxCustomerDiskCopyLogDetails` was modified + +* `DataBoxCustomerDiskCopyLogDetails()` was changed to private access +* `validate()` was removed + +#### `models.DataBoxDiskGranularCopyProgress` was modified + +* `DataBoxDiskGranularCopyProgress()` was changed to private access +* `validate()` was removed + +#### `models.DeviceCapabilityDetails` was modified + +* `DeviceCapabilityDetails()` was changed to private access +* `validate()` was removed + +#### `models.DataboxJobSecrets` was modified + +* `DataboxJobSecrets()` was changed to private access +* `withPodSecrets(java.util.List)` was removed +* `validate()` was removed + +#### `models.DataBoxHeavyJobDetails` was modified + +* `validate()` was removed + +#### `models.JobResourceUpdateParameter` was modified + +* `validate()` was removed + +#### `models.JobDelayDetails` was modified + +* `JobDelayDetails()` was changed to private access +* `validate()` was removed + +#### `models.JobDetails` was modified + +* `validate()` was removed + +#### `models.DataBoxHeavyAccountCopyLogDetails` was modified + +* `DataBoxHeavyAccountCopyLogDetails()` was changed to private access +* `validate()` was removed + +#### `models.PackageShippingDetails` was modified + +* `PackageShippingDetails()` was changed to private access +* `validate()` was removed + +#### `models.FilterFileDetails` was modified + +* `validate()` was removed + +#### `models.DataImportDetails` was modified + +* `validate()` was removed + +#### `models.DataBoxDiskJobSecrets` was modified + +* `DataBoxDiskJobSecrets()` was changed to private access +* `validate()` was removed + +#### `models.IdentityProperties` was modified + +* `validate()` was removed + +#### `models.TransferConfigurationTransferFilterDetails` was modified + +* `validate()` was removed + +#### `models.JobSecrets` was modified + +* `validate()` was removed + +#### `models.SkuAvailabilityValidationRequest` was modified + +* `validate()` was removed + +#### `models.TransportAvailabilityDetails` was modified + +* `TransportAvailabilityDetails()` was changed to private access +* `validate()` was removed + +#### `models.DataAccountDetails` was modified + +* `validate()` was removed + +#### `models.TransferFilterDetails` was modified + +* `validate()` was removed + +#### `models.DiskScheduleAvailabilityRequest` was modified + +* `validate()` was removed + +#### `models.PreferencesValidationResponseProperties` was modified + +* `PreferencesValidationResponseProperties()` was changed to private access +* `validate()` was removed + +#### `models.DeviceCapabilityResponse` was modified + +* `DeviceCapabilityResponse()` was changed to private access +* `validate()` was removed + +#### `models.ShareCredentialDetails` was modified + +* `ShareCredentialDetails()` was changed to private access +* `validate()` was removed + +#### `models.ScheduleAvailabilityRequest` was modified + +* `validate()` was removed + +#### `models.ContactDetails` was modified + +* `validate()` was removed + +#### `models.StorageAccountDetails` was modified + +* `validate()` was removed + +#### `models.DataBoxJobDetails` was modified + +* `validate()` was removed + +#### `models.ResourceIdentity` was modified + +* `validate()` was removed + +#### `models.CancellationReason` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `withDescription(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `validate()` was removed +* `withProvider(java.lang.String)` was removed + +#### `models.AdditionalErrorInfo` was modified + +* `AdditionalErrorInfo()` was changed to private access +* `withType(java.lang.String)` was removed +* `withInfo(java.lang.Object)` was removed +* `validate()` was removed + +#### `models.DcAccessSecurityCode` was modified + +* `DcAccessSecurityCode()` was changed to private access +* `withForwardDCAccessCode(java.lang.String)` was removed +* `validate()` was removed +* `withReverseDCAccessCode(java.lang.String)` was removed + +#### `models.ManagedDiskDetails` was modified + +* `validate()` was removed + +#### `models.BlobFilterDetails` was modified + +* `validate()` was removed + +#### `models.DataBoxDiskJobDetails` was modified + +* `validate()` was removed + +#### `models.DataTransferDetailsValidationResponseProperties` was modified + +* `DataTransferDetailsValidationResponseProperties()` was changed to private access +* `validate()` was removed + +#### `models.DataExportDetails` was modified + +* `validate()` was removed + +#### `models.CustomerDiskJobSecrets` was modified + +* `CustomerDiskJobSecrets()` was changed to private access +* `validate()` was removed + +#### `models.HeavyScheduleAvailabilityRequest` was modified + +* `validate()` was removed + +#### `models.DeviceCapabilityRequest` was modified + +* `validate()` was removed + +#### `models.Preferences` was modified + +* `validate()` was removed + +#### `models.SubscriptionIsAllowedToCreateJobValidationRequest` was modified + +* `validate()` was removed + +#### `models.JobDeliveryInfo` was modified + +* `validate()` was removed + +#### `models.DataBoxCustomerDiskCopyProgress` was modified + +* `DataBoxCustomerDiskCopyProgress()` was changed to private access +* `validate()` was removed + +#### `models.ValidationInputResponse` was modified + +* `validate()` was removed + +#### `models.PackageCarrierInfo` was modified + +* `validate()` was removed + +#### `models.PackageCarrierDetails` was modified + +* `validate()` was removed + +#### `models.ScheduleAvailabilityResponse` was modified + +* `ScheduleAvailabilityResponse()` was changed to private access +* `validate()` was removed + +#### `models.ImportDiskDetails` was modified + +* `validate()` was removed + +#### `models.TransferAllDetails` was modified + +* `validate()` was removed + +#### `models.ExportDiskDetails` was modified + +* `ExportDiskDetails()` was changed to private access +* `validate()` was removed + +#### `models.LastMitigationActionOnJob` was modified + +* `LastMitigationActionOnJob()` was changed to private access +* `withActionDateTimeInUtc(java.time.OffsetDateTime)` was removed +* `validate()` was removed +* `withCustomerResolution(models.CustomerResolutionCode)` was removed +* `withIsPerformedByCustomer(java.lang.Boolean)` was removed + +#### `models.RegionConfigurationRequest` was modified + +* `validate()` was removed + +#### `models.SkuCapacity` was modified + +* `SkuCapacity()` was changed to private access +* `validate()` was removed + +#### `models.CloudError` was modified + +* `CloudError()` was changed to private access +* `withMessage(java.lang.String)` was removed +* `withTarget(java.lang.String)` was removed +* `validate()` was removed +* `withCode(java.lang.String)` was removed + +#### `models.MarkDevicesShippedRequest` was modified + +* `validate()` was removed + +#### `models.DatacenterAddressResponse` was modified + +* `validate()` was removed + +#### `models.JobStages` was modified + +* `JobStages()` was changed to private access +* `validate()` was removed + +#### `models.EncryptionPreferences` was modified + +* `validate()` was removed + +#### `models.ApplianceNetworkConfiguration` was modified + +* `ApplianceNetworkConfiguration()` was changed to private access +* `validate()` was removed + +#### `models.DataTransferDetailsValidationRequest` was modified + +* `validate()` was removed + +#### `models.ContactInfo` was modified + +* `validate()` was removed + +#### `models.DataBoxDiskCopyLogDetails` was modified + +* `DataBoxDiskCopyLogDetails()` was changed to private access +* `validate()` was removed + +#### `models.SkuCost` was modified + +* `SkuCost()` was changed to private access +* `validate()` was removed + +#### `models.DatacenterAddressLocationResponse` was modified + +* `DatacenterAddressLocationResponse()` was changed to private access +* `validate()` was removed + +#### `models.CreateOrderLimitForSubscriptionValidationResponseProperties` was modified + +* `CreateOrderLimitForSubscriptionValidationResponseProperties()` was changed to private access +* `validate()` was removed + +#### `models.DeviceErasureDetails` was modified + +* `DeviceErasureDetails()` was changed to private access +* `validate()` was removed + +#### `models.AvailableSkuRequest` was modified + +* `validate()` was removed + +#### `models.DataBoxScheduleAvailabilityRequest` was modified + +* `validate()` was removed + +#### `models.DiskSecret` was modified + +* `DiskSecret()` was changed to private access +* `validate()` was removed + +#### `models.SkuAvailabilityValidationResponseProperties` was modified + +* `SkuAvailabilityValidationResponseProperties()` was changed to private access +* `validate()` was removed + +#### `models.CreateJobValidations` was modified + +* `validate()` was removed + +#### `models.TransportPreferences` was modified + +* `validate()` was removed + +#### `models.ValidationInputRequest` was modified + +* `validate()` was removed + +#### `models.ShippingAddress` was modified + +* `validate()` was removed + +#### `models.AddressValidationProperties` was modified + +* `AddressValidationProperties()` was changed to private access +* `validate()` was removed + +#### `models.MitigateJobRequest` was modified + +* `validate()` was removed + +#### `models.NotificationPreference` was modified + +* `validate()` was removed + +#### `models.ShipmentPickUpRequest` was modified + +* `validate()` was removed + +#### `models.Operation` was modified + +* `properties()` was removed + +#### `models.DataBoxCustomerDiskJobDetails` was modified + +* `validate()` was removed + +#### `models.DatacenterAddressInstructionResponse` was modified + +* `DatacenterAddressInstructionResponse()` was changed to private access +* `validate()` was removed + +#### `models.KeyEncryptionKey` was modified + +* `validate()` was removed + +#### `models.GranularCopyProgress` was modified + +* `validate()` was removed + +#### `models.ValidateAddress` was modified + +* `validate()` was removed + +#### `models.DataLocationToServiceLocationMap` was modified + +* `DataLocationToServiceLocationMap()` was changed to private access +* `validate()` was removed + +#### `models.DatacenterAddressRequest` was modified + +* `validate()` was removed + +#### `models.ReverseShippingDetails` was modified + +* `validate()` was removed + +#### `models.SubscriptionIsAllowedToCreateJobValidationResponseProperties` was modified + +* `SubscriptionIsAllowedToCreateJobValidationResponseProperties()` was changed to private access +* `validate()` was removed + +#### `models.CreateOrderLimitForSubscriptionValidationRequest` was modified + +* `validate()` was removed + +#### `models.GranularCopyLogDetails` was modified + +* `validate()` was removed + +#### `models.Sku` was modified + +* `validate()` was removed + +#### `models.ValidationRequest` was modified + +* `validate()` was removed + +#### `models.DataBoxSecret` was modified + +* `DataBoxSecret()` was changed to private access +* `validate()` was removed + +#### `models.DataBoxHeavySecret` was modified + +* `DataBoxHeavySecret()` was changed to private access +* `validate()` was removed + +#### `models.DataBoxHeavyJobSecrets` was modified + +* `DataBoxHeavyJobSecrets()` was changed to private access +* `validate()` was removed + +#### `models.TransportAvailabilityResponse` was modified + +* `TransportAvailabilityResponse()` was changed to private access +* `validate()` was removed + +#### `models.CopyProgress` was modified + +* `validate()` was removed + +#### `models.DataBoxDiskGranularCopyLogDetails` was modified + +* `DataBoxDiskGranularCopyLogDetails()` was changed to private access +* `validate()` was removed + +#### `models.AzureFileFilterDetails` was modified + +* `validate()` was removed + +#### `models.PreferencesValidationRequest` was modified + +* `validate()` was removed + +#### `models.UserAssignedProperties` was modified + +* `validate()` was removed + +#### `models.CopyLogDetails` was modified + +* `validate()` was removed + +### Features Added + +#### `models.DeviceErasureDetails` was modified -### Other Changes +* `secureErasureCertificateSasKey()` was added ## 1.1.0 (2025-03-27) diff --git a/sdk/databox/azure-resourcemanager-databox/README.md b/sdk/databox/azure-resourcemanager-databox/README.md index 1d1cc6d8b98d9..3c99eb56a4ad1 100644 --- a/sdk/databox/azure-resourcemanager-databox/README.md +++ b/sdk/databox/azure-resourcemanager-databox/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager DataBox client library for Java +# Azure Resource Manager Data Box client library for Java -Azure Resource Manager DataBox client library for Java. +Azure Resource Manager Data Box client library for Java. -This package contains Microsoft Azure SDK for DataBox Management SDK. Package tag package-2025-02. 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 Data Box Management SDK. Package api-version 2025-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-databox - 1.1.0 + 1.2.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md index 424da235d188d..f4e20351a4e31 100644 --- a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md +++ b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md @@ -41,8 +41,7 @@ import java.time.OffsetDateTime; */ public final class JobsBookShipmentPickUpSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/BookShipmentPickupPost.json + * x-ms-original-file: 2025-07-01/BookShipmentPickupPost.json */ /** * Sample code: BookShipmentPickupPost. @@ -70,8 +69,7 @@ import com.azure.resourcemanager.databox.models.CancellationReason; */ public final class JobsCancelSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCancelPost.json + * x-ms-original-file: 2025-07-01/JobsCancelPost.json */ /** * Sample code: JobsCancelPost. @@ -119,8 +117,7 @@ import java.util.Map; */ public final class JobsCreateSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDevicePassword.json + * x-ms-original-file: 2025-07-01/JobsCreateDevicePassword.json */ /** * Sample code: JobsCreateDevicePassword. @@ -156,8 +153,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreate.json + * x-ms-original-file: 2025-07-01/JobsCreate.json */ /** * Sample code: JobsCreate. @@ -191,9 +187,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDoubleEncryption. - * json + * x-ms-original-file: 2025-07-01/JobsCreateDoubleEncryption.json */ /** * Sample code: JobsCreateDoubleEncryption. @@ -229,8 +223,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ - * JobsCreateWithUserAssignedIdentity.json + * x-ms-original-file: 2025-07-01/JobsCreateWithUserAssignedIdentity.json */ /** * Sample code: JobsCreateWithUserAssignedIdentity. @@ -268,8 +261,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateExport.json + * x-ms-original-file: 2025-07-01/JobsCreateExport.json */ /** * Sample code: JobsCreateExport. @@ -330,8 +322,7 @@ public final class JobsCreateSamples { */ public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsDelete.json + * x-ms-original-file: 2025-07-01/JobsDelete.json */ /** * Sample code: JobsDelete. @@ -352,8 +343,7 @@ public final class JobsDeleteSamples { */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGet.json + * x-ms-original-file: 2025-07-01/JobsGet.json */ /** * Sample code: JobsGet. @@ -367,8 +357,7 @@ public final class JobsGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCmk.json + * x-ms-original-file: 2025-07-01/JobsGetCmk.json */ /** * Sample code: JobsGetCmk. @@ -382,8 +371,7 @@ public final class JobsGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetExport.json + * x-ms-original-file: 2025-07-01/JobsGetExport.json */ /** * Sample code: JobsGetExport. @@ -397,8 +385,7 @@ public final class JobsGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCopyStuck.json + * x-ms-original-file: 2025-07-01/JobsGetCopyStuck.json */ /** * Sample code: JobsGetCopyStuck. @@ -412,8 +399,7 @@ public final class JobsGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetWaitingForAction.json + * x-ms-original-file: 2025-07-01/JobsGetWaitingForAction.json */ /** * Sample code: JobsGetWaitingForAction. @@ -436,8 +422,7 @@ public final class JobsGetByResourceGroupSamples { */ public final class JobsListSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsList.json + * x-ms-original-file: 2025-07-01/JobsList.json */ /** * Sample code: JobsList. @@ -458,8 +443,7 @@ public final class JobsListSamples { */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListByResourceGroup.json + * x-ms-original-file: 2025-07-01/JobsListByResourceGroup.json */ /** * Sample code: JobsListByResourceGroup. @@ -480,8 +464,7 @@ public final class JobsListByResourceGroupSamples { */ public final class JobsListCredentialsSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListCredentials.json + * x-ms-original-file: 2025-07-01/JobsListCredentials.json */ /** * Sample code: JobsListCredentials. @@ -505,8 +488,7 @@ import com.azure.resourcemanager.databox.models.PackageCarrierInfo; */ public final class JobsMarkDevicesShippedSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/MarkDevicesShipped.json + * x-ms-original-file: 2025-07-01/MarkDevicesShipped.json */ /** * Sample code: MarkDevicesShipped. @@ -546,8 +528,7 @@ import java.util.Map; */ public final class JobsUpdateSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsPatchCmk.json + * x-ms-original-file: 2025-07-01/JobsPatchCmk.json */ /** * Sample code: JobsPatchCmk. @@ -569,8 +550,7 @@ public final class JobsUpdateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ - * JobsPatchSystemAssignedToUserAssigned.json + * x-ms-original-file: 2025-07-01/JobsPatchSystemAssignedToUserAssigned.json */ /** * Sample code: JobsPatchSystemAssignedToUserAssigned. @@ -599,8 +579,7 @@ public final class JobsUpdateSamples { } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsPatch.json + * x-ms-original-file: 2025-07-01/JobsPatch.json */ /** * Sample code: JobsPatch. @@ -651,8 +630,7 @@ public final class JobsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/OperationsGet.json + * x-ms-original-file: 2025-07-01/OperationsGet.json */ /** * Sample code: OperationsGet. @@ -678,8 +656,7 @@ import java.util.Map; */ public final class ResourceProviderMitigateSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobMitigate.json + * x-ms-original-file: 2025-07-01/JobMitigate.json */ /** * Sample code: Mitigate. @@ -719,8 +696,7 @@ import com.azure.resourcemanager.databox.models.TransferType; */ public final class ServiceListAvailableSkusByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/AvailableSkusPost.json + * x-ms-original-file: 2025-07-01/AvailableSkusPost.json */ /** * Sample code: AvailableSkusPost. @@ -752,8 +728,7 @@ import com.azure.resourcemanager.databox.models.SkuName; */ public final class ServiceRegionConfigurationSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/RegionConfiguration.json + * x-ms-original-file: 2025-07-01/RegionConfiguration.json */ /** * Sample code: RegionConfiguration. @@ -786,8 +761,7 @@ import com.azure.resourcemanager.databox.models.SkuName; */ public final class ServiceRegionConfigurationByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ - * RegionConfigurationByResourceGroup.json + * x-ms-original-file: 2025-07-01/RegionConfigurationByResourceGroup.json */ /** * Sample code: RegionConfigurationByResourceGroup. @@ -822,8 +796,7 @@ import com.azure.resourcemanager.databox.models.ValidateAddress; */ public final class ServiceValidateAddressSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateAddressPost.json + * x-ms-original-file: 2025-07-01/ValidateAddressPost.json */ /** * Sample code: ValidateAddressPost. @@ -876,8 +849,7 @@ import java.util.Arrays; */ public final class ServiceValidateInputsSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputs.json + * x-ms-original-file: 2025-07-01/ValidateInputs.json */ /** * Sample code: ValidateInputs. @@ -951,9 +923,7 @@ import java.util.Arrays; */ public final class ServiceValidateInputsByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputsByResourceGroup - * .json + * x-ms-original-file: 2025-07-01/ValidateInputsByResourceGroup.json */ /** * Sample code: ValidateInputsByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/pom.xml b/sdk/databox/azure-resourcemanager-databox/pom.xml index ae3a39c16f813..99b5b965d44f1 100644 --- a/sdk/databox/azure-resourcemanager-databox/pom.xml +++ b/sdk/databox/azure-resourcemanager-databox/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-databox - 1.2.0-beta.1 + 1.2.0 jar - Microsoft Azure SDK for DataBox Management - This package contains Microsoft Azure SDK for DataBox Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2025-02. + Microsoft Azure SDK for Data Box Management + This package contains Microsoft Azure SDK for Data Box Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2025-07-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + false diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java index e6080d8796c37..2b3aaef321b0e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox; @@ -46,12 +46,12 @@ * Entry point to DataBoxManager. */ public final class DataBoxManager { + private ResourceProviders resourceProviders; + private Operations operations; private Jobs jobs; - private ResourceProviders resourceProviders; - private Services services; private final DataBoxManagementClient clientObject; @@ -67,11 +67,11 @@ private DataBoxManager(HttpPipeline httpPipeline, AzureProfile profile, Duration } /** - * Creates an instance of DataBox service API entry point. + * Creates an instance of Data Box service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the DataBox service API instance. + * @return the Data Box service API instance. */ public static DataBoxManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -80,11 +80,11 @@ public static DataBoxManager authenticate(TokenCredential credential, AzureProfi } /** - * Creates an instance of DataBox service API entry point. + * Creates an instance of Data Box service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the DataBox service API instance. + * @return the Data Box service API instance. */ public static DataBoxManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -206,11 +206,11 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of DataBox service API entry point. + * Creates an instance of Data Box service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the DataBox service API instance. + * @return the Data Box service API instance. */ public DataBoxManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -269,6 +269,18 @@ public DataBoxManager authenticate(TokenCredential credential, AzureProfile prof } } + /** + * Gets the resource collection API of ResourceProviders. + * + * @return Resource collection API of ResourceProviders. + */ + public ResourceProviders resourceProviders() { + if (this.resourceProviders == null) { + this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); + } + return resourceProviders; + } + /** * Gets the resource collection API of Operations. * @@ -293,18 +305,6 @@ public Jobs jobs() { return jobs; } - /** - * Gets the resource collection API of ResourceProviders. - * - * @return Resource collection API of ResourceProviders. - */ - public ResourceProviders resourceProviders() { - if (this.resourceProviders == null) { - this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); - } - return resourceProviders; - } - /** * Gets the resource collection API of Services. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java index f9af015c17e5c..d7199d40d0332 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent; @@ -12,26 +12,26 @@ */ public interface DataBoxManagementClient { /** - * Gets The Subscription Id. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -46,6 +46,13 @@ public interface DataBoxManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. + */ + ResourceProvidersClient getResourceProviders(); + /** * Gets the OperationsClient object to access its operations. * @@ -60,13 +67,6 @@ public interface DataBoxManagementClient { */ JobsClient getJobs(); - /** - * Gets the ResourceProvidersClient object to access its operations. - * - * @return the ResourceProvidersClient object. - */ - ResourceProvidersClient getResourceProviders(); - /** * Gets the ServicesClient object to access its operations. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java index 72bf8053df4c4..3fc97e3e1bff9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent; @@ -24,142 +24,129 @@ */ public interface JobsClient { /** - * Lists all the jobs available under the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the jobs available under the subscription. - * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skipToken, Context context); - - /** - * Request to mark devices for a given job as shipped. + * Gets information about the specified job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param expand $expand is supported on details parameter for job, which provides details on the job stages. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return information about the specified job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand, + Context context); /** - * Request to mark devices for a given job as shipped. + * Gets information about the specified job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the specified job. */ @ServiceMethod(returns = ReturnType.SINGLE) - void markDevicesShipped(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest); + JobResourceInner getByResourceGroup(String resourceGroupName, String jobName); /** - * Lists all the jobs available under the given resource group. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of job Resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName, + JobResourceInner jobResource); /** - * Lists all the jobs available under the given resource group. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of job Resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName, + JobResourceInner jobResource, Context context); /** - * Gets information about the specified job. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param expand $expand is supported on details parameter for job, which provides details on the job stages. - * @param context The context to associate with this operation. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job along with {@link Response}. + * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand, - Context context); + JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource); /** - * Gets information about the specified job. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job. + * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner getByResourceGroup(String resourceGroupName, String jobName); + JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, Context context); /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of job Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName, - JobResourceInner jobResource); + SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter); /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -167,33 +154,34 @@ SyncPoller, JobResourceInner> beginCreate(String re * @return the {@link SyncPoller} for polling of job Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName, - JobResourceInner jobResource, Context context); + SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context); /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource); + JobResourceInner update(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter); /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -201,12 +189,13 @@ SyncPoller, JobResourceInner> beginCreate(String re * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, Context context); + JobResourceInner update(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context); /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +209,7 @@ SyncPoller, JobResourceInner> beginCreate(String re /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. @@ -235,7 +224,7 @@ SyncPoller, JobResourceInner> beginCreate(String re /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,7 +237,7 @@ SyncPoller, JobResourceInner> beginCreate(String re /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. @@ -260,79 +249,58 @@ SyncPoller, JobResourceInner> beginCreate(String re void delete(String resourceGroupName, String jobName, Context context); /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context); /** - * Updates the properties of an existing job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner update(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Updates the properties of an existing job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner update(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String skipToken, Context context); /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. @@ -349,7 +317,7 @@ Response bookShipmentPickUpWithResponse(String reso /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. @@ -365,7 +333,7 @@ ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName, String /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -382,7 +350,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -396,7 +364,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -410,7 +378,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. @@ -422,4 +390,36 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listCredentials(String resourceGroupName, String jobName, Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void markDevicesShipped(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java index d9c826d2bfde3..ce4470f1652fb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent; @@ -15,23 +15,23 @@ */ public interface OperationsClient { /** - * This method gets all the operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection as paginated response with {@link PagedIterable}. + * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * This method gets all the operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection as paginated response with {@link PagedIterable}. + * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java index 218a8eb3749c1..114407fb907cd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent; @@ -19,7 +19,7 @@ public interface ResourceProvidersClient { * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,7 +36,7 @@ Response mitigateWithResponse(String jobName, String resourceGroupName, Mi * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java index e86cfe44d1c43..432c4b7468354 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent; @@ -23,42 +23,40 @@ */ public interface ServicesClient { /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. + * @return configuration response specific to a region along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, - AvailableSkuRequest availableSkuRequest); + @ServiceMethod(returns = ReturnType.SINGLE) + Response regionConfigurationWithResponse(String location, + RegionConfigurationRequest regionConfigurationRequest, Context context); /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. - * @param context The context to associate with this operation. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. + * @return configuration response specific to a region. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, - AvailableSkuRequest availableSkuRequest, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RegionConfigurationResponseInner regionConfiguration(String location, + RegionConfigurationRequest regionConfigurationRequest); /** * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -73,8 +71,8 @@ Response validateAddressWithResponse(String locati * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -84,11 +82,10 @@ Response validateAddressWithResponse(String locati AddressValidationOutputInner validateAddress(String location, ValidateAddress validateAddress); /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -96,57 +93,59 @@ Response validateAddressWithResponse(String locati * @return response of pre job creation validations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response validateInputsByResourceGroupWithResponse(String resourceGroupName, - String location, ValidationRequest validationRequest, Context context); + Response validateInputsWithResponse(String location, ValidationRequest validationRequest, + Context context); /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of pre job creation validations. */ @ServiceMethod(returns = ReturnType.SINGLE) - ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location, - ValidationRequest validationRequest); + ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest); /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response}. + * @return the available skus operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response validateInputsWithResponse(String location, ValidationRequest validationRequest, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, + AvailableSkuRequest availableSkuRequest); /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations. + * @return the available skus operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, + AvailableSkuRequest availableSkuRequest, Context context); /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -154,51 +153,52 @@ Response validateInputsWithResponse(String location, Va * @return configuration response specific to a region along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response regionConfigurationWithResponse(String location, - RegionConfigurationRequest regionConfigurationRequest, Context context); + Response regionConfigurationByResourceGroupWithResponse(String resourceGroupName, + String location, RegionConfigurationRequest regionConfigurationRequest, Context context); /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration response specific to a region. */ @ServiceMethod(returns = ReturnType.SINGLE) - RegionConfigurationResponseInner regionConfiguration(String location, + RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest); /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response}. + * @return response of pre job creation validations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response regionConfigurationByResourceGroupWithResponse(String resourceGroupName, - String location, RegionConfigurationRequest regionConfigurationRequest, Context context); + Response validateInputsByResourceGroupWithResponse(String resourceGroupName, + String location, ValidationRequest validationRequest, Context context); /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region. + * @return response of pre job creation validations. */ @ServiceMethod(returns = ReturnType.SINGLE) - RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, String location, - RegionConfigurationRequest regionConfigurationRequest); + ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location, + ValidationRequest validationRequest); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java index f076c75f4df13..45d9a26558f13 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent.models; @@ -25,7 +25,7 @@ public final class AddressValidationOutputInner implements JsonSerializable tags = reader.readMap(reader1 -> reader1.getString()); @@ -451,16 +430,10 @@ public static JobResourceInner fromJson(JsonReader jsonReader) throws IOExceptio deserializedJobResourceInner.innerProperties = JobProperties.fromJson(reader); } else if ("sku".equals(fieldName)) { deserializedJobResourceInner.sku = Sku.fromJson(reader); - } else if ("name".equals(fieldName)) { - deserializedJobResourceInner.name = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedJobResourceInner.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobResourceInner.type = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedJobResourceInner.systemData = SystemData.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedJobResourceInner.identity = ResourceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedJobResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java index 0b5359c7644a4..55d0fa85f821c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Operation entity. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * Name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} @@ -30,7 +30,7 @@ public final class OperationInner implements JsonSerializable { /* * Operation properties. */ - private Object properties; + private OperationProperties innerProperties; /* * Origin of the operation. Can be : user|system|user,system @@ -45,7 +45,7 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -68,12 +68,12 @@ public OperationDisplay display() { } /** - * Get the properties property: Operation properties. + * Get the innerProperties property: Operation properties. * - * @return the properties value. + * @return the innerProperties value. */ - public Object properties() { - return this.properties; + private OperationProperties innerProperties() { + return this.innerProperties; } /** @@ -94,28 +94,6 @@ public Boolean isDataAction() { return this.isDataAction; } - /** - * Set the isDataAction property: Indicates whether the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. - */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ @@ -146,7 +124,7 @@ public static OperationInner fromJson(JsonReader jsonReader) throws IOException } else if ("display".equals(fieldName)) { deserializedOperationInner.display = OperationDisplay.fromJson(reader); } else if ("properties".equals(fieldName)) { - deserializedOperationInner.properties = reader.readUntyped(); + deserializedOperationInner.innerProperties = OperationProperties.fromJson(reader); } else if ("origin".equals(fieldName)) { deserializedOperationInner.origin = reader.getString(); } else if ("isDataAction".equals(fieldName)) { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java new file mode 100644 index 0000000000000..244a06ea50a09 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databox.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 java.io.IOException; + +/** + * Operation properties. + */ +@Immutable +public final class OperationProperties implements JsonSerializable { + /** + * Creates an instance of OperationProperties class. + */ + private OperationProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + 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(); + + reader.skipChildren(); + } + + return deserializedOperationProperties; + }); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java index 9edb284add90e..fc78547b16207 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent.models; @@ -43,7 +43,7 @@ public final class RegionConfigurationResponseInner implements JsonSerializable< /** * Creates an instance of RegionConfigurationResponseInner class. */ - public RegionConfigurationResponseInner() { + private RegionConfigurationResponseInner() { } /** @@ -82,26 +82,6 @@ public DeviceCapabilityResponse deviceCapabilityResponse() { return this.deviceCapabilityResponse; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scheduleAvailabilityResponse() != null) { - scheduleAvailabilityResponse().validate(); - } - if (transportAvailabilityResponse() != null) { - transportAvailabilityResponse().validate(); - } - if (datacenterAddressResponse() != null) { - datacenterAddressResponse().validate(); - } - if (deviceCapabilityResponse() != null) { - deviceCapabilityResponse().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java index 32a2dde08b5e9..26bcb42ca0a4a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent.models; @@ -31,7 +31,7 @@ public final class ShipmentPickUpResponseInner implements JsonSerializable countriesWithinCommerceBoundary() { return this.innerProperties() == null ? null : this.innerProperties().countriesWithinCommerceBoundary(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java index 592df53f405ca..c31152727e7d1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent.models; @@ -64,7 +64,7 @@ public final class SkuProperties implements JsonSerializable { /** * Creates an instance of SkuProperties class. */ - public SkuProperties() { + private SkuProperties() { } /** @@ -140,23 +140,6 @@ public List countriesWithinCommerceBoundary() { return this.countriesWithinCommerceBoundary; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataLocationToServiceLocationMap() != null) { - dataLocationToServiceLocationMap().forEach(e -> e.validate()); - } - if (capacity() != null) { - capacity().validate(); - } - if (costs() != null) { - costs().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java index 37dc682217371..cd8c91aa178b8 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent.models; @@ -30,7 +30,7 @@ public final class UnencryptedCredentialsInner implements JsonSerializable individualResponseDetails() { return this.innerProperties() == null ? null : this.innerProperties().individualResponseDetails(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java index b33db6b77f932..979d7c35ef2bb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.fluent.models; @@ -32,7 +32,7 @@ public final class ValidationResponseProperties implements JsonSerializable individualResponseDetails() { return this.individualResponseDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (individualResponseDetails() != null) { - individualResponseDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java index 6622e3f1dd713..947c9c7122adc 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for DataBoxManagementClient. - * null. + * Package containing the inner data models for DataBox. */ package com.azure.resourcemanager.databox.fluent.models; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java index 38f4f4d0ec620..4d895107178cb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for DataBoxManagementClient. - * null. + * Package containing the service clients for DataBox. */ package com.azure.resourcemanager.databox.fluent; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java index 766aaeb42e348..d0ccbb17a4cf0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java index 67c2964a39c67..8a31cd4ab9cfc 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { DataBoxManagementClientImpl.class }) public final class DataBoxManagementClientBuilder { /* - * The Subscription Id + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The Subscription Id. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the DataBoxManagementClientBuilder. */ - public DataBoxManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public DataBoxManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the DataBoxManagementClientBuilder. */ - public DataBoxManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public DataBoxManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public DataBoxManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); DataBoxManagementClientImpl client = new DataBoxManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java index b70c81265c4ec..2b094b8faac39 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -15,12 +15,15 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.databox.fluent.DataBoxManagementClient; @@ -43,26 +46,12 @@ @ServiceClient(builder = DataBoxManagementClientBuilder.class) public final class DataBoxManagementClientImpl implements DataBoxManagementClient { /** - * The Subscription Id. - */ - private final String subscriptionId; - - /** - * Gets The Subscription Id. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -71,12 +60,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -84,6 +73,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -126,6 +129,20 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The ResourceProvidersClient object to access its operations. + */ + private final ResourceProvidersClient resourceProviders; + + /** + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. + */ + public ResourceProvidersClient getResourceProviders() { + return this.resourceProviders; + } + /** * The OperationsClient object to access its operations. */ @@ -154,20 +171,6 @@ public JobsClient getJobs() { return this.jobs; } - /** - * The ResourceProvidersClient object to access its operations. - */ - private final ResourceProvidersClient resourceProviders; - - /** - * Gets the ResourceProvidersClient object to access its operations. - * - * @return the ResourceProvidersClient object. - */ - public ResourceProvidersClient getResourceProviders() { - return this.resourceProviders; - } - /** * The ServicesClient object to access its operations. */ @@ -189,20 +192,20 @@ public ServicesClient getServices() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The Subscription Id. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ DataBoxManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2025-02-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-07-01"; + this.resourceProviders = new ResourceProvidersClientImpl(this); this.operations = new OperationsClientImpl(this); this.jobs = new JobsClientImpl(this); - this.resourceProviders = new ResourceProvidersClientImpl(this); this.services = new ServicesClientImpl(this); } @@ -243,6 +246,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -300,7 +320,7 @@ private static final class HttpResponseImpl extends HttpResponse { super(null); this.statusCode = statusCode; this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); } public int getStatusCode() { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java index d9380a12c5eb4..04b291410c6f6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -37,6 +37,18 @@ public final class JobResourceImpl implements JobResource, JobResource.Definitio private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + public String location() { return this.innerModel().location(); } @@ -50,22 +62,6 @@ public Map tags() { } } - public String name() { - return this.innerModel().name(); - } - - public String id() { - return this.innerModel().id(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - public Sku sku() { return this.innerModel().sku(); } @@ -74,6 +70,10 @@ public ResourceIdentity identity() { return this.innerModel().identity(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public TransferType transferType() { return this.innerModel().transferType(); } @@ -239,16 +239,6 @@ public JobResource refresh(Context context) { return this; } - public Response markDevicesShippedWithResponse(MarkDevicesShippedRequest markDevicesShippedRequest, - Context context) { - return serviceManager.jobs() - .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context); - } - - public void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest) { - serviceManager.jobs().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest); - } - public Response bookShipmentPickUpWithResponse(ShipmentPickUpRequest shipmentPickUpRequest, Context context) { return serviceManager.jobs() @@ -275,6 +265,16 @@ public PagedIterable listCredentials(Context context) { return serviceManager.jobs().listCredentials(resourceGroupName, jobName, context); } + public Response markDevicesShippedWithResponse(MarkDevicesShippedRequest markDevicesShippedRequest, + Context context) { + return serviceManager.jobs() + .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context); + } + + public void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest) { + serviceManager.jobs().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest); + } + public JobResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -341,6 +341,6 @@ public JobResourceImpl withIfMatch(String ifMatch) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java index d3a0be22c9cbc..f54bd46d430ef 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -29,6 +29,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -37,12 +38,12 @@ import com.azure.resourcemanager.databox.fluent.models.JobResourceInner; import com.azure.resourcemanager.databox.fluent.models.ShipmentPickUpResponseInner; import com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner; +import com.azure.resourcemanager.databox.implementation.models.JobResourceList; +import com.azure.resourcemanager.databox.implementation.models.UnencryptedCredentialsList; import com.azure.resourcemanager.databox.models.CancellationReason; -import com.azure.resourcemanager.databox.models.JobResourceList; import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest; import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; -import com.azure.resourcemanager.databox.models.UnencryptedCredentialsList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -75,833 +76,683 @@ public final class JobsClientImpl implements JobsClient { * The interface defining all the services for DataBoxManagementClientJobs to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") + @Host("{endpoint}") + @ServiceInterface(name = "DataBoxManagementClientJobs") public interface JobsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> markDevicesShipped(@HostParam("$host") String endpoint, - @PathParam("jobName") String jobName, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest, - @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") JobResourceInner jobResource, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobResourceInner jobResource, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") JobResourceInner jobResource, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") - @ExpectedResponses({ 200, 202, 204 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") JobResourceUpdateParameter jobResourceUpdateParameter, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") JobResourceUpdateParameter jobResourceUpdateParameter, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") JobResourceUpdateParameter jobResourceUpdateParameter, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> bookShipmentPickUp(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ShipmentPickUpRequest shipmentPickUpRequest, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> bookShipmentPickUp(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ShipmentPickUpRequest shipmentPickUpRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response bookShipmentPickUpSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ShipmentPickUpRequest shipmentPickUpRequest, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> cancel(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") CancellationReason cancellationReason, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel(@HostParam("$host") String endpoint, + Response cancelSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CancellationReason cancellationReason, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") CancellationReason cancellationReason, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listCredentials(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listCredentials(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + Response listCredentialsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> markDevicesShipped(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response markDevicesShippedSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - /** - * Lists all the jobs available under the subscription. - * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the jobs available under the subscription. - * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), skipToken, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the jobs available under the subscription. - * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists all the jobs available under the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - /** - * Lists all the jobs available under the subscription. - * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - /** - * Lists all the jobs available under the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skipToken = null; - return new PagedIterable<>(listAsync(skipToken)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listCredentialsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists all the jobs available under the subscription. - * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skipToken, Context context) { - return new PagedIterable<>(listAsync(skipToken, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listCredentialsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Request to mark devices for a given job as shipped. + * Gets information about the specified job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param expand $expand is supported on details parameter for job, which provides details on the job stages. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return information about the specified job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> markDevicesShippedWithResponseAsync(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (markDevicesShippedRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter markDevicesShippedRequest is required and cannot be null.")); - } else { - markDevicesShippedRequest.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String jobName, String expand) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.markDevicesShipped(this.client.getEndpoint(), jobName, - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), - markDevicesShippedRequest, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, expand, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Request to mark devices for a given job as shipped. - * - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> markDevicesShippedWithResponseAsync(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (markDevicesShippedRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter markDevicesShippedRequest is required and cannot be null.")); - } else { - markDevicesShippedRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.markDevicesShipped(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), markDevicesShippedRequest, accept, context); - } - - /** - * Request to mark devices for a given job as shipped. + * Gets information about the specified job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return information about the specified job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono markDevicesShippedAsync(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest) { - return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest) - .flatMap(ignored -> Mono.empty()); + private Mono getByResourceGroupAsync(String resourceGroupName, String jobName) { + final String expand = null; + return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Request to mark devices for a given job as shipped. + * Gets information about the specified job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param expand $expand is supported on details parameter for job, which provides details on the job stages. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest, Context context) { - return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest, context) - .block(); - } - - /** - * Request to mark devices for a given job as shipped. - * - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void markDevicesShipped(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest) { - markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, Context.NONE); - } - - /** - * Lists all the jobs available under the given resource group. - * - * @param resourceGroupName The Resource Group Name. - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return information about the specified job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skipToken) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, + String expand, Context context) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), skipToken, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, expand, accept, context); } /** - * Lists all the jobs available under the given resource group. + * Gets information about the specified job. * - * @param resourceGroupName The Resource Group Name. - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return information about the specified job. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skipToken, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + public JobResourceInner getByResourceGroup(String resourceGroupName, String jobName) { + final String expand = null; + return getByResourceGroupWithResponse(resourceGroupName, jobName, expand, Context.NONE).getValue(); } /** - * Lists all the jobs available under the given resource group. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedFlux}. + * @return job Resource along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String jobName, + JobResourceInner jobResource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, jobResource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the jobs available under the given resource group. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedFlux}. + * @return job Resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skipToken = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String jobName, + JobResourceInner jobResource) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, jobResource, + Context.NONE); } /** - * Lists all the jobs available under the given resource group. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedFlux}. + * @return job Resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String jobName, + JobResourceInner jobResource, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, jobResource, context); } /** - * Lists all the jobs available under the given resource group. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of job Resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skipToken = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JobResourceInner> beginCreateAsync(String resourceGroupName, + String jobName, JobResourceInner jobResource) { + Mono>> mono = createWithResponseAsync(resourceGroupName, jobName, jobResource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JobResourceInner.class, JobResourceInner.class, this.client.getContext()); } /** - * Lists all the jobs available under the given resource group. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of job Resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, + String jobName, JobResourceInner jobResource) { + Response response = createWithResponse(resourceGroupName, jobName, jobResource); + return this.client.getLroResult(response, JobResourceInner.class, + JobResourceInner.class, Context.NONE); } /** - * Gets information about the specified job. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param expand $expand is supported on details parameter for job, which provides details on the job stages. + * @param jobResource Job details from request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of job Resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String jobName, String expand) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), expand, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, + String jobName, JobResourceInner jobResource, Context context) { + Response response = createWithResponse(resourceGroupName, jobName, jobResource, context); + return this.client.getLroResult(response, JobResourceInner.class, + JobResourceInner.class, context); } /** - * Gets information about the specified job. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param expand $expand is supported on details parameter for job, which provides details on the job stages. - * @param context The context to associate with this operation. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job along with {@link Response} on successful completion of {@link Mono}. + * @return job Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String jobName, String expand, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - jobName, this.client.getApiVersion(), expand, accept, context); + private Mono createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) { + return beginCreateAsync(resourceGroupName, jobName, jobResource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets information about the specified job. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResource Job details from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job on successful completion of {@link Mono}. + * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String jobName) { - final String expand = null; - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, expand) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource) { + return beginCreate(resourceGroupName, jobName, jobResource).getFinalResult(); } /** - * Gets information about the specified job. + * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead + * be updated with the Update job API. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param expand $expand is supported on details parameter for job, which provides details on the job stages. + * @param jobResource Job details from request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job along with {@link Response}. + * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, - String expand, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, expand, context).block(); + public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, + Context context) { + return beginCreate(resourceGroupName, jobName, jobResource, context).getFinalResult(); } /** - * Gets information about the specified job. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job. + * @return job Resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner getByResourceGroup(String resourceGroupName, String jobName) { - final String expand = null; - return getByResourceGroupWithResponse(resourceGroupName, jobName, expand, Context.NONE).getValue(); + private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, ifMatch, contentType, accept, + jobResourceUpdateParameter, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource along with {@link Response} on successful completion of {@link Mono}. + * @return job Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String jobName, - JobResourceInner jobResource) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobResource == null) { - return Mono.error(new IllegalArgumentException("Parameter jobResource is required and cannot be null.")); - } else { - jobResource.validate(); - } + private Response updateWithResponse(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), jobResource, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, ifMatch, contentType, accept, + jobResourceUpdateParameter, Context.NONE); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource along with {@link Response} on successful completion of {@link Mono}. + * @return job Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String jobName, - JobResourceInner jobResource, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobResource == null) { - return Mono.error(new IllegalArgumentException("Parameter jobResource is required and cannot be null.")); - } else { - jobResource.validate(); - } + private Response updateWithResponse(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), jobResource, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, ifMatch, contentType, accept, + jobResourceUpdateParameter, context); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of job Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobResourceInner> beginCreateAsync(String resourceGroupName, - String jobName, JobResourceInner jobResource) { - Mono>> mono = createWithResponseAsync(resourceGroupName, jobName, jobResource); + private PollerFlux, JobResourceInner> beginUpdateAsync(String resourceGroupName, + String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobResourceInner.class, JobResourceInner.class, this.client.getContext()); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. - * @param context The context to associate with this operation. + * @param jobResourceUpdateParameter Job update parameters from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of job Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobResourceInner> beginCreateAsync(String resourceGroupName, - String jobName, JobResourceInner jobResource, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, JobResourceInner> beginUpdateAsync(String resourceGroupName, + String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + final String ifMatch = null; Mono>> mono - = createWithResponseAsync(resourceGroupName, jobName, jobResource, context); + = updateWithResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobResourceInner.class, JobResourceInner.class, context); + JobResourceInner.class, JobResourceInner.class, this.client.getContext()); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of job Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, - String jobName, JobResourceInner jobResource) { - return this.beginCreateAsync(resourceGroupName, jobName, jobResource).getSyncPoller(); + public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, + String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + Response response + = updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); + return this.client.getLroResult(response, JobResourceInner.class, + JobResourceInner.class, Context.NONE); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of job Resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, + String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + final String ifMatch = null; + Response response + = updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); + return this.client.getLroResult(response, JobResourceInner.class, + JobResourceInner.class, Context.NONE); + } + + /** + * Updates the properties of an existing job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @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. @@ -909,77 +760,83 @@ public SyncPoller, JobResourceInner> beginCreate(St * @return the {@link SyncPoller} for polling of job Resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, - String jobName, JobResourceInner jobResource, Context context) { - return this.beginCreateAsync(resourceGroupName, jobName, jobResource, context).getSyncPoller(); + public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, + String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { + Response response + = updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context); + return this.client.getLroResult(response, JobResourceInner.class, + JobResourceInner.class, context); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return job Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) { - return beginCreateAsync(resourceGroupName, jobName, jobResource).last() + private Mono updateAsync(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. - * @param context The context to associate with this operation. + * @param jobResourceUpdateParameter Job update parameters from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return job Resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource, - Context context) { - return beginCreateAsync(resourceGroupName, jobName, jobResource, context).last() + private Mono updateAsync(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter) { + final String ifMatch = null; + return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource) { - return createAsync(resourceGroupName, jobName, jobResource).block(); + public JobResourceInner update(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter) { + final String ifMatch = null; + return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).getFinalResult(); } /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. + * Updates the properties of an existing job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. + * @param jobResourceUpdateParameter Job update parameters from request body. + * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the + * server matches this value. * @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. @@ -987,15 +844,15 @@ public JobResourceInner create(String resourceGroupName, String jobName, JobReso * @return job Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, - Context context) { - return createAsync(resourceGroupName, jobName, jobResource, context).block(); + public JobResourceInner update(String resourceGroupName, String jobName, + JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { + return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context).getFinalResult(); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1005,107 +862,69 @@ public JobResourceInner create(String resourceGroupName, String jobName, JobReso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String jobName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String jobName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, Context.NONE); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String jobName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, context); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1115,13 +934,14 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName) { - return this.beginDeleteAsync(resourceGroupName, jobName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, jobName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. @@ -1132,13 +952,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context) { - return this.beginDeleteAsync(resourceGroupName, jobName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, jobName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1154,25 +975,7 @@ private Mono deleteAsync(String resourceGroupName, String jobName) { /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String jobName, Context context) { - return beginDeleteAsync(resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a job. - * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1181,13 +984,13 @@ private Mono deleteAsync(String resourceGroupName, String jobName, Context */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String jobName) { - deleteAsync(resourceGroupName, jobName).block(); + beginDelete(resourceGroupName, jobName).getFinalResult(); } /** * Deletes a job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. @@ -1197,366 +1000,259 @@ public void delete(String resourceGroupName, String jobName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String jobName, Context context) { - deleteAsync(resourceGroupName, jobName, context).block(); + beginDelete(resourceGroupName, jobName, context).getFinalResult(); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource along with {@link Response} on successful completion of {@link Mono}. + * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobResourceUpdateParameter == null) { - return Mono.error( - new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null.")); - } else { - jobResourceUpdateParameter.validate(); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String skipToken) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - jobName, this.client.getApiVersion(), ifMatch, jobResourceUpdateParameter, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, skipToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource along with {@link Response} on successful completion of {@link Mono}. + * @return job Resource Collection as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobResourceUpdateParameter == null) { - return Mono.error( - new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null.")); - } else { - jobResourceUpdateParameter.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), ifMatch, jobResourceUpdateParameter, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job Resource. + * @return job Resource Collection as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobResourceInner> beginUpdateAsync(String resourceGroupName, - String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobResourceInner.class, JobResourceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String skipToken = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job Resource. + * @return job Resource Collection along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobResourceInner> beginUpdateAsync(String resourceGroupName, - String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { - final String ifMatch = null; - Mono>> mono - = updateWithResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobResourceInner.class, JobResourceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String skipToken) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of job Resource. + * @return job Resource Collection along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobResourceInner> beginUpdateAsync(String resourceGroupName, - String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JobResourceInner.class, JobResourceInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String skipToken, + Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, - String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { - final String ifMatch = null; - return this.beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String skipToken = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, skipToken), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, - String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { - return this.beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, skipToken, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource on successful completion of {@link Mono}. + * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { - return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listSinglePageAsync(String skipToken) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), skipToken, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource on successful completion of {@link Mono}. + * @return job Resource Collection as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter) { - final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skipToken) { + return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. - * @param context The context to associate with this operation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job Resource Collection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String skipToken = null; + return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the jobs available under the subscription. + * + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource on successful completion of {@link Mono}. + * @return job Resource Collection along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { - return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String skipToken) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), skipToken, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. + * @return job Resource Collection along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner update(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter) { - final String ifMatch = null; - return updateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).block(); + private PagedResponse listSinglePage(String skipToken, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), skipToken, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Updates the properties of an existing job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner update(String resourceGroupName, String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { - return updateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String skipToken = null; + return new PagedIterable<>(() -> listSinglePage(skipToken), nextLink -> listNextSinglePage(nextLink)); } /** - * Book shipment pick up. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param shipmentPickUpRequest Details of shipment pick up request. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shipment pick up response along with {@link Response} on successful completion of {@link Mono}. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> bookShipmentPickUpWithResponseAsync(String resourceGroupName, - String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (shipmentPickUpRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter shipmentPickUpRequest is required and cannot be null.")); - } else { - shipmentPickUpRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.bookShipmentPickUp(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), shipmentPickUpRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String skipToken, Context context) { + return new PagedIterable<>(() -> listSinglePage(skipToken, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1564,38 +1260,20 @@ private Mono> bookShipmentPickUpWithRespon */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> bookShipmentPickUpWithResponseAsync(String resourceGroupName, - String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (shipmentPickUpRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter shipmentPickUpRequest is required and cannot be null.")); - } else { - shipmentPickUpRequest.validate(); - } + String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.bookShipmentPickUp(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - jobName, this.client.getApiVersion(), shipmentPickUpRequest, accept, context); + return FluxUtil + .withContext(context -> service.bookShipmentPickUp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, shipmentPickUpRequest, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. @@ -1614,7 +1292,7 @@ private Mono bookShipmentPickUpAsync(String resourc /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. @@ -1627,13 +1305,17 @@ private Mono bookShipmentPickUpAsync(String resourc @ServiceMethod(returns = ReturnType.SINGLE) public Response bookShipmentPickUpWithResponse(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context) { - return bookShipmentPickUpWithResponseAsync(resourceGroupName, jobName, shipmentPickUpRequest, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.bookShipmentPickUpSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, shipmentPickUpRequest, + context); } /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. @@ -1652,7 +1334,7 @@ public ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName, /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -1664,81 +1346,17 @@ public ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> cancelWithResponseAsync(String resourceGroupName, String jobName, CancellationReason cancellationReason) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (cancellationReason == null) { - return Mono - .error(new IllegalArgumentException("Parameter cancellationReason is required and cannot be null.")); - } else { - cancellationReason.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), cancellationReason, accept, context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, cancellationReason, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param cancellationReason Reason for cancellation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> cancelWithResponseAsync(String resourceGroupName, String jobName, - CancellationReason cancellationReason, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (cancellationReason == null) { - return Mono - .error(new IllegalArgumentException("Parameter cancellationReason is required and cannot be null.")); - } else { - cancellationReason.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), cancellationReason, accept, context); - } - - /** - * CancelJob. - * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -1755,7 +1373,7 @@ private Mono cancelAsync(String resourceGroupName, String jobName, Cancell /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -1768,13 +1386,15 @@ private Mono cancelAsync(String resourceGroupName, String jobName, Cancell @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelWithResponse(String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context) { - return cancelWithResponseAsync(resourceGroupName, jobName, cancellationReason, context).block(); + final String contentType = "application/json"; + return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, cancellationReason, context); } /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -1790,7 +1410,7 @@ public void cancel(String resourceGroupName, String jobName, CancellationReason /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1802,108 +1422,80 @@ public void cancel(String resourceGroupName, String jobName, CancellationReason @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listCredentialsSinglePageAsync(String resourceGroupName, String jobName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCredentialsSinglePageAsync(String resourceGroupName, - String jobName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listCredentials(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCredentialsAsync(String resourceGroupName, String jobName) { + return new PagedFlux<>(() -> listCredentialsSinglePageAsync(resourceGroupName, jobName), + nextLink -> listCredentialsNextSinglePageAsync(nextLink)); } /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}. + * @return list of unencrypted credentials for accessing device along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listCredentialsAsync(String resourceGroupName, String jobName) { - return new PagedFlux<>(() -> listCredentialsSinglePageAsync(resourceGroupName, jobName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listCredentialsSinglePage(String resourceGroupName, + String jobName) { + final String accept = "application/json"; + Response res + = service.listCredentialsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}. + * @return list of unencrypted credentials for accessing device along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listCredentialsAsync(String resourceGroupName, String jobName, - Context context) { - return new PagedFlux<>(() -> listCredentialsSinglePageAsync(resourceGroupName, jobName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listCredentialsSinglePage(String resourceGroupName, + String jobName, Context context) { + final String accept = "application/json"; + Response res = service.listCredentialsSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, jobName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1913,13 +1505,14 @@ private PagedFlux listCredentialsAsync(String resou */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listCredentials(String resourceGroupName, String jobName) { - return new PagedIterable<>(listCredentialsAsync(resourceGroupName, jobName)); + return new PagedIterable<>(() -> listCredentialsSinglePage(resourceGroupName, jobName), + nextLink -> listCredentialsNextSinglePage(nextLink)); } /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. @@ -1931,7 +1524,89 @@ public PagedIterable listCredentials(String resourc @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listCredentials(String resourceGroupName, String jobName, Context context) { - return new PagedIterable<>(listCredentialsAsync(resourceGroupName, jobName, context)); + return new PagedIterable<>(() -> listCredentialsSinglePage(resourceGroupName, jobName, context), + nextLink -> listCredentialsNextSinglePage(nextLink, context)); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> markDevicesShippedWithResponseAsync(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.markDevicesShipped(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, markDevicesShippedRequest, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono markDevicesShippedAsync(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest) { + return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest, Context context) { + final String contentType = "application/json"; + return service.markDevicesShippedSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, markDevicesShippedRequest, + context); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void markDevicesShipped(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest) { + markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, Context.NONE); } /** @@ -1944,21 +1619,34 @@ public PagedIterable listCredentials(String resourc * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The 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. + * @return job Resource Collection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1967,22 +1655,15 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return job Resource Collection along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1995,23 +1676,31 @@ private Mono> listNextSinglePageAsync(String nex * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The 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. + * @return job Resource Collection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2020,22 +1709,70 @@ private Mono> listByResourceGroupNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return job Resource Collection along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @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. + * @return list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCredentialsNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listCredentialsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The 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. + * @return list of unencrypted credentials for accessing device along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listCredentialsNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listCredentialsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of unencrypted credentials for accessing device along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listCredentialsNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listCredentialsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java index 9635c0fa95c23..64f756b9b0af1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -33,48 +33,12 @@ public JobsImpl(JobsClient innerClient, com.azure.resourcemanager.databox.DataBo this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); - } - - public Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest, Context context) { - return this.serviceClient() - .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context); - } - - public void markDevicesShipped(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest) { - this.serviceClient().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, jobName, expand, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new JobResourceImpl(inner.getValue(), this.manager())); } public JobResource getByResourceGroup(String resourceGroupName, String jobName) { @@ -94,16 +58,33 @@ public void delete(String resourceGroupName, String jobName, Context context) { this.serviceClient().delete(resourceGroupName, jobName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String skipToken, Context context) { + PagedIterable inner = this.serviceClient().list(skipToken, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); + } + public Response bookShipmentPickUpWithResponse(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context) { Response inner = this.serviceClient() .bookShipmentPickUpWithResponse(resourceGroupName, jobName, shipmentPickUpRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ShipmentPickUpResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ShipmentPickUpResponseImpl(inner.getValue(), this.manager())); } public ShipmentPickUpResponse bookShipmentPickUp(String resourceGroupName, String jobName, @@ -139,6 +120,17 @@ public PagedIterable listCredentials(String resourceGrou return ResourceManagerUtils.mapPage(inner, inner1 -> new UnencryptedCredentialsImpl(inner1, this.manager())); } + public Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest, Context context) { + return this.serviceClient() + .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context); + } + + public void markDevicesShipped(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest) { + this.serviceClient().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest); + } + public JobResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationImpl.java index 7a313e9b89f7d..9b9f87674f1d3 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -26,10 +26,6 @@ public OperationDisplay display() { return this.innerModel().display(); } - public Object properties() { - return this.innerModel().properties(); - } - public String origin() { return this.innerModel().origin(); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java index 458049150a512..5ac9a92894162 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.databox.fluent.OperationsClient; import com.azure.resourcemanager.databox.fluent.models.OperationInner; -import com.azure.resourcemanager.databox.models.OperationList; +import com.azure.resourcemanager.databox.implementation.models.OperationList; import reactor.core.publisher.Mono; /** @@ -59,14 +59,21 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for DataBoxManagementClientOperations to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") + @Host("{endpoint}") + @ServiceInterface(name = "DataBoxManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DataBox/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.DataBox/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,22 +81,26 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * This method gets all the operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the paginated list of connected cluster API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -100,78 +111,75 @@ private Mono> listSinglePageAsync() { } /** - * This method gets all the operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the paginated list of connected cluster API operations as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * This method gets all the operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection as paginated response with {@link PagedFlux}. + * @return the paginated list of connected cluster API operations along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * This method gets all the operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection as paginated response with {@link PagedFlux}. + * @return the paginated list of connected cluster API operations along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * This method gets all the operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection as paginated response with {@link PagedIterable}. + * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * This method gets all the operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection as paginated response with {@link PagedIterable}. + * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -181,17 +189,11 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the paginated list of connected cluster API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -199,6 +201,23 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @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. + * @return the paginated list of connected cluster API operations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -207,21 +226,13 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the paginated list of connected cluster API operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java index 98c18a666cede..acb58fc02a592 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java index 785942f8d3665..937f4a9682448 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java index 09d3196af770a..ecd01e28f57a2 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java index 15bee9b7a9030..886f284e7f845 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -55,18 +55,28 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien * The interface defining all the services for DataBoxManagementClientResourceProviders to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") + @Host("{endpoint}") + @ServiceInterface(name = "DataBoxManagementClientResourceProviders") public interface ResourceProvidersService { - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> mitigate(@HostParam("$host") String endpoint, @PathParam("jobName") String jobName, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MitigateJobRequest mitigateJobRequest, @HeaderParam("Accept") String accept, - Context context); + Mono> mitigate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") MitigateJobRequest mitigateJobRequest, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response mitigateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") MitigateJobRequest mitigateJobRequest, Context context); } /** @@ -74,7 +84,7 @@ Mono> mitigate(@HostParam("$host") String endpoint, @PathParam("j * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -84,32 +94,10 @@ Mono> mitigate(@HostParam("$host") String endpoint, @PathParam("j @ServiceMethod(returns = ReturnType.SINGLE) private Mono> mitigateWithResponseAsync(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (mitigateJobRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter mitigateJobRequest is required and cannot be null.")); - } else { - mitigateJobRequest.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext( - context -> service.mitigate(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), mitigateJobRequest, accept, context)) + .withContext(context -> service.mitigate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, mitigateJobRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -118,50 +106,7 @@ private Mono> mitigateWithResponseAsync(String jobName, String re * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param mitigateJobRequest Mitigation Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> mitigateWithResponseAsync(String jobName, String resourceGroupName, - MitigateJobRequest mitigateJobRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (mitigateJobRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter mitigateJobRequest is required and cannot be null.")); - } else { - mitigateJobRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.mitigate(this.client.getEndpoint(), jobName, this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), mitigateJobRequest, accept, context); - } - - /** - * Request to mitigate for a given job. - * - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -179,7 +124,7 @@ private Mono mitigateAsync(String jobName, String resourceGroupName, Mitig * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,7 +135,9 @@ private Mono mitigateAsync(String jobName, String resourceGroupName, Mitig @ServiceMethod(returns = ReturnType.SINGLE) public Response mitigateWithResponse(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context) { - return mitigateWithResponseAsync(jobName, resourceGroupName, mitigateJobRequest, context).block(); + final String contentType = "application/json"; + return service.mitigateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, mitigateJobRequest, context); } /** @@ -198,7 +145,7 @@ public Response mitigateWithResponse(String jobName, String resourceGroupN * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java index f1c35a41433db..470f33dc38a78 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java index 269ca9fb0d9c5..aabccf38405fa 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -32,8 +32,8 @@ import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner; import com.azure.resourcemanager.databox.fluent.models.SkuInformationInner; import com.azure.resourcemanager.databox.fluent.models.ValidationResponseInner; +import com.azure.resourcemanager.databox.implementation.models.AvailableSkusResult; import com.azure.resourcemanager.databox.models.AvailableSkuRequest; -import com.azure.resourcemanager.databox.models.AvailableSkusResult; import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; import com.azure.resourcemanager.databox.models.ValidateAddress; import com.azure.resourcemanager.databox.models.ValidationRequest; @@ -67,255 +67,219 @@ public final class ServicesClientImpl implements ServicesClient { * The interface defining all the services for DataBoxManagementClientServices to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") + @Host("{endpoint}") + @ServiceInterface(name = "DataBoxManagementClientServices") public interface ServicesService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAvailableSkusByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AvailableSkuRequest availableSkuRequest, - @HeaderParam("Accept") String accept, Context context); + Mono> regionConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegionConfigurationRequest regionConfigurationRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response regionConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegionConfigurationRequest regionConfigurationRequest, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateAddress(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidateAddress validateAddress, @HeaderParam("Accept") String accept, + Mono> validateAddress(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateAddress validateAddress, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateInputsByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidationRequest validationRequest, @HeaderParam("Accept") String accept, + Response validateAddressSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidateAddress validateAddress, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validateInputs(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ValidationRequest validationRequest, @HeaderParam("Accept") String accept, + Mono> validateInputs(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidationRequest validationRequest, + Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateInputsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ValidationRequest validationRequest, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regionConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegionConfigurationRequest regionConfigurationRequest, - @HeaderParam("Accept") String accept, Context context); + Mono> listAvailableSkusByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AvailableSkuRequest availableSkuRequest, Context context); @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAvailableSkusByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AvailableSkuRequest availableSkuRequest, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> regionConfigurationByResourceGroup( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegionConfigurationRequest regionConfigurationRequest, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegionConfigurationRequest regionConfigurationRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response regionConfigurationByResourceGroupSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegionConfigurationRequest regionConfigurationRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> validateInputsByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidationRequest validationRequest, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response validateInputsByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ValidationRequest validationRequest, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAvailableSkusByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAvailableSkusByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response along with {@link PagedResponse} on successful completion of + * @return configuration response specific to a region along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAvailableSkusByResourceGroupSinglePageAsync( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (availableSkuRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter availableSkuRequest is required and cannot be null.")); - } else { - availableSkuRequest.validate(); - } + private Mono> regionConfigurationWithResponseAsync(String location, + RegionConfigurationRequest regionConfigurationRequest) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listAvailableSkusByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, location, this.client.getApiVersion(), - availableSkuRequest, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.regionConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, regionConfigurationRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. - * @param context The context to associate with this operation. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return configuration response specific to a region on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAvailableSkusByResourceGroupSinglePageAsync( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (availableSkuRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter availableSkuRequest is required and cannot be null.")); - } else { - availableSkuRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listAvailableSkusByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, location, this.client.getApiVersion(), availableSkuRequest, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * This method provides the list of available skus for the given subscription, resource group and location. - * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAvailableSkusByResourceGroupAsync(String resourceGroupName, - String location, AvailableSkuRequest availableSkuRequest) { - return new PagedFlux<>( - () -> listAvailableSkusByResourceGroupSinglePageAsync(resourceGroupName, location, availableSkuRequest), - nextLink -> listAvailableSkusByResourceGroupNextSinglePageAsync(nextLink)); + private Mono regionConfigurationAsync(String location, + RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationWithResponseAsync(location, regionConfigurationRequest) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAvailableSkusByResourceGroupAsync(String resourceGroupName, - String location, AvailableSkuRequest availableSkuRequest, Context context) { - return new PagedFlux<>(() -> listAvailableSkusByResourceGroupSinglePageAsync(resourceGroupName, location, - availableSkuRequest, context), - nextLink -> listAvailableSkusByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * This method provides the list of available skus for the given subscription, resource group and location. - * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. + * @return configuration response specific to a region along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, - String location, AvailableSkuRequest availableSkuRequest) { - return new PagedIterable<>( - listAvailableSkusByResourceGroupAsync(resourceGroupName, location, availableSkuRequest)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regionConfigurationWithResponse(String location, + RegionConfigurationRequest regionConfigurationRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.regionConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, regionConfigurationRequest, context); } /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. - * @param context The context to associate with this operation. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. + * @return configuration response specific to a region. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, - String location, AvailableSkuRequest availableSkuRequest, Context context) { - return new PagedIterable<>( - listAvailableSkusByResourceGroupAsync(resourceGroupName, location, availableSkuRequest, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RegionConfigurationResponseInner regionConfiguration(String location, + RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationWithResponse(location, regionConfigurationRequest, Context.NONE).getValue(); } /** * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -325,27 +289,11 @@ public PagedIterable listAvailableSkusByResourceGroup(Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> validateAddressWithResponseAsync(String location, ValidateAddress validateAddress) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (validateAddress == null) { - return Mono - .error(new IllegalArgumentException("Parameter validateAddress is required and cannot be null.")); - } else { - validateAddress.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateAddress(this.client.getEndpoint(), this.client.getSubscriptionId(), - location, this.client.getApiVersion(), validateAddress, accept, context)) + .withContext(context -> service.validateAddress(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, validateAddress, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -353,47 +301,8 @@ private Mono> validateAddressWithResponse * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of the address validation api along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateAddressWithResponseAsync(String location, - ValidateAddress validateAddress, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (validateAddress == null) { - return Mono - .error(new IllegalArgumentException("Parameter validateAddress is required and cannot be null.")); - } else { - validateAddress.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateAddress(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), validateAddress, accept, context); - } - - /** - * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and - * provide alternate addresses if any. - * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -409,8 +318,8 @@ private Mono validateAddressAsync(String location, * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @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. @@ -420,15 +329,18 @@ private Mono validateAddressAsync(String location, @ServiceMethod(returns = ReturnType.SINGLE) public Response validateAddressWithResponse(String location, ValidateAddress validateAddress, Context context) { - return validateAddressWithResponseAsync(location, validateAddress, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateAddressSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, validateAddress, context); } /** * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -440,11 +352,10 @@ public AddressValidationOutputInner validateAddress(String location, ValidateAdd } /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -452,104 +363,37 @@ public AddressValidationOutputInner validateAddress(String location, ValidateAdd * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateInputsByResourceGroupWithResponseAsync( - String resourceGroupName, String location, ValidationRequest validationRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (validationRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter validationRequest is required and cannot be null.")); - } else { - validationRequest.validate(); - } + private Mono> validateInputsWithResponseAsync(String location, + ValidationRequest validationRequest) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateInputsByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, location, this.client.getApiVersion(), - validationRequest, accept, context)) + .withContext(context -> service.validateInputs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, validationRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateInputsByResourceGroupWithResponseAsync( - String resourceGroupName, String location, ValidationRequest validationRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (validationRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter validationRequest is required and cannot be null.")); - } else { - validationRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateInputsByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, location, this.client.getApiVersion(), validationRequest, accept, context); - } - - /** - * This method does all necessary pre-job creation validation under resource group. - * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of pre job creation validations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateInputsByResourceGroupAsync(String resourceGroupName, String location, - ValidationRequest validationRequest) { - return validateInputsByResourceGroupWithResponseAsync(resourceGroupName, location, validationRequest) + private Mono validateInputsAsync(String location, ValidationRequest validationRequest) { + return validateInputsWithResponseAsync(location, validationRequest) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @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. @@ -557,199 +401,163 @@ private Mono validateInputsByResourceGroupAsync(String * @return response of pre job creation validations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateInputsByResourceGroupWithResponse(String resourceGroupName, - String location, ValidationRequest validationRequest, Context context) { - return validateInputsByResourceGroupWithResponseAsync(resourceGroupName, location, validationRequest, context) - .block(); + public Response validateInputsWithResponse(String location, + ValidationRequest validationRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateInputsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, validationRequest, context); } /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of pre job creation validations. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location, - ValidationRequest validationRequest) { - return validateInputsByResourceGroupWithResponse(resourceGroupName, location, validationRequest, Context.NONE) - .getValue(); + public ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest) { + return validateInputsWithResponse(location, validationRequest, Context.NONE).getValue(); } /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response} on successful completion of + * @return the available skus operation response along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateInputsWithResponseAsync(String location, - ValidationRequest validationRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (validationRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter validationRequest is required and cannot be null.")); - } else { - validationRequest.validate(); - } + private Mono> listAvailableSkusByResourceGroupSinglePageAsync( + String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.validateInputs(this.client.getEndpoint(), this.client.getSubscriptionId(), - location, this.client.getApiVersion(), validationRequest, accept, context)) + .withContext(context -> service.listAvailableSkusByResourceGroup(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, location, accept, + availableSkuRequest, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response} on successful completion of - * {@link Mono}. + * @return the available skus operation response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateInputsWithResponseAsync(String location, - ValidationRequest validationRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (validationRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter validationRequest is required and cannot be null.")); - } else { - validationRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validateInputs(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), validationRequest, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAvailableSkusByResourceGroupAsync(String resourceGroupName, + String location, AvailableSkuRequest availableSkuRequest) { + return new PagedFlux<>( + () -> listAvailableSkusByResourceGroupSinglePageAsync(resourceGroupName, location, availableSkuRequest), + nextLink -> listAvailableSkusByResourceGroupNextSinglePageAsync(nextLink)); } /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations on successful completion of {@link Mono}. + * @return the available skus operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateInputsAsync(String location, ValidationRequest validationRequest) { - return validateInputsWithResponseAsync(location, validationRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listAvailableSkusByResourceGroupSinglePage(String resourceGroupName, + String location, AvailableSkuRequest availableSkuRequest) { + final String accept = "application/json"; + Response res = service.listAvailableSkusByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, location, accept, + availableSkuRequest, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response}. + * @return the available skus operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateInputsWithResponse(String location, - ValidationRequest validationRequest, Context context) { - return validateInputsWithResponseAsync(location, validationRequest, context).block(); + private PagedResponse listAvailableSkusByResourceGroupSinglePage(String resourceGroupName, + String location, AvailableSkuRequest availableSkuRequest, Context context) { + final String accept = "application/json"; + Response res + = service.listAvailableSkusByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, accept, availableSkuRequest, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations. + * @return the available skus operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest) { - return validateInputsWithResponse(location, validationRequest, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, + String location, AvailableSkuRequest availableSkuRequest) { + return new PagedIterable<>( + () -> listAvailableSkusByResourceGroupSinglePage(resourceGroupName, location, availableSkuRequest), + nextLink -> listAvailableSkusByResourceGroupNextSinglePage(nextLink)); } /** - * This API provides configuration details specific to given region/location at Subscription level. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response} on successful completion of - * {@link Mono}. + * @return the available skus operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regionConfigurationWithResponseAsync(String location, - RegionConfigurationRequest regionConfigurationRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (regionConfigurationRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter regionConfigurationRequest is required and cannot be null.")); - } else { - regionConfigurationRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.regionConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - location, this.client.getApiVersion(), regionConfigurationRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, + String location, AvailableSkuRequest availableSkuRequest, Context context) { + return new PagedIterable<>( + () -> listAvailableSkusByResourceGroupSinglePage(resourceGroupName, location, availableSkuRequest, context), + nextLink -> listAvailableSkusByResourceGroupNextSinglePage(nextLink, context)); } /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -757,53 +565,41 @@ private Mono> regionConfigurationWith * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regionConfigurationWithResponseAsync(String location, - RegionConfigurationRequest regionConfigurationRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (regionConfigurationRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter regionConfigurationRequest is required and cannot be null.")); - } else { - regionConfigurationRequest.validate(); - } + private Mono> regionConfigurationByResourceGroupWithResponseAsync( + String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regionConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), regionConfigurationRequest, accept, context); + return FluxUtil + .withContext(context -> service.regionConfigurationByResourceGroup(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, location, contentType, + accept, regionConfigurationRequest, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration response specific to a region on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regionConfigurationAsync(String location, - RegionConfigurationRequest regionConfigurationRequest) { - return regionConfigurationWithResponseAsync(location, regionConfigurationRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono regionConfigurationByResourceGroupAsync(String resourceGroupName, + String location, RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationByResourceGroupWithResponseAsync(resourceGroupName, location, + regionConfigurationRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @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. @@ -811,169 +607,114 @@ private Mono regionConfigurationAsync(String l * @return configuration response specific to a region along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response regionConfigurationWithResponse(String location, - RegionConfigurationRequest regionConfigurationRequest, Context context) { - return regionConfigurationWithResponseAsync(location, regionConfigurationRequest, context).block(); + public Response regionConfigurationByResourceGroupWithResponse( + String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.regionConfigurationByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, contentType, accept, + regionConfigurationRequest, context); } /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration response specific to a region. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegionConfigurationResponseInner regionConfiguration(String location, - RegionConfigurationRequest regionConfigurationRequest) { - return regionConfigurationWithResponse(location, regionConfigurationRequest, Context.NONE).getValue(); + public RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, + String location, RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationByResourceGroupWithResponse(resourceGroupName, location, regionConfigurationRequest, + Context.NONE).getValue(); } /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response} on successful completion of + * @return response of pre job creation validations along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regionConfigurationByResourceGroupWithResponseAsync( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (regionConfigurationRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter regionConfigurationRequest is required and cannot be null.")); - } else { - regionConfigurationRequest.validate(); - } + private Mono> validateInputsByResourceGroupWithResponseAsync( + String resourceGroupName, String location, ValidationRequest validationRequest) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regionConfigurationByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, location, this.client.getApiVersion(), - regionConfigurationRequest, accept, context)) + .withContext(context -> service.validateInputsByResourceGroup(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, location, contentType, + accept, validationRequest, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * This API provides configuration details specific to given region/location at Resource group level. - * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regionConfigurationByResourceGroupWithResponseAsync( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (regionConfigurationRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter regionConfigurationRequest is required and cannot be null.")); - } else { - regionConfigurationRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regionConfigurationByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, location, this.client.getApiVersion(), regionConfigurationRequest, accept, context); - } - - /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region on successful completion of {@link Mono}. + * @return response of pre job creation validations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regionConfigurationByResourceGroupAsync(String resourceGroupName, - String location, RegionConfigurationRequest regionConfigurationRequest) { - return regionConfigurationByResourceGroupWithResponseAsync(resourceGroupName, location, - regionConfigurationRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono validateInputsByResourceGroupAsync(String resourceGroupName, String location, + ValidationRequest validationRequest) { + return validateInputsByResourceGroupWithResponseAsync(resourceGroupName, location, validationRequest) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response}. + * @return response of pre job creation validations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response regionConfigurationByResourceGroupWithResponse( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest, - Context context) { - return regionConfigurationByResourceGroupWithResponseAsync(resourceGroupName, location, - regionConfigurationRequest, context).block(); + public Response validateInputsByResourceGroupWithResponse(String resourceGroupName, + String location, ValidationRequest validationRequest, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.validateInputsByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, location, contentType, accept, validationRequest, + context); } /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region. + * @return response of pre job creation validations. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, - String location, RegionConfigurationRequest regionConfigurationRequest) { - return regionConfigurationByResourceGroupWithResponse(resourceGroupName, location, regionConfigurationRequest, - Context.NONE).getValue(); + public ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location, + ValidationRequest validationRequest) { + return validateInputsByResourceGroupWithResponse(resourceGroupName, location, validationRequest, Context.NONE) + .getValue(); } /** @@ -989,13 +730,6 @@ public RegionConfigurationResponseInner regionConfigurationByResourceGroup(Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAvailableSkusByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listAvailableSkusByResourceGroupNext(nextLink, this.client.getEndpoint(), @@ -1005,6 +739,24 @@ public RegionConfigurationResponseInner regionConfigurationByResourceGroup(Strin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @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. + * @return the available skus operation response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAvailableSkusByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res = service.listAvailableSkusByResourceGroupNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1013,23 +765,15 @@ public RegionConfigurationResponseInner regionConfigurationByResourceGroup(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the available skus operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listAvailableSkusByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listAvailableSkusByResourceGroupNextSinglePage(String nextLink, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listAvailableSkusByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listAvailableSkusByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java index 5b21a6ab96b16..d0f7dcfa3fe11 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; @@ -36,30 +36,31 @@ public ServicesImpl(ServicesClient innerClient, com.azure.resourcemanager.databo this.serviceManager = serviceManager; } - public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, - AvailableSkuRequest availableSkuRequest) { - PagedIterable inner - = this.serviceClient().listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager())); + public Response regionConfigurationWithResponse(String location, + RegionConfigurationRequest regionConfigurationRequest, Context context) { + Response inner + = this.serviceClient().regionConfigurationWithResponse(location, regionConfigurationRequest, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegionConfigurationResponseImpl(inner.getValue(), this.manager())); } - public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, - AvailableSkuRequest availableSkuRequest, Context context) { - PagedIterable inner = this.serviceClient() - .listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager())); + public RegionConfigurationResponse regionConfiguration(String location, + RegionConfigurationRequest regionConfigurationRequest) { + RegionConfigurationResponseInner inner + = this.serviceClient().regionConfiguration(location, regionConfigurationRequest); + if (inner != null) { + return new RegionConfigurationResponseImpl(inner, this.manager()); + } else { + return null; + } } public Response validateAddressWithResponse(String location, ValidateAddress validateAddress, Context context) { Response inner = this.serviceClient().validateAddressWithResponse(location, validateAddress, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AddressValidationOutputImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AddressValidationOutputImpl(inner.getValue(), this.manager())); } public AddressValidationOutput validateAddress(String location, ValidateAddress validateAddress) { @@ -71,39 +72,12 @@ public AddressValidationOutput validateAddress(String location, ValidateAddress } } - public Response validateInputsByResourceGroupWithResponse(String resourceGroupName, - String location, ValidationRequest validationRequest, Context context) { - Response inner = this.serviceClient() - .validateInputsByResourceGroupWithResponse(resourceGroupName, location, validationRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ValidationResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ValidationResponse validateInputsByResourceGroup(String resourceGroupName, String location, - ValidationRequest validationRequest) { - ValidationResponseInner inner - = this.serviceClient().validateInputsByResourceGroup(resourceGroupName, location, validationRequest); - if (inner != null) { - return new ValidationResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response validateInputsWithResponse(String location, ValidationRequest validationRequest, Context context) { Response inner = this.serviceClient().validateInputsWithResponse(location, validationRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ValidationResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ValidationResponseImpl(inner.getValue(), this.manager())); } public ValidationResponse validateInputs(String location, ValidationRequest validationRequest) { @@ -115,27 +89,18 @@ public ValidationResponse validateInputs(String location, ValidationRequest vali } } - public Response regionConfigurationWithResponse(String location, - RegionConfigurationRequest regionConfigurationRequest, Context context) { - Response inner - = this.serviceClient().regionConfigurationWithResponse(location, regionConfigurationRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegionConfigurationResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, + AvailableSkuRequest availableSkuRequest) { + PagedIterable inner + = this.serviceClient().listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager())); } - public RegionConfigurationResponse regionConfiguration(String location, - RegionConfigurationRequest regionConfigurationRequest) { - RegionConfigurationResponseInner inner - = this.serviceClient().regionConfiguration(location, regionConfigurationRequest); - if (inner != null) { - return new RegionConfigurationResponseImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, + AvailableSkuRequest availableSkuRequest, Context context) { + PagedIterable inner = this.serviceClient() + .listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager())); } public Response regionConfigurationByResourceGroupWithResponse( @@ -144,12 +109,8 @@ public Response regionConfigurationByResourceGroupW Response inner = this.serviceClient() .regionConfigurationByResourceGroupWithResponse(resourceGroupName, location, regionConfigurationRequest, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegionConfigurationResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegionConfigurationResponseImpl(inner.getValue(), this.manager())); } public RegionConfigurationResponse regionConfigurationByResourceGroup(String resourceGroupName, String location, @@ -163,6 +124,25 @@ public RegionConfigurationResponse regionConfigurationByResourceGroup(String res } } + public Response validateInputsByResourceGroupWithResponse(String resourceGroupName, + String location, ValidationRequest validationRequest, Context context) { + Response inner = this.serviceClient() + .validateInputsByResourceGroupWithResponse(resourceGroupName, location, validationRequest, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ValidationResponseImpl(inner.getValue(), this.manager())); + } + + public ValidationResponse validateInputsByResourceGroup(String resourceGroupName, String location, + ValidationRequest validationRequest) { + ValidationResponseInner inner + = this.serviceClient().validateInputsByResourceGroup(resourceGroupName, location, validationRequest); + if (inner != null) { + return new ValidationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private ServicesClient serviceClient() { return this.innerClient; } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ShipmentPickUpResponseImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ShipmentPickUpResponseImpl.java index 124720e72b8e3..35dfe67299a69 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ShipmentPickUpResponseImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ShipmentPickUpResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java index e625174dcafb3..5f3fb36259a04 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/UnencryptedCredentialsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/UnencryptedCredentialsImpl.java index 00551faf4d3a6..07e9fab8ecc0b 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/UnencryptedCredentialsImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/UnencryptedCredentialsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ValidationResponseImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ValidationResponseImpl.java index ee7aad563989e..fedf5ce8dac22 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ValidationResponseImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ValidationResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkusResult.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/AvailableSkusResult.java similarity index 72% rename from sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkusResult.java rename to sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/AvailableSkusResult.java index 9e4cf120b85c7..4fb9e1479d451 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkusResult.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/AvailableSkusResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databox.models; +package com.azure.resourcemanager.databox.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * The available skus operation response. */ -@Fluent +@Immutable public final class AvailableSkusResult implements JsonSerializable { /* - * List of available skus. + * [Placeholder] Description for page model */ private List value; /* - * Link for the next set of skus. + * [Placeholder] Description for nextLink property */ private String nextLink; /** * Creates an instance of AvailableSkusResult class. */ - public AvailableSkusResult() { + private AvailableSkusResult() { } /** - * Get the value property: List of available skus. + * Get the value property: [Placeholder] Description for page model. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link for the next set of skus. + * Get the nextLink property: [Placeholder] Description for nextLink property. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link for the next set of skus. - * - * @param nextLink the nextLink value to set. - * @return the AvailableSkusResult object itself. - */ - public AvailableSkusResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AvailableSkusResult 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 AvailableSkusResult. */ public static AvailableSkusResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceList.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/JobResourceList.java similarity index 67% rename from sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceList.java rename to sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/JobResourceList.java index 53bc235dc25a7..0b694ecbb275f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceList.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/JobResourceList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databox.models; +package com.azure.resourcemanager.databox.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Job Resource Collection. */ -@Fluent +@Immutable public final class JobResourceList implements JsonSerializable { /* - * List of job resources. + * The JobResource items on this page */ private List value; /* - * Link for the next set of job resources. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of JobResourceList class. */ - public JobResourceList() { + private JobResourceList() { } /** - * Get the value property: List of job resources. + * Get the value property: The JobResource items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of job resources. - * - * @param value the value value to set. - * @return the JobResourceList object itself. - */ - public JobResourceList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link for the next set of job resources. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link for the next set of job resources. - * - * @param nextLink the nextLink value to set. - * @return the JobResourceList object itself. - */ - public JobResourceList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobResourceList 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 JobResourceList. */ public static JobResourceList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationList.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/OperationList.java similarity index 71% rename from sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationList.java rename to sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/OperationList.java index e40183afee4e6..16b98c50848f9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationList.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/OperationList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databox.models; +package com.azure.resourcemanager.databox.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * Operation Collection. + * The paginated list of connected cluster API operations. */ -@Fluent +@Immutable public final class OperationList implements JsonSerializable { /* - * List of operations. + * The list of connected cluster API operations. */ private List value; /* - * Link for the next set of operations. + * The link to fetch the next page of connected cluster API operations. */ private String nextLink; /** * Creates an instance of OperationList class. */ - public OperationList() { + private OperationList() { } /** - * Get the value property: List of operations. + * Get the value property: The list of connected cluster API operations. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: Link for the next set of operations. + * Get the nextLink property: The link to fetch the next page of connected cluster API operations. * * @return the nextLink value. */ @@ -52,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link for the next set of operations. - * - * @param nextLink the nextLink value to set. - * @return the OperationList object itself. - */ - public OperationList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentialsList.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/UnencryptedCredentialsList.java similarity index 67% rename from sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentialsList.java rename to sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/UnencryptedCredentialsList.java index 22fa0c024856b..9f7144f7e7c82 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentialsList.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/models/UnencryptedCredentialsList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.databox.models; +package com.azure.resourcemanager.databox.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * List of unencrypted credentials for accessing device. */ -@Fluent +@Immutable public final class UnencryptedCredentialsList implements JsonSerializable { /* - * List of unencrypted credentials. + * The UnencryptedCredentials items on this page */ private List value; /* - * Link for the next set of unencrypted credentials. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of UnencryptedCredentialsList class. */ - public UnencryptedCredentialsList() { + private UnencryptedCredentialsList() { } /** - * Get the value property: List of unencrypted credentials. + * Get the value property: The UnencryptedCredentials items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: List of unencrypted credentials. - * - * @param value the value value to set. - * @return the UnencryptedCredentialsList object itself. - */ - public UnencryptedCredentialsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link for the next set of unencrypted credentials. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link for the next set of unencrypted credentials. - * - * @param nextLink the nextLink value to set. - * @return the UnencryptedCredentialsList object itself. - */ - public UnencryptedCredentialsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of UnencryptedCredentialsList 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 UnencryptedCredentialsList. */ public static UnencryptedCredentialsList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/package-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/package-info.java index 7262a7f341a71..37c9e5f485be6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/package-info.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for DataBoxManagementClient. - * null. + * Package containing the implementations for DataBox. */ package com.azure.resourcemanager.databox.implementation; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccessProtocol.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccessProtocol.java index fecee5b21a7ba..7a5878c90eddb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccessProtocol.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccessProtocol.java @@ -1,20 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; /** - * Defines values for AccessProtocol. + * Access protocols supported on the device. */ public enum AccessProtocol { /** - * Enum value SMB. + * Server Message Block protocol(SMB). */ SMB("SMB"), /** - * Enum value NFS. + * Network File System protocol(NFS). */ NFS("NFS"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccountCredentialDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccountCredentialDetails.java index a1374320c9483..407a291be68e0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccountCredentialDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccountCredentialDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -40,7 +40,7 @@ public final class AccountCredentialDetails implements JsonSerializable shareCredentialDetails() { return this.shareCredentialDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (shareCredentialDetails() != null) { - shareCredentialDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java index 7506e46443259..09a0f64f263b3 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * This class represents additional info which Resource Providers pass when an error occurs. */ -@Fluent +@Immutable public final class AdditionalErrorInfo implements JsonSerializable { /* * Additional information of the type of error. @@ -29,7 +29,7 @@ public final class AdditionalErrorInfo implements JsonSerializable alternateAddresses() { return this.alternateAddresses; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (alternateAddresses() != null) { - alternateAddresses().forEach(e -> e.validate()); - } - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationStatus.java index 6470d9ae1795f..f9311ce354005 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,17 +9,17 @@ */ public enum AddressValidationStatus { /** - * Enum value Valid. + * Address provided is valid. */ VALID("Valid"), /** - * Enum value Invalid. + * Address provided is invalid or not supported. */ INVALID("Invalid"), /** - * Enum value Ambiguous. + * Address provided is ambiguous, please choose one of the alternate addresses returned. */ AMBIGUOUS("Ambiguous"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ApplianceNetworkConfiguration.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ApplianceNetworkConfiguration.java index fbc64fd0c6b31..84d58a60ed6de 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ApplianceNetworkConfiguration.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ApplianceNetworkConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -29,7 +29,7 @@ public final class ApplianceNetworkConfiguration implements JsonSerializable skuNames) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transferType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property transferType in model AvailableSkuRequest")); - } - if (country() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property country in model AvailableSkuRequest")); - } - if (location() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property location in model AvailableSkuRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AvailableSkuRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AzureFileFilterDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AzureFileFilterDetails.java index 4b4592fdc7403..ba3c5eac22359 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AzureFileFilterDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AzureFileFilterDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -98,14 +98,6 @@ public AzureFileFilterDetails withFileShareList(List fileShareList) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/BlobFilterDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/BlobFilterDetails.java index 9b59efbe1f26c..634e31c04b093 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/BlobFilterDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/BlobFilterDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -98,14 +98,6 @@ public BlobFilterDetails withContainerList(List containerList) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CancellationReason.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CancellationReason.java index b03bb9d7b3693..3925dccca26b0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CancellationReason.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CancellationReason.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -48,20 +47,6 @@ public CancellationReason withReason(String reason) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (reason() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property reason in model CancellationReason")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CancellationReason.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java index 511aba59fcbee..449045439d405 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,22 +9,22 @@ */ public enum ClassDiscriminator { /** - * Enum value DataBox. + * Data Box orders. */ DATA_BOX("DataBox"), /** - * Enum value DataBoxDisk. + * Data Box Disk orders. */ DATA_BOX_DISK("DataBoxDisk"), /** - * Enum value DataBoxHeavy. + * Data Box Heavy orders. */ DATA_BOX_HEAVY("DataBoxHeavy"), /** - * Enum value DataBoxCustomerDisk. + * Data Box Customer Disk orders. */ DATA_BOX_CUSTOMER_DISK("DataBoxCustomerDisk"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java index 0675b3e6fc0ba..9087b59c54561 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Provides additional information about an http error response. */ -@Fluent +@Immutable public final class CloudError implements JsonSerializable { /* * Gets or sets additional error info. @@ -45,7 +45,7 @@ public final class CloudError implements JsonSerializable { /** * Creates an instance of CloudError class. */ - public CloudError() { + private CloudError() { } /** @@ -66,17 +66,6 @@ public String code() { return this.code; } - /** - * Set the code property: Error code. - * - * @param code the code value to set. - * @return the CloudError object itself. - */ - public CloudError withCode(String code) { - this.code = code; - return this; - } - /** * Get the details property: Gets or sets details for the error. * @@ -95,17 +84,6 @@ public String message() { return this.message; } - /** - * Set the message property: The error message parsed from the body of the http error response. - * - * @param message the message value to set. - * @return the CloudError object itself. - */ - public CloudError withMessage(String message) { - this.message = message; - return this; - } - /** * Get the target property: Gets or sets the target of the error. * @@ -115,31 +93,6 @@ public String target() { return this.target; } - /** - * Set the target property: Gets or sets the target of the error. - * - * @param target the target value to set. - * @return the CloudError object itself. - */ - public CloudError withTarget(String target) { - this.target = target; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (additionalInfo() != null) { - additionalInfo().forEach(e -> e.validate()); - } - if (details() != null) { - details().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactDetails.java index 08557fb2fc70d..abafd8ead7654 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -174,31 +173,6 @@ public ContactDetails withNotificationPreference(List no return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contactName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property contactName in model ContactDetails")); - } - if (phone() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property phone in model ContactDetails")); - } - if (emailList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property emailList in model ContactDetails")); - } - if (notificationPreference() != null) { - notificationPreference().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java index 0001fd10e499f..f04b938954c98 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -123,24 +122,6 @@ public ContactInfo withMobile(String mobile) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contactName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property contactName in model ContactInfo")); - } - if (phone() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property phone in model ContactInfo")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContactInfo.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java index 86ec072ad2cd3..6ac6df7fc6e78 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -24,7 +24,7 @@ public class CopyLogDetails implements JsonSerializable { /** * Creates an instance of CopyLogDetails class. */ - public CopyLogDetails() { + protected CopyLogDetails() { } /** @@ -36,14 +36,6 @@ public ClassDiscriminator copyLogDetailsType() { return this.copyLogDetailsType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java index 06579525b2529..40f3805c9c07f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -106,7 +106,7 @@ public class CopyProgress implements JsonSerializable { /** * Creates an instance of CopyProgress class. */ - public CopyProgress() { + protected CopyProgress() { } /** @@ -459,17 +459,6 @@ CopyProgress withActions(List actions) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java index ce0156968e7b2..3f0dd0750520e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -12,92 +12,92 @@ */ public final class CopyStatus extends ExpandableStringEnum { /** - * Static value NotStarted for CopyStatus. + * Data copy hasn't started yet. */ public static final CopyStatus NOT_STARTED = fromString("NotStarted"); /** - * Static value InProgress for CopyStatus. + * Data copy is in progress. */ public static final CopyStatus IN_PROGRESS = fromString("InProgress"); /** - * Static value Completed for CopyStatus. + * Data copy completed. */ public static final CopyStatus COMPLETED = fromString("Completed"); /** - * Static value CompletedWithErrors for CopyStatus. + * Data copy completed with errors. */ public static final CopyStatus COMPLETED_WITH_ERRORS = fromString("CompletedWithErrors"); /** - * Static value Failed for CopyStatus. + * Data copy failed. No data was copied. */ public static final CopyStatus FAILED = fromString("Failed"); /** - * Static value NotReturned for CopyStatus. + * No copy triggered as device was not returned. */ public static final CopyStatus NOT_RETURNED = fromString("NotReturned"); /** - * Static value HardwareError for CopyStatus. + * The Device has hit hardware issues. */ public static final CopyStatus HARDWARE_ERROR = fromString("HardwareError"); /** - * Static value DeviceFormatted for CopyStatus. + * Data copy failed. The Device was formatted by user. */ public static final CopyStatus DEVICE_FORMATTED = fromString("DeviceFormatted"); /** - * Static value DeviceMetadataModified for CopyStatus. + * Data copy failed. Device metadata was modified by user. */ public static final CopyStatus DEVICE_METADATA_MODIFIED = fromString("DeviceMetadataModified"); /** - * Static value StorageAccountNotAccessible for CopyStatus. + * Data copy failed. Storage Account was not accessible during copy. */ public static final CopyStatus STORAGE_ACCOUNT_NOT_ACCESSIBLE = fromString("StorageAccountNotAccessible"); /** - * Static value UnsupportedData for CopyStatus. + * Data copy failed. The Device data content is not supported. */ public static final CopyStatus UNSUPPORTED_DATA = fromString("UnsupportedData"); /** - * Static value DriveNotReceived for CopyStatus. + * No copy triggered as device was not received. */ public static final CopyStatus DRIVE_NOT_RECEIVED = fromString("DriveNotReceived"); /** - * Static value UnsupportedDrive for CopyStatus. + * No copy triggered as device type is not supported. */ public static final CopyStatus UNSUPPORTED_DRIVE = fromString("UnsupportedDrive"); /** - * Static value OtherServiceError for CopyStatus. + * Copy failed due to service error. */ public static final CopyStatus OTHER_SERVICE_ERROR = fromString("OtherServiceError"); /** - * Static value OtherUserError for CopyStatus. + * Copy failed due to user error. */ public static final CopyStatus OTHER_USER_ERROR = fromString("OtherUserError"); /** - * Static value DriveNotDetected for CopyStatus. + * Copy failed due to disk detection error. */ public static final CopyStatus DRIVE_NOT_DETECTED = fromString("DriveNotDetected"); /** - * Static value DriveCorrupted for CopyStatus. + * Copy failed due to corrupted drive. */ public static final CopyStatus DRIVE_CORRUPTED = fromString("DriveCorrupted"); /** - * Static value MetadataFilesModifiedOrRemoved for CopyStatus. + * Copy failed due to modified or removed metadata files. */ public static final CopyStatus METADATA_FILES_MODIFIED_OR_REMOVED = fromString("MetadataFilesModifiedOrRemoved"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateJobValidations.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateJobValidations.java index 80eef5cdb5988..94e0deb718484 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateJobValidations.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateJobValidations.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -47,24 +46,6 @@ public CreateJobValidations withIndividualRequestDetails(List e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateJobValidations.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationRequest.java index db7c8171d1821..6ba3d5fe99b7f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -92,22 +91,6 @@ public CreateOrderLimitForSubscriptionValidationRequest withModel(ModelName mode return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (deviceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property deviceType in model CreateOrderLimitForSubscriptionValidationRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateOrderLimitForSubscriptionValidationRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationResponseProperties.java index 11adaee34cf08..5807b85f0b812 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationResponseProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationResponseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -28,7 +28,7 @@ public final class CreateOrderLimitForSubscriptionValidationResponseProperties e /** * Creates an instance of CreateOrderLimitForSubscriptionValidationResponseProperties class. */ - public CreateOrderLimitForSubscriptionValidationResponseProperties() { + private CreateOrderLimitForSubscriptionValidationResponseProperties() { } /** @@ -50,18 +50,6 @@ public ValidationStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java index f75cab5cb18ee..4379e8845be26 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -34,7 +34,7 @@ public final class CustomerDiskJobSecrets extends JobSecrets { /** * Creates an instance of CustomerDiskJobSecrets class. */ - public CustomerDiskJobSecrets() { + private CustomerDiskJobSecrets() { } /** @@ -65,24 +65,6 @@ public String carrierAccountNumber() { return this.carrierAccountNumber; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (diskSecrets() != null) { - diskSecrets().forEach(e -> e.validate()); - } - if (dcAccessSecurityCode() != null) { - dcAccessSecurityCode().validate(); - } - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java index 5a8ffdb0c049a..9e03acc5ef0be 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java @@ -1,35 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; /** - * Defines values for CustomerResolutionCode. + * Resolution code provided by customer. */ public enum CustomerResolutionCode { /** - * Enum value None. + * No Resolution Yet. */ NONE("None"), /** - * Enum value MoveToCleanUpDevice. + * Clean the device. */ MOVE_TO_CLEAN_UP_DEVICE("MoveToCleanUpDevice"), /** - * Enum value Resume. + * Resume the job to same stage. */ RESUME("Resume"), /** - * Enum value Restart. + * Restart whole action. */ RESTART("Restart"), /** - * Enum value ReachOutToOperation. + * Reach out to operation for further action. */ REACH_OUT_TO_OPERATION("ReachOutToOperation"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountDetails.java index a2a5fa7165356..5e76bc26b20b5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -75,14 +75,6 @@ public DataAccountDetails withSharePassword(String sharePassword) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountType.java index 2a4fc87d245f8..c44ec59577991 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountType.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum DataAccountType { /** - * Enum value StorageAccount. + * Storage Accounts . */ STORAGE_ACCOUNT("StorageAccount"), /** - * Enum value ManagedDisk. + * Azure Managed disk storage. */ MANAGED_DISK("ManagedDisk"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxAccountCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxAccountCopyLogDetails.java index 3c2f9177b030e..21a6ef62762cd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxAccountCopyLogDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxAccountCopyLogDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -38,7 +38,7 @@ public final class DataBoxAccountCopyLogDetails extends CopyLogDetails { /** * Creates an instance of DataBoxAccountCopyLogDetails class. */ - public DataBoxAccountCopyLogDetails() { + private DataBoxAccountCopyLogDetails() { } /** @@ -79,15 +79,6 @@ public String copyVerboseLogLink() { return this.copyVerboseLogLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java index e0f025c3f972c..63b66b7558d9f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -38,7 +38,7 @@ public final class DataBoxCustomerDiskCopyLogDetails extends CopyLogDetails { /** * Creates an instance of DataBoxCustomerDiskCopyLogDetails class. */ - public DataBoxCustomerDiskCopyLogDetails() { + private DataBoxCustomerDiskCopyLogDetails() { } /** @@ -78,15 +78,6 @@ public String verboseLogLink() { return this.verboseLogLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java index dbbf2012e1a75..60074cef6d2d5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -115,7 +115,7 @@ public final class DataBoxCustomerDiskCopyProgress extends CopyProgress { /** * Creates an instance of DataBoxCustomerDiskCopyProgress class. */ - public DataBoxCustomerDiskCopyProgress() { + private DataBoxCustomerDiskCopyProgress() { } /** @@ -311,18 +311,6 @@ public String storageAccountName() { return this.storageAccountName; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java index 9fb70fac83170..3b9c5294d059f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -235,90 +234,6 @@ public DataBoxCustomerDiskJobDetails withExpectedDataSizeInTeraBytes(Integer exp return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (importDiskDetailsCollection() != null) { - importDiskDetailsCollection().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (exportDiskDetailsCollection() != null) { - exportDiskDetailsCollection().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (copyProgress() != null) { - copyProgress().forEach(e -> e.validate()); - } - if (deliverToDcPackageDetails() != null) { - deliverToDcPackageDetails().validate(); - } - if (returnToCustomerPackageDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property returnToCustomerPackageDetails in model DataBoxCustomerDiskJobDetails")); - } else { - returnToCustomerPackageDetails().validate(); - } - if (jobStages() != null) { - jobStages().forEach(e -> e.validate()); - } - if (contactDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contactDetails in model DataBoxCustomerDiskJobDetails")); - } else { - contactDetails().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - if (deliveryPackage() != null) { - deliveryPackage().validate(); - } - if (returnPackage() != null) { - returnPackage().validate(); - } - if (dataImportDetails() != null) { - dataImportDetails().forEach(e -> e.validate()); - } - if (dataExportDetails() != null) { - dataExportDetails().forEach(e -> e.validate()); - } - if (preferences() != null) { - preferences().validate(); - } - if (reverseShippingDetails() != null) { - reverseShippingDetails().validate(); - } - if (copyLogDetails() != null) { - copyLogDetails().forEach(e -> e.validate()); - } - if (deviceErasureDetails() != null) { - deviceErasureDetails().validate(); - } - if (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - if (lastMitigationActionOnJob() != null) { - lastMitigationActionOnJob().validate(); - } - if (datacenterAddress() != null) { - datacenterAddress().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataBoxCustomerDiskJobDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyLogDetails.java index a363b932cbe54..b1007a9d87056 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyLogDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyLogDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -38,7 +38,7 @@ public final class DataBoxDiskCopyLogDetails extends CopyLogDetails { /** * Creates an instance of DataBoxDiskCopyLogDetails class. */ - public DataBoxDiskCopyLogDetails() { + private DataBoxDiskCopyLogDetails() { } /** @@ -78,15 +78,6 @@ public String verboseLogLink() { return this.verboseLogLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyProgress.java index b81c7618920ee..997feba89ba7a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyProgress.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyProgress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -50,7 +50,7 @@ public final class DataBoxDiskCopyProgress implements JsonSerializable actions() { return this.actions; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java index 9b8f572977006..e0d07e006c326 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -43,7 +43,7 @@ public final class DataBoxDiskGranularCopyLogDetails extends GranularCopyLogDeta /** * Creates an instance of DataBoxDiskGranularCopyLogDetails class. */ - public DataBoxDiskGranularCopyLogDetails() { + private DataBoxDiskGranularCopyLogDetails() { } /** @@ -92,15 +92,6 @@ public String verboseLogLink() { return this.verboseLogLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java index 744a5a57adeeb..fbc6473e05103 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -115,7 +115,7 @@ public final class DataBoxDiskGranularCopyProgress extends GranularCopyProgress /** * Creates an instance of DataBoxDiskGranularCopyProgress class. */ - public DataBoxDiskGranularCopyProgress() { + private DataBoxDiskGranularCopyProgress() { } /** @@ -311,18 +311,6 @@ public String storageAccountName() { return this.storageAccountName; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java index 8e874d6304642..76d024a43e4bd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -224,72 +223,6 @@ public DataBoxDiskJobDetails withExpectedDataSizeInTeraBytes(Integer expectedDat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (copyProgress() != null) { - copyProgress().forEach(e -> e.validate()); - } - if (granularCopyProgress() != null) { - granularCopyProgress().forEach(e -> e.validate()); - } - if (granularCopyLogDetails() != null) { - granularCopyLogDetails().forEach(e -> e.validate()); - } - if (jobStages() != null) { - jobStages().forEach(e -> e.validate()); - } - if (contactDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contactDetails in model DataBoxDiskJobDetails")); - } else { - contactDetails().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - if (deliveryPackage() != null) { - deliveryPackage().validate(); - } - if (returnPackage() != null) { - returnPackage().validate(); - } - if (dataImportDetails() != null) { - dataImportDetails().forEach(e -> e.validate()); - } - if (dataExportDetails() != null) { - dataExportDetails().forEach(e -> e.validate()); - } - if (preferences() != null) { - preferences().validate(); - } - if (reverseShippingDetails() != null) { - reverseShippingDetails().validate(); - } - if (copyLogDetails() != null) { - copyLogDetails().forEach(e -> e.validate()); - } - if (deviceErasureDetails() != null) { - deviceErasureDetails().validate(); - } - if (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - if (lastMitigationActionOnJob() != null) { - lastMitigationActionOnJob().validate(); - } - if (datacenterAddress() != null) { - datacenterAddress().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataBoxDiskJobDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobSecrets.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobSecrets.java index c071593bf65ae..0ffb3d9ec01c6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobSecrets.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -39,7 +39,7 @@ public final class DataBoxDiskJobSecrets extends JobSecrets { /** * Creates an instance of DataBoxDiskJobSecrets class. */ - public DataBoxDiskJobSecrets() { + private DataBoxDiskJobSecrets() { } /** @@ -79,24 +79,6 @@ public Boolean isPasskeyUserDefined() { return this.isPasskeyUserDefined; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (diskSecrets() != null) { - diskSecrets().forEach(e -> e.validate()); - } - if (dcAccessSecurityCode() != null) { - dcAccessSecurityCode().validate(); - } - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyAccountCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyAccountCopyLogDetails.java index 552eb1eca4e63..36cad70249220 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyAccountCopyLogDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyAccountCopyLogDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -39,7 +39,7 @@ public final class DataBoxHeavyAccountCopyLogDetails extends CopyLogDetails { /** * Creates an instance of DataBoxHeavyAccountCopyLogDetails class. */ - public DataBoxHeavyAccountCopyLogDetails() { + private DataBoxHeavyAccountCopyLogDetails() { } /** @@ -80,15 +80,6 @@ public List copyVerboseLogLink() { return this.copyVerboseLogLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java index 12acd7f318cef..af561bd0dbc70 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -163,66 +162,6 @@ public DataBoxHeavyJobDetails withExpectedDataSizeInTeraBytes(Integer expectedDa return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (copyProgress() != null) { - copyProgress().forEach(e -> e.validate()); - } - if (jobStages() != null) { - jobStages().forEach(e -> e.validate()); - } - if (contactDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contactDetails in model DataBoxHeavyJobDetails")); - } else { - contactDetails().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - if (deliveryPackage() != null) { - deliveryPackage().validate(); - } - if (returnPackage() != null) { - returnPackage().validate(); - } - if (dataImportDetails() != null) { - dataImportDetails().forEach(e -> e.validate()); - } - if (dataExportDetails() != null) { - dataExportDetails().forEach(e -> e.validate()); - } - if (preferences() != null) { - preferences().validate(); - } - if (reverseShippingDetails() != null) { - reverseShippingDetails().validate(); - } - if (copyLogDetails() != null) { - copyLogDetails().forEach(e -> e.validate()); - } - if (deviceErasureDetails() != null) { - deviceErasureDetails().validate(); - } - if (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - if (lastMitigationActionOnJob() != null) { - lastMitigationActionOnJob().validate(); - } - if (datacenterAddress() != null) { - datacenterAddress().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataBoxHeavyJobDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobSecrets.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobSecrets.java index f8d186aa7486f..7cbf9446e14ac 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobSecrets.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -29,7 +29,7 @@ public final class DataBoxHeavyJobSecrets extends JobSecrets { /** * Creates an instance of DataBoxHeavyJobSecrets class. */ - public DataBoxHeavyJobSecrets() { + private DataBoxHeavyJobSecrets() { } /** @@ -51,24 +51,6 @@ public List cabinetPodSecrets() { return this.cabinetPodSecrets; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (cabinetPodSecrets() != null) { - cabinetPodSecrets().forEach(e -> e.validate()); - } - if (dcAccessSecurityCode() != null) { - dcAccessSecurityCode().validate(); - } - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavySecret.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavySecret.java index 1002fb23e97bb..3772df85063b1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavySecret.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavySecret.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -45,7 +45,7 @@ public final class DataBoxHeavySecret implements JsonSerializable accountCredentialDetails() { return this.accountCredentialDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkConfigurations() != null) { - networkConfigurations().forEach(e -> e.validate()); - } - if (accountCredentialDetails() != null) { - accountCredentialDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java index 16bf4d30d0c31..d7bee77231323 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -163,66 +162,6 @@ public DataBoxJobDetails withExpectedDataSizeInTeraBytes(Integer expectedDataSiz return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (copyProgress() != null) { - copyProgress().forEach(e -> e.validate()); - } - if (jobStages() != null) { - jobStages().forEach(e -> e.validate()); - } - if (contactDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contactDetails in model DataBoxJobDetails")); - } else { - contactDetails().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - if (deliveryPackage() != null) { - deliveryPackage().validate(); - } - if (returnPackage() != null) { - returnPackage().validate(); - } - if (dataImportDetails() != null) { - dataImportDetails().forEach(e -> e.validate()); - } - if (dataExportDetails() != null) { - dataExportDetails().forEach(e -> e.validate()); - } - if (preferences() != null) { - preferences().validate(); - } - if (reverseShippingDetails() != null) { - reverseShippingDetails().validate(); - } - if (copyLogDetails() != null) { - copyLogDetails().forEach(e -> e.validate()); - } - if (deviceErasureDetails() != null) { - deviceErasureDetails().validate(); - } - if (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - if (lastMitigationActionOnJob() != null) { - lastMitigationActionOnJob().validate(); - } - if (datacenterAddress() != null) { - datacenterAddress().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataBoxJobDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxScheduleAvailabilityRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxScheduleAvailabilityRequest.java index 2327fe5f7b1eb..058a333e86e28 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxScheduleAvailabilityRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxScheduleAvailabilityRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -64,22 +63,6 @@ public DataBoxScheduleAvailabilityRequest withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (storageLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageLocation in model DataBoxScheduleAvailabilityRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataBoxScheduleAvailabilityRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxSecret.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxSecret.java index b731930775e39..1c248a21fbdcb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxSecret.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxSecret.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -45,7 +45,7 @@ public final class DataBoxSecret implements JsonSerializable { /** * Creates an instance of DataBoxSecret class. */ - public DataBoxSecret() { + private DataBoxSecret() { } /** @@ -93,20 +93,6 @@ public List accountCredentialDetails() { return this.accountCredentialDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (networkConfigurations() != null) { - networkConfigurations().forEach(e -> e.validate()); - } - if (accountCredentialDetails() != null) { - accountCredentialDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java index 9ecd61edfd278..7f41faba8b761 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -321,11 +321,6 @@ public final class DataCenterCode extends ExpandableStringEnum { */ public static final DataCenterCode TYO23 = fromString("TYO23"); - /** - * Static value CPQ21 for DataCenterCode. - */ - public static final DataCenterCode CPQ21 = fromString("CPQ21"); - /** * Static value NTG20 for DataCenterCode. */ @@ -342,14 +337,19 @@ public final class DataCenterCode extends ExpandableStringEnum { public static final DataCenterCode DSM11 = fromString("DSM11"); /** - * Static value OSA23 for DataCenterCode. + * Static value AMS25 for DataCenterCode. */ - public static final DataCenterCode OSA23 = fromString("OSA23"); + public static final DataCenterCode AMS25 = fromString("AMS25"); /** - * Static value AMS25 for DataCenterCode. + * Static value CPQ21 for DataCenterCode. */ - public static final DataCenterCode AMS25 = fromString("AMS25"); + public static final DataCenterCode CPQ21 = fromString("CPQ21"); + + /** + * Static value OSA23 for DataCenterCode. + */ + public static final DataCenterCode OSA23 = fromString("OSA23"); /** * Creates a new instance of DataCenterCode value. diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataExportDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataExportDetails.java index 5bfc0aa75fa90..d3cab82ba998f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataExportDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataExportDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -98,30 +97,6 @@ public DataExportDetails withAccountDetails(DataAccountDetails accountDetails) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transferConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property transferConfiguration in model DataExportDetails")); - } else { - transferConfiguration().validate(); - } - if (accountDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property accountDetails in model DataExportDetails")); - } else { - accountDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataExportDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java index ac9b49802d8bc..b9b23dffc9e06 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -73,23 +72,6 @@ public DataImportDetails withLogCollectionLevel(LogCollectionLevel logCollection return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accountDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property accountDetails in model DataImportDetails")); - } else { - accountDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataImportDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataLocationToServiceLocationMap.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataLocationToServiceLocationMap.java index a0a5ec132c873..3b0f895f934f0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataLocationToServiceLocationMap.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataLocationToServiceLocationMap.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -29,7 +29,7 @@ public final class DataLocationToServiceLocationMap implements JsonSerializable< /** * Creates an instance of DataLocationToServiceLocationMap class. */ - public DataLocationToServiceLocationMap() { + private DataLocationToServiceLocationMap() { } /** @@ -50,14 +50,6 @@ public String serviceLocation() { return this.serviceLocation; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationRequest.java index 993c3e31fb5fb..34601fbd7959c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -168,33 +167,6 @@ public DataTransferDetailsValidationRequest withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (dataExportDetails() != null) { - dataExportDetails().forEach(e -> e.validate()); - } - if (dataImportDetails() != null) { - dataImportDetails().forEach(e -> e.validate()); - } - if (deviceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property deviceType in model DataTransferDetailsValidationRequest")); - } - if (transferType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property transferType in model DataTransferDetailsValidationRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataTransferDetailsValidationRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationResponseProperties.java index 34672a41888a2..0adfa15aabea9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationResponseProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationResponseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -28,7 +28,7 @@ public final class DataTransferDetailsValidationResponseProperties extends Valid /** * Creates an instance of DataTransferDetailsValidationResponseProperties class. */ - public DataTransferDetailsValidationResponseProperties() { + private DataTransferDetailsValidationResponseProperties() { } /** @@ -50,18 +50,6 @@ public ValidationStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataboxJobSecrets.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataboxJobSecrets.java index b29d66826593f..1d3eb1921dca8 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataboxJobSecrets.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataboxJobSecrets.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * The secrets related to a databox job. */ -@Fluent +@Immutable public final class DataboxJobSecrets extends JobSecrets { /* * Used to indicate what type of job secrets object. @@ -29,7 +29,7 @@ public final class DataboxJobSecrets extends JobSecrets { /** * Creates an instance of DataboxJobSecrets class. */ - public DataboxJobSecrets() { + private DataboxJobSecrets() { } /** @@ -51,35 +51,6 @@ public List podSecrets() { return this.podSecrets; } - /** - * Set the podSecrets property: Contains the list of secret objects for a job. - * - * @param podSecrets the podSecrets value to set. - * @return the DataboxJobSecrets object itself. - */ - public DataboxJobSecrets withPodSecrets(List podSecrets) { - this.podSecrets = podSecrets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (podSecrets() != null) { - podSecrets().forEach(e -> e.validate()); - } - if (dcAccessSecurityCode() != null) { - dcAccessSecurityCode().validate(); - } - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java index 48eeb2e620467..9e1d2c8b016df 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -29,7 +29,7 @@ public final class DatacenterAddressInstructionResponse extends DatacenterAddres /** * Creates an instance of DatacenterAddressInstructionResponse class. */ - public DatacenterAddressInstructionResponse() { + private DatacenterAddressInstructionResponse() { } /** @@ -51,15 +51,6 @@ public String communicationInstruction() { return this.communicationInstruction; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java index 2d198f8fa7a66..c4a83cd3eefc1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -89,7 +89,7 @@ public final class DatacenterAddressLocationResponse extends DatacenterAddressRe /** * Creates an instance of DatacenterAddressLocationResponse class. */ - public DatacenterAddressLocationResponse() { + private DatacenterAddressLocationResponse() { } /** @@ -219,15 +219,6 @@ public String additionalShippingInformation() { return this.additionalShippingInformation; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java index 0e4cd1b276151..93de6a73615ab 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -106,26 +105,6 @@ public DatacenterAddressRequest withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageLocation in model DatacenterAddressRequest")); - } - if (skuName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property skuName in model DatacenterAddressRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatacenterAddressRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java index 4786e1071bd7f..f457aad206a4d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -35,7 +35,7 @@ public class DatacenterAddressResponse implements JsonSerializable { /* * Reverse Dc access security code. @@ -29,7 +29,7 @@ public final class DcAccessSecurityCode implements JsonSerializable { /** - * Static value Active for DelayNotificationStatus. + * Delay is still active. */ public static final DelayNotificationStatus ACTIVE = fromString("Active"); /** - * Static value Resolved for DelayNotificationStatus. + * Delay has been resolved. */ public static final DelayNotificationStatus RESOLVED = fromString("Resolved"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceCapabilityDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceCapabilityDetails.java index 26a45ce20c4ef..6731bc496513d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceCapabilityDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceCapabilityDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -24,7 +24,7 @@ public final class DeviceCapabilityDetails implements JsonSerializable deviceCapabilityDetails() { return this.deviceCapabilityDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (deviceCapabilityDetails() != null) { - deviceCapabilityDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java index 8065da2df06c0..3552602379f91 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Device erasure details with erasure completion status and erasureordestructionlog sas key. + * Device erasure details with erasure completion status, secure erasure sas key and erasureordestructionlog sas key. */ @Immutable public final class DeviceErasureDetails implements JsonSerializable { @@ -26,10 +26,15 @@ public final class DeviceErasureDetails implements JsonSerializable { /** * Creates an instance of DiskSecret class. */ - public DiskSecret() { + private DiskSecret() { } /** @@ -50,14 +50,6 @@ public String bitLockerKey() { return this.bitLockerKey; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DoubleEncryption.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DoubleEncryption.java index ee97f8b45a255..4704f50a881bf 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DoubleEncryption.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DoubleEncryption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum DoubleEncryption { /** - * Enum value Enabled. + * Software-based encryption is enabled. */ ENABLED("Enabled"), /** - * Enum value Disabled. + * Software-based encryption is disabled. */ DISABLED("Disabled"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/EncryptionPreferences.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/EncryptionPreferences.java index e3a31b19e10a7..f0d5038745802 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/EncryptionPreferences.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/EncryptionPreferences.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -72,14 +72,6 @@ public EncryptionPreferences withHardwareEncryption(HardwareEncryption hardwareE return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java index 23a35ec351637..8219077df4ae9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -34,7 +34,7 @@ public final class ExportDiskDetails implements JsonSerializable actions) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HardwareEncryption.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HardwareEncryption.java index 1b298354aa974..948ce7ebd29f1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HardwareEncryption.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HardwareEncryption.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum HardwareEncryption { /** - * Enum value Enabled. + * Hardware-based encryption is enabled. */ ENABLED("Enabled"), /** - * Enum value Disabled. + * Hardware-based encryption is disabled. */ DISABLED("Disabled"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HeavyScheduleAvailabilityRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HeavyScheduleAvailabilityRequest.java index 0285ae33bf8de..9382c56a0292a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HeavyScheduleAvailabilityRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HeavyScheduleAvailabilityRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -64,22 +63,6 @@ public HeavyScheduleAvailabilityRequest withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (storageLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageLocation in model HeavyScheduleAvailabilityRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HeavyScheduleAvailabilityRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/IdentityProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/IdentityProperties.java index 721234ff12c60..bc5f2539c61b0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/IdentityProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/IdentityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -72,17 +72,6 @@ public IdentityProperties withUserAssigned(UserAssignedProperties userAssigned) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssigned() != null) { - userAssigned().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java index 9bb3216f1a99e..2beb811f6ab42 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -113,28 +112,6 @@ public String backupManifestCloudPath() { return this.backupManifestCloudPath; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (manifestFile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property manifestFile in model ImportDiskDetails")); - } - if (manifestHash() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property manifestHash in model ImportDiskDetails")); - } - if (bitLockerKey() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property bitLockerKey in model ImportDiskDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImportDiskDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDelayDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDelayDetails.java index 739ac8cc6275c..2dfdf8ec5e188 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDelayDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDelayDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -46,7 +46,7 @@ public final class JobDelayDetails implements JsonSerializable /** * Creates an instance of JobDelayDetails class. */ - public JobDelayDetails() { + private JobDelayDetails() { } /** @@ -94,14 +94,6 @@ public OffsetDateTime resolutionTime() { return this.resolutionTime; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryInfo.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryInfo.java index d9c91ff0990fc..a59e712c59a5c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryInfo.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -50,14 +50,6 @@ public JobDeliveryInfo withScheduledDateTime(OffsetDateTime scheduledDateTime) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryType.java index 3d5f0d95a3ba3..0f64828e9f661 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryType.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum JobDeliveryType { /** - * Enum value NonScheduled. + * Non Scheduled job. */ NON_SCHEDULED("NonScheduled"), /** - * Enum value Scheduled. + * Scheduled job. */ SCHEDULED("Scheduled"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java index bdca87c516e5a..23d88835db475 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -515,61 +514,6 @@ JobDetails withDataCenterCode(DataCenterCode dataCenterCode) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (jobStages() != null) { - jobStages().forEach(e -> e.validate()); - } - if (contactDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property contactDetails in model JobDetails")); - } else { - contactDetails().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - if (deliveryPackage() != null) { - deliveryPackage().validate(); - } - if (returnPackage() != null) { - returnPackage().validate(); - } - if (dataImportDetails() != null) { - dataImportDetails().forEach(e -> e.validate()); - } - if (dataExportDetails() != null) { - dataExportDetails().forEach(e -> e.validate()); - } - if (preferences() != null) { - preferences().validate(); - } - if (reverseShippingDetails() != null) { - reverseShippingDetails().validate(); - } - if (copyLogDetails() != null) { - copyLogDetails().forEach(e -> e.validate()); - } - if (deviceErasureDetails() != null) { - deviceErasureDetails().validate(); - } - if (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - if (lastMitigationActionOnJob() != null) { - lastMitigationActionOnJob().validate(); - } - if (datacenterAddress() != null) { - datacenterAddress().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java index 0ebf267e0548d..e3fc604a45556 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -18,46 +18,39 @@ */ public interface JobResource { /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. + * Gets the id property: Fully qualified resource Id for the resource. * - * @return the tags value. + * @return the id value. */ - Map tags(); + String id(); /** - * Gets the name property: Name of the object. + * Gets the name property: The name of the resource. * * @return the name value. */ String name(); /** - * Gets the id property: Id of the object. + * Gets the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ - String id(); + String type(); /** - * Gets the type property: Type of the object. + * Gets the location property: The geo-location where the resource lives. * - * @return the type value. + * @return the location value. */ - String type(); + String location(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the tags property: Resource tags. * - * @return the systemData value. + * @return the tags value. */ - SystemData systemData(); + Map tags(); /** * Gets the sku property: The sku type. @@ -73,6 +66,13 @@ public interface JobResource { */ ResourceIdentity identity(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the transferType property: Type of the data transfer. * @@ -267,7 +267,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithSku withExistingResourceGroup(String resourceGroupName); @@ -492,28 +492,6 @@ interface WithIfMatch { */ JobResource refresh(Context context); - /** - * Request to mark devices for a given job as shipped. - * - * @param markDevicesShippedRequest Mark Devices Shipped Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response markDevicesShippedWithResponse(MarkDevicesShippedRequest markDevicesShippedRequest, Context context); - - /** - * Request to mark devices for a given job as shipped. - * - * @param markDevicesShippedRequest Mark Devices Shipped Request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest); - /** * Book shipment pick up. * @@ -579,4 +557,26 @@ Response bookShipmentPickUpWithResponse(ShipmentPickUpRe * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}. */ PagedIterable listCredentials(Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response markDevicesShippedWithResponse(MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceUpdateParameter.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceUpdateParameter.java index 1939836aae495..c7b75954037e6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceUpdateParameter.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceUpdateParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -114,20 +114,6 @@ public JobResourceUpdateParameter withDetails(UpdateJobDetails details) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java index 283e6d7aa6972..74ebcd6a913f2 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -34,7 +34,7 @@ public class JobSecrets implements JsonSerializable { /** * Creates an instance of JobSecrets class. */ - public JobSecrets() { + protected JobSecrets() { } /** @@ -86,20 +86,6 @@ JobSecrets withError(CloudError error) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dcAccessSecurityCode() != null) { - dcAccessSecurityCode().validate(); - } - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobStages.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobStages.java index 2e129cb5f6382..2a4ab339276ca 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobStages.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobStages.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -52,7 +52,7 @@ public final class JobStages implements JsonSerializable { /** * Creates an instance of JobStages class. */ - public JobStages() { + private JobStages() { } /** @@ -109,17 +109,6 @@ public List delayInformation() { return this.delayInformation; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (delayInformation() != null) { - delayInformation().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java index 25f4b6f9b88dc..ab27dc38e72eb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -13,60 +13,63 @@ */ public interface Jobs { /** - * Lists all the jobs available under the subscription. + * Gets information about the specified job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param expand $expand is supported on details parameter for job, which provides details on the job stages. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. + * @return information about the specified job along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand, + Context context); /** - * Lists all the jobs available under the subscription. + * Gets information about the specified job. * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. + * @return information about the specified job. */ - PagedIterable list(String skipToken, Context context); + JobResource getByResourceGroup(String resourceGroupName, String jobName); /** - * Request to mark devices for a given job as shipped. + * Deletes a job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + void deleteByResourceGroup(String resourceGroupName, String jobName); /** - * Request to mark devices for a given job as shipped. + * Deletes a job. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. - * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void markDevicesShipped(String jobName, String resourceGroupName, - MarkDevicesShippedRequest markDevicesShippedRequest); + void delete(String resourceGroupName, String jobName, Context context); /** * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -77,7 +80,7 @@ void markDevicesShipped(String jobName, String resourceGroupName, /** * Lists all the jobs available under the given resource group. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,63 +91,30 @@ void markDevicesShipped(String jobName, String resourceGroupName, PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context); /** - * Gets information about the specified job. - * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param expand $expand is supported on details parameter for job, which provides details on the job stages. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand, - Context context); - - /** - * Gets information about the specified job. - * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job. - */ - JobResource getByResourceGroup(String resourceGroupName, String jobName); - - /** - * Deletes a job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String jobName); + PagedIterable list(); /** - * Deletes a job. + * Lists all the jobs available under the subscription. * - * @param resourceGroupName The Resource Group Name. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. + * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return job Resource Collection as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String jobName, Context context); + PagedIterable list(String skipToken, Context context); /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. @@ -160,7 +130,7 @@ Response bookShipmentPickUpWithResponse(String resourceG /** * Book shipment pick up. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param shipmentPickUpRequest Details of shipment pick up request. @@ -175,7 +145,7 @@ ShipmentPickUpResponse bookShipmentPickUp(String resourceGroupName, String jobNa /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -191,7 +161,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc /** * CancelJob. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param cancellationReason Reason for cancellation. @@ -204,7 +174,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,7 +187,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc /** * This method gets the unencrypted secrets related to the job. * - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. * @param context The context to associate with this operation. @@ -228,6 +198,36 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc */ PagedIterable listCredentials(String resourceGroupName, String jobName, Context context); + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void markDevicesShipped(String jobName, String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest); + /** * Gets information about the specified job. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KekType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KekType.java index ac6e431f58014..126fe050569da 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KekType.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KekType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum KekType { /** - * Enum value MicrosoftManaged. + * Key encryption key is managed by Microsoft. */ MICROSOFT_MANAGED("MicrosoftManaged"), /** - * Enum value CustomerManaged. + * Key encryption key is managed by the Customer. */ CUSTOMER_MANAGED("CustomerManaged"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KeyEncryptionKey.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KeyEncryptionKey.java index 885ea83b8574d..f41bba1b5de8d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KeyEncryptionKey.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KeyEncryptionKey.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -123,23 +122,6 @@ public KeyEncryptionKey withKekVaultResourceId(String kekVaultResourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kekType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property kekType in model KeyEncryptionKey")); - } - if (identityProperties() != null) { - identityProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KeyEncryptionKey.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LastMitigationActionOnJob.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LastMitigationActionOnJob.java index 6bcd8e260ca90..04717aee27c8e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LastMitigationActionOnJob.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LastMitigationActionOnJob.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Last Mitigation Action Performed On Job. */ -@Fluent +@Immutable public final class LastMitigationActionOnJob implements JsonSerializable { /* * Action performed date time @@ -38,7 +38,7 @@ public final class LastMitigationActionOnJob implements JsonSerializable serialNumberCustomerResolutionMap() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ModelName.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ModelName.java index 1f10f82f50105..f3d63e22dc20e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ModelName.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ModelName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -10,32 +10,32 @@ */ public enum ModelName { /** - * Enum value DataBox. + * Data Box. */ DATA_BOX("DataBox"), /** - * Enum value DataBoxDisk. + * Data Box Disk. */ DATA_BOX_DISK("DataBoxDisk"), /** - * Enum value DataBoxHeavy. + * Data Box Heavy. */ DATA_BOX_HEAVY("DataBoxHeavy"), /** - * Enum value DataBoxCustomerDisk. + * Data Box Customer Disk. */ DATA_BOX_CUSTOMER_DISK("DataBoxCustomerDisk"), /** - * Enum value AzureDataBox120. + * Data Box V2 with 120TB usable capacity. */ AZURE_DATA_BOX120("AzureDataBox120"), /** - * Enum value AzureDataBox525. + * Data Box V2 with 525TB usable capacity. */ AZURE_DATA_BOX525("AzureDataBox525"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationPreference.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationPreference.java index 054aeadecef84..44bedcd7baae5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationPreference.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationPreference.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -73,21 +72,6 @@ public NotificationPreference withSendNotification(boolean sendNotification) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (stageName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property stageName in model NotificationPreference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NotificationPreference.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java index 690b67e24055f..02c7ca69e6fb9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -12,42 +12,42 @@ */ public final class NotificationStageName extends ExpandableStringEnum { /** - * Static value DevicePrepared for NotificationStageName. + * Notification at device prepared stage. */ public static final NotificationStageName DEVICE_PREPARED = fromString("DevicePrepared"); /** - * Static value Dispatched for NotificationStageName. + * Notification at device dispatched stage. */ public static final NotificationStageName DISPATCHED = fromString("Dispatched"); /** - * Static value Delivered for NotificationStageName. + * Notification at device delivered stage. */ public static final NotificationStageName DELIVERED = fromString("Delivered"); /** - * Static value PickedUp for NotificationStageName. + * Notification at device picked up from user stage. */ public static final NotificationStageName PICKED_UP = fromString("PickedUp"); /** - * Static value AtAzureDC for NotificationStageName. + * Notification at device received at Azure datacenter stage. */ public static final NotificationStageName AT_AZURE_DC = fromString("AtAzureDC"); /** - * Static value DataCopy for NotificationStageName. + * Notification at data copy started stage. */ public static final NotificationStageName DATA_COPY = fromString("DataCopy"); /** - * Static value Created for NotificationStageName. + * Notification at job created stage. */ public static final NotificationStageName CREATED = fromString("Created"); /** - * Static value ShippedToCustomer for NotificationStageName. + * Notification at shipped devices to customer stage. */ public static final NotificationStageName SHIPPED_TO_CUSTOMER = fromString("ShippedToCustomer"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operation.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operation.java index 1eb273650d776..c50fbc2d52889 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operation.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -25,13 +25,6 @@ public interface Operation { */ OperationDisplay display(); - /** - * Gets the properties property: Operation properties. - * - * @return the properties value. - */ - Object properties(); - /** * Gets the origin property: Origin of the operation. Can be : user|system|user,system. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationDisplay.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationDisplay.java index ed78ce6b1d359..a4ba9bfd78e9f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationDisplay.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Operation display. */ -@Fluent +@Immutable public final class OperationDisplay implements JsonSerializable { /* * Provider name. @@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable list(); /** - * This method gets all the operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection as paginated response with {@link PagedIterable}. + * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OverallValidationStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OverallValidationStatus.java index 9dee0d92f111b..c6b4cbab8b839 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OverallValidationStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OverallValidationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,17 +9,17 @@ */ public enum OverallValidationStatus { /** - * Enum value AllValidToProceed. + * Every input request is valid. */ ALL_VALID_TO_PROCEED("AllValidToProceed"), /** - * Enum value InputsRevisitRequired. + * Some input requests are not valid. */ INPUTS_REVISIT_REQUIRED("InputsRevisitRequired"), /** - * Enum value CertainInputValidationsSkipped. + * Certain input validations skipped. */ CERTAIN_INPUT_VALIDATIONS_SKIPPED("CertainInputValidationsSkipped"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java index f88f16836f479..2a83d3466b68a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -97,14 +97,6 @@ public PackageCarrierDetails withTrackingId(String trackingId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java index 9cd32cc150a91..a29f7292d2d7a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -72,14 +72,6 @@ public PackageCarrierInfo withTrackingId(String trackingId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java index d0205b5038176..0f020b85bfb52 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -34,7 +34,7 @@ public final class PackageShippingDetails implements JsonSerializable { /** - * Static value InternalIssueDelay for PortalDelayErrorCode. + * Delay due to any internal reasons. */ public static final PortalDelayErrorCode INTERNAL_ISSUE_DELAY = fromString("InternalIssueDelay"); /** - * Static value ActiveOrderLimitBreachedDelay for PortalDelayErrorCode. + * Active Order limit breached. */ public static final PortalDelayErrorCode ACTIVE_ORDER_LIMIT_BREACHED_DELAY = fromString("ActiveOrderLimitBreachedDelay"); /** - * Static value HighDemandDelay for PortalDelayErrorCode. + * High demand. */ public static final PortalDelayErrorCode HIGH_DEMAND_DELAY = fromString("HighDemandDelay"); /** - * Static value LargeNumberOfFilesDelay for PortalDelayErrorCode. + * Slow copy due to large number of files. */ public static final PortalDelayErrorCode LARGE_NUMBER_OF_FILES_DELAY = fromString("LargeNumberOfFilesDelay"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java index 99074893557d1..311775e3d8eb6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -150,23 +150,6 @@ public Preferences withStorageAccountAccessTierPreferences(List storageA return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transportPreferences() != null) { - transportPreferences().validate(); - } - if (reverseTransportPreferences() != null) { - reverseTransportPreferences().validate(); - } - if (encryptionPreferences() != null) { - encryptionPreferences().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationRequest.java index b9b02eabc5c01..baa93124d766e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -117,25 +116,6 @@ public PreferencesValidationRequest withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (preference() != null) { - preference().validate(); - } - if (deviceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property deviceType in model PreferencesValidationRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PreferencesValidationRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationResponseProperties.java index b9831140fcdc7..7ce9d83fd4ea5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationResponseProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationResponseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -28,7 +28,7 @@ public final class PreferencesValidationResponseProperties extends ValidationInp /** * Creates an instance of PreferencesValidationResponseProperties class. */ - public PreferencesValidationResponseProperties() { + private PreferencesValidationResponseProperties() { } /** @@ -50,18 +50,6 @@ public ValidationStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java index a3281e94e888a..9d6ae12281455 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -124,26 +124,6 @@ public RegionConfigurationRequest withDeviceCapabilityRequest(DeviceCapabilityRe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scheduleAvailabilityRequest() != null) { - scheduleAvailabilityRequest().validate(); - } - if (transportAvailabilityRequest() != null) { - transportAvailabilityRequest().validate(); - } - if (datacenterAddressRequest() != null) { - datacenterAddressRequest().validate(); - } - if (deviceCapabilityRequest() != null) { - deviceCapabilityRequest().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java index ac7b3f9b766ea..35127e4d9c4c2 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceIdentity.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceIdentity.java index 9ec349cd0d122..e605256344d0c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceIdentity.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -101,21 +101,6 @@ public ResourceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceProviders.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceProviders.java index f0ad59955b797..62419f79805c1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceProviders.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceProviders.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -16,7 +16,7 @@ public interface ResourceProviders { * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -32,7 +32,7 @@ Response mitigateWithResponse(String jobName, String resourceGroupName, Mi * * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The Resource Group Name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param mitigateJobRequest Mitigation Request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java index 50bc3f2cfff67..47062d0f9bfac 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -89,20 +89,6 @@ public Boolean isUpdated() { return this.isUpdated; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contactDetails() != null) { - contactDetails().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java index d81ebe9887d9b..520c08003d0a1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,17 +9,18 @@ */ public enum ReverseShippingDetailsEditStatus { /** - * Enum value Enabled. + * Reverse shipping details can be edited. */ ENABLED("Enabled"), /** - * Enum value Disabled. + * Edit is disabled for Reverse shipping details. */ DISABLED("Disabled"), /** - * Enum value NotSupported. + * Edit is not supported for Reverse shipping details. Either subscription feature is not available or SKU doesn't + * support this feature. */ NOT_SUPPORTED("NotSupported"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java index 1e162e82297ef..ee42cb4ee76dc 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,17 +9,18 @@ */ public enum ReverseTransportPreferenceEditStatus { /** - * Enum value Enabled. + * Reverse Transport Preferences can be edited. */ ENABLED("Enabled"), /** - * Enum value Disabled. + * Edit is disabled for Reverse Transport Preferences. */ DISABLED("Disabled"), /** - * Enum value NotSupported. + * Edit is not supported for Reverse Transport Preferences. Either subscription feature is not available or SKU + * doesn't support this feature. */ NOT_SUPPORTED("NotSupported"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityRequest.java index 41fb92354064c..afb43fd8bccb1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -120,21 +119,6 @@ public ScheduleAvailabilityRequest withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageLocation in model ScheduleAvailabilityRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduleAvailabilityRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityResponse.java index 87c98a1ffc08e..3dbb9655d82c4 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -27,7 +27,7 @@ public final class ScheduleAvailabilityResponse implements JsonSerializable availableDates() { return this.availableDates; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Services.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Services.java index 2286b757e497b..936f8ac4ce434 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Services.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Services.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -13,40 +13,38 @@ */ public interface Services { /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. + * @return configuration response specific to a region along with {@link Response}. */ - PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, - AvailableSkuRequest availableSkuRequest); + Response regionConfigurationWithResponse(String location, + RegionConfigurationRequest regionConfigurationRequest, Context context); /** - * This method provides the list of available skus for the given subscription, resource group and location. + * This API provides configuration details specific to given region/location at Subscription level. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param availableSkuRequest Filters for showing the available skus. - * @param context The context to associate with this operation. + * @param location The name of the Azure region. + * @param regionConfigurationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. + * @return configuration response specific to a region. */ - PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, - AvailableSkuRequest availableSkuRequest, Context context); + RegionConfigurationResponse regionConfiguration(String location, + RegionConfigurationRequest regionConfigurationRequest); /** * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,8 +58,8 @@ Response validateAddressWithResponse(String location, V * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and * provide alternate addresses if any. * - * @param location The location of the resource. - * @param validateAddress Shipping address of the customer. + * @param location The name of the Azure region. + * @param validateAddress The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -70,113 +68,115 @@ Response validateAddressWithResponse(String location, V AddressValidationOutput validateAddress(String location, ValidateAddress validateAddress); /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of pre job creation validations along with {@link Response}. */ - Response validateInputsByResourceGroupWithResponse(String resourceGroupName, String location, - ValidationRequest validationRequest, Context context); + Response validateInputsWithResponse(String location, ValidationRequest validationRequest, + Context context); /** - * This method does all necessary pre-job creation validation under resource group. + * This method does all necessary pre-job creation validation under subscription. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param location The name of the Azure region. + * @param validationRequest The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of pre job creation validations. */ - ValidationResponse validateInputsByResourceGroup(String resourceGroupName, String location, - ValidationRequest validationRequest); + ValidationResponse validateInputs(String location, ValidationRequest validationRequest); /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response}. + * @return the available skus operation response as paginated response with {@link PagedIterable}. */ - Response validateInputsWithResponse(String location, ValidationRequest validationRequest, - Context context); + PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, + AvailableSkuRequest availableSkuRequest); /** - * This method does all necessary pre-job creation validation under subscription. + * This method provides the list of available skus for the given subscription, resource group and location. * - * @param location The location of the resource. - * @param validationRequest Inputs of the customer. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param availableSkuRequest Filters for showing the available skus. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations. + * @return the available skus operation response as paginated response with {@link PagedIterable}. */ - ValidationResponse validateInputs(String location, ValidationRequest validationRequest); + PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, + AvailableSkuRequest availableSkuRequest, Context context); /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration response specific to a region along with {@link Response}. */ - Response regionConfigurationWithResponse(String location, - RegionConfigurationRequest regionConfigurationRequest, Context context); + Response regionConfigurationByResourceGroupWithResponse(String resourceGroupName, + String location, RegionConfigurationRequest regionConfigurationRequest, Context context); /** - * This API provides configuration details specific to given region/location at Subscription level. + * This API provides configuration details specific to given region/location at Resource group level. * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration response specific to a region. */ - RegionConfigurationResponse regionConfiguration(String location, + RegionConfigurationResponse regionConfigurationByResourceGroup(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest); /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response}. + * @return response of pre job creation validations along with {@link Response}. */ - Response regionConfigurationByResourceGroupWithResponse(String resourceGroupName, - String location, RegionConfigurationRequest regionConfigurationRequest, Context context); + Response validateInputsByResourceGroupWithResponse(String resourceGroupName, String location, + ValidationRequest validationRequest, Context context); /** - * This API provides configuration details specific to given region/location at Resource group level. + * This method does all necessary pre-job creation validation under resource group. * - * @param resourceGroupName The Resource Group Name. - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The name of the Azure region. + * @param validationRequest Inputs of the customer. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region. + * @return response of pre job creation validations. */ - RegionConfigurationResponse regionConfigurationByResourceGroup(String resourceGroupName, String location, - RegionConfigurationRequest regionConfigurationRequest); + ValidationResponse validateInputsByResourceGroup(String resourceGroupName, String location, + ValidationRequest validationRequest); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareCredentialDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareCredentialDetails.java index fb10872d7661f..82a367f35ffe4 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareCredentialDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareCredentialDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -45,7 +45,7 @@ public final class ShareCredentialDetails implements JsonSerializable supportedAccessProtocols() { return this.supportedAccessProtocols; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareDestinationFormatType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareDestinationFormatType.java index 24243911c2cc5..32bf9f72624b9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareDestinationFormatType.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareDestinationFormatType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,32 +9,32 @@ */ public enum ShareDestinationFormatType { /** - * Enum value UnknownType. + * Unknown format. */ UNKNOWN_TYPE("UnknownType"), /** - * Enum value HCS. + * Storsimple data format. */ HCS("HCS"), /** - * Enum value BlockBlob. + * Azure storage block blob format. */ BLOCK_BLOB("BlockBlob"), /** - * Enum value PageBlob. + * Azure storage page blob format. */ PAGE_BLOB("PageBlob"), /** - * Enum value AzureFile. + * Azure storage file format. */ AZURE_FILE("AzureFile"), /** - * Enum value ManagedDisk. + * Azure Compute Disk. */ MANAGED_DISK("ManagedDisk"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpRequest.java index 53143dd28e08b..d4f17309397c0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpRequest.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.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; @@ -105,30 +104,6 @@ public ShipmentPickUpRequest withShipmentLocation(String shipmentLocation) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startTime() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property startTime in model ShipmentPickUpRequest")); - } - if (endTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property endTime in model ShipmentPickUpRequest")); - } - if (shipmentLocation() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property shipmentLocation in model ShipmentPickUpRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ShipmentPickUpRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpResponse.java index f8580879f8374..93e1504c6440c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShippingAddress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShippingAddress.java index 2c6265165f5c1..414ff04349420 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShippingAddress.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShippingAddress.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -325,24 +324,6 @@ public ShippingAddress withTaxIdentificationNumber(String taxIdentificationNumbe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (streetAddress1() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property streetAddress1 in model ShippingAddress")); - } - if (country() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property country in model ShippingAddress")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ShippingAddress.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Sku.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Sku.java index 1b01e6750141b..fbb436fa2326e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Sku.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Sku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -128,19 +127,6 @@ public Sku withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationRequest.java index fe08148caa050..e4d26b50f1164 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -173,37 +172,6 @@ public SkuAvailabilityValidationRequest withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (deviceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property deviceType in model SkuAvailabilityValidationRequest")); - } - if (transferType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property transferType in model SkuAvailabilityValidationRequest")); - } - if (country() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property country in model SkuAvailabilityValidationRequest")); - } - if (location() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property location in model SkuAvailabilityValidationRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SkuAvailabilityValidationRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationResponseProperties.java index b37255d6d0743..889f562a0bf82 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationResponseProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationResponseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -28,7 +28,7 @@ public final class SkuAvailabilityValidationResponseProperties extends Validatio /** * Creates an instance of SkuAvailabilityValidationResponseProperties class. */ - public SkuAvailabilityValidationResponseProperties() { + private SkuAvailabilityValidationResponseProperties() { } /** @@ -50,18 +50,6 @@ public ValidationStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCapacity.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCapacity.java index c71889ff85f32..875bc94728133 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCapacity.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCapacity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -34,7 +34,7 @@ public final class SkuCapacity implements JsonSerializable { /** * Creates an instance of SkuCapacity class. */ - public SkuCapacity() { + private SkuCapacity() { } /** @@ -64,14 +64,6 @@ public String individualSkuUsable() { return this.individualSkuUsable; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCost.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCost.java index 4d70fb4b5224c..cc3e169e7926a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCost.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCost.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -35,7 +35,7 @@ public final class SkuCost implements JsonSerializable { /** * Creates an instance of SkuCost class. */ - public SkuCost() { + private SkuCost() { } /** @@ -66,14 +66,6 @@ public Double multiplier() { return this.multiplier; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuDisabledReason.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuDisabledReason.java index 641a24198eada..150daaff394da 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuDisabledReason.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuDisabledReason.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,32 +9,32 @@ */ public enum SkuDisabledReason { /** - * Enum value None. + * SKU is not disabled. */ NONE("None"), /** - * Enum value Country. + * SKU is not available in the requested country. */ COUNTRY("Country"), /** - * Enum value Region. + * SKU is not available to push data to the requested Azure region. */ REGION("Region"), /** - * Enum value Feature. + * Required features are not enabled for the SKU. */ FEATURE("Feature"), /** - * Enum value OfferType. + * Subscription does not have required offer types for the SKU. */ OFFER_TYPE("OfferType"), /** - * Enum value NoSubscriptionInfo. + * Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. */ NO_SUBSCRIPTION_INFO("NoSubscriptionInfo"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java index 4da9e7bba884b..a318365f351bd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java index 6c5d662b39fb3..7252093efcdd0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java @@ -1,30 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; /** - * Defines values for SkuName. + * SKU names. */ public enum SkuName { /** - * Enum value DataBox. + * Data Box. */ DATA_BOX("DataBox"), /** - * Enum value DataBoxDisk. + * Data Box Disk. */ DATA_BOX_DISK("DataBoxDisk"), /** - * Enum value DataBoxHeavy. + * Data Box Heavy. */ DATA_BOX_HEAVY("DataBoxHeavy"), /** - * Enum value DataBoxCustomerDisk. + * Data Box Customer Disk. */ DATA_BOX_CUSTOMER_DISK("DataBoxCustomerDisk"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java index 4e914b389747f..9c93e9af9039e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -12,107 +12,107 @@ */ public final class StageName extends ExpandableStringEnum { /** - * Static value DeviceOrdered for StageName. + * An order has been created. */ public static final StageName DEVICE_ORDERED = fromString("DeviceOrdered"); /** - * Static value DevicePrepared for StageName. + * A device has been prepared for the order. */ public static final StageName DEVICE_PREPARED = fromString("DevicePrepared"); /** - * Static value Dispatched for StageName. + * Device has been dispatched to the user of the order. */ public static final StageName DISPATCHED = fromString("Dispatched"); /** - * Static value Delivered for StageName. + * Device has been delivered to the user of the order. */ public static final StageName DELIVERED = fromString("Delivered"); /** - * Static value PickedUp for StageName. + * Device has been picked up from user and in transit to Azure datacenter. */ public static final StageName PICKED_UP = fromString("PickedUp"); /** - * Static value AtAzureDC for StageName. + * Device has been received at Azure datacenter from the user. */ public static final StageName AT_AZURE_DC = fromString("AtAzureDC"); /** - * Static value DataCopy for StageName. + * Data copy from the device at Azure datacenter. */ public static final StageName DATA_COPY = fromString("DataCopy"); /** - * Static value Completed for StageName. + * Order has completed. */ public static final StageName COMPLETED = fromString("Completed"); /** - * Static value CompletedWithErrors for StageName. + * Order has completed with errors. */ public static final StageName COMPLETED_WITH_ERRORS = fromString("CompletedWithErrors"); /** - * Static value Cancelled for StageName. + * Order has been cancelled. */ public static final StageName CANCELLED = fromString("Cancelled"); /** - * Static value Failed_IssueReportedAtCustomer for StageName. + * Order has failed due to issue reported by user. */ public static final StageName FAILED_ISSUE_REPORTED_AT_CUSTOMER = fromString("Failed_IssueReportedAtCustomer"); /** - * Static value Failed_IssueDetectedAtAzureDC for StageName. + * Order has failed due to issue detected at Azure datacenter. */ public static final StageName FAILED_ISSUE_DETECTED_AT_AZURE_DC = fromString("Failed_IssueDetectedAtAzureDC"); /** - * Static value Aborted for StageName. + * Order has been aborted. */ public static final StageName ABORTED = fromString("Aborted"); /** - * Static value CompletedWithWarnings for StageName. + * Order has completed with warnings. */ public static final StageName COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); /** - * Static value ReadyToDispatchFromAzureDC for StageName. + * Device is ready to be handed to customer from Azure DC. */ public static final StageName READY_TO_DISPATCH_FROM_AZURE_DC = fromString("ReadyToDispatchFromAzureDC"); /** - * Static value ReadyToReceiveAtAzureDC for StageName. + * Device can be dropped off at Azure DC. */ public static final StageName READY_TO_RECEIVE_AT_AZURE_DC = fromString("ReadyToReceiveAtAzureDC"); /** - * Static value Created for StageName. + * Job created by the customer. */ public static final StageName CREATED = fromString("Created"); /** - * Static value ShippedToAzureDC for StageName. + * User shipped the device to AzureDC. */ public static final StageName SHIPPED_TO_AZURE_DC = fromString("ShippedToAzureDC"); /** - * Static value AwaitingShipmentDetails for StageName. + * Awaiting shipment details of device from customer. */ public static final StageName AWAITING_SHIPMENT_DETAILS = fromString("AwaitingShipmentDetails"); /** - * Static value PreparingToShipFromAzureDC for StageName. + * Preparing the device to ship to customer. */ public static final StageName PREPARING_TO_SHIP_FROM_AZURE_DC = fromString("PreparingToShipFromAzureDC"); /** - * Static value ShippedToCustomer for StageName. + * Shipped the device to customer. */ public static final StageName SHIPPED_TO_CUSTOMER = fromString("ShippedToCustomer"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java index f03db984adf99..3ec802ec4d319 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,67 +9,67 @@ */ public enum StageStatus { /** - * Enum value None. + * No status available yet. */ NONE("None"), /** - * Enum value InProgress. + * Stage is in progress. */ IN_PROGRESS("InProgress"), /** - * Enum value Succeeded. + * Stage has succeeded. */ SUCCEEDED("Succeeded"), /** - * Enum value Failed. + * Stage has failed. */ FAILED("Failed"), /** - * Enum value Cancelled. + * Stage has been cancelled. */ CANCELLED("Cancelled"), /** - * Enum value Cancelling. + * Stage is cancelling. */ CANCELLING("Cancelling"), /** - * Enum value SucceededWithErrors. + * Stage has succeeded with errors. */ SUCCEEDED_WITH_ERRORS("SucceededWithErrors"), /** - * Enum value WaitingForCustomerAction. + * Stage is stuck until customer takes some action. */ WAITING_FOR_CUSTOMER_ACTION("WaitingForCustomerAction"), /** - * Enum value SucceededWithWarnings. + * Stage has succeeded with warnings. */ SUCCEEDED_WITH_WARNINGS("SucceededWithWarnings"), /** - * Enum value WaitingForCustomerActionForKek. + * Stage is waiting for customer action for kek action items. */ WAITING_FOR_CUSTOMER_ACTION_FOR_KEK("WaitingForCustomerActionForKek"), /** - * Enum value WaitingForCustomerActionForCleanUp. + * Stage is waiting for customer action for clean up. */ WAITING_FOR_CUSTOMER_ACTION_FOR_CLEAN_UP("WaitingForCustomerActionForCleanUp"), /** - * Enum value CustomerActionPerformedForCleanUp. + * Stage has performed customer action for clean up. */ CUSTOMER_ACTION_PERFORMED_FOR_CLEAN_UP("CustomerActionPerformedForCleanUp"), /** - * Enum value CustomerActionPerformed. + * Stage has performed customer action for clean up. */ CUSTOMER_ACTION_PERFORMED("CustomerActionPerformed"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StorageAccountDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StorageAccountDetails.java index e3290fb05820e..11b10403dd846 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StorageAccountDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StorageAccountDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -71,22 +70,6 @@ public StorageAccountDetails withSharePassword(String sharePassword) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (storageAccountId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storageAccountId in model StorageAccountDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StorageAccountDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationRequest.java index fcfc4959a76ad..bcc3eb416c401 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -37,15 +37,6 @@ public ValidationInputDiscriminator validationType() { return this.validationType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java index 5785a57a9c8d7..5e3bbe183da1f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -29,7 +29,7 @@ public final class SubscriptionIsAllowedToCreateJobValidationResponseProperties /** * Creates an instance of SubscriptionIsAllowedToCreateJobValidationResponseProperties class. */ - public SubscriptionIsAllowedToCreateJobValidationResponseProperties() { + private SubscriptionIsAllowedToCreateJobValidationResponseProperties() { } /** @@ -51,18 +51,6 @@ public ValidationStatus status() { return this.status; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (error() != null) { - error().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferAllDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferAllDetails.java index 96fdccdc8ee1b..0b38bed81a27a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferAllDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferAllDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -98,21 +97,6 @@ public TransferAllDetails withTransferAllFiles(Boolean transferAllFiles) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataAccountType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataAccountType in model TransferAllDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TransferAllDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfiguration.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfiguration.java index 85d9b1dfa3362..13156a4339ffa 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfiguration.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -105,27 +104,6 @@ public TransferConfiguration withTransferAllDetails(TransferConfigurationTransfe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transferConfigurationType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property transferConfigurationType in model TransferConfiguration")); - } - if (transferFilterDetails() != null) { - transferFilterDetails().validate(); - } - if (transferAllDetails() != null) { - transferAllDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TransferConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferAllDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferAllDetails.java index 1f6a1cf7599d0..76776e20627aa 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferAllDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferAllDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -49,17 +49,6 @@ public TransferConfigurationTransferAllDetails withInclude(TransferAllDetails in return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (include() != null) { - include().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferFilterDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferFilterDetails.java index 37451696d4ed2..5bf6dad1bcba7 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferFilterDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferFilterDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -49,17 +49,6 @@ public TransferConfigurationTransferFilterDetails withInclude(TransferFilterDeta return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (include() != null) { - include().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationType.java index 68caafab0c4aa..14109fa7cd541 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationType.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum TransferConfigurationType { /** - * Enum value TransferAll. + * Transfer all the data. */ TRANSFER_ALL("TransferAll"), /** - * Enum value TransferUsingFilter. + * Transfer using filter. */ TRANSFER_USING_FILTER("TransferUsingFilter"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferFilterDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferFilterDetails.java index 221684cbcccfa..5c4749bba23fa 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferFilterDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferFilterDetails.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -124,30 +123,6 @@ public TransferFilterDetails withFilterFileDetails(List filte return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataAccountType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataAccountType in model TransferFilterDetails")); - } - if (blobFilterDetails() != null) { - blobFilterDetails().validate(); - } - if (azureFileFilterDetails() != null) { - azureFileFilterDetails().validate(); - } - if (filterFileDetails() != null) { - filterFileDetails().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TransferFilterDetails.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferType.java index 7652a7da241e9..8eba27669aa9b 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferType.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum TransferType { /** - * Enum value ImportToAzure. + * Import data to azure. */ IMPORT_TO_AZURE("ImportToAzure"), /** - * Enum value ExportFromAzure. + * Export data from azure. */ EXPORT_FROM_AZURE("ExportFromAzure"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityDetails.java index 26dc7e2b4861c..3cd4f23a880bf 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -24,7 +24,7 @@ public final class TransportAvailabilityDetails implements JsonSerializable transportAvailabilityDetails() { return this.transportAvailabilityDetails; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transportAvailabilityDetails() != null) { - transportAvailabilityDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java index 5d4787df1e66f..06ac4cb83a72f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; 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; @@ -64,21 +63,6 @@ public Boolean isUpdated() { return this.isUpdated; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (preferredShipmentType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property preferredShipmentType in model TransportPreferences")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TransportPreferences.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportShipmentTypes.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportShipmentTypes.java index f6335d2e9de0c..eff1740a54ffd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportShipmentTypes.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportShipmentTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,12 +9,12 @@ */ public enum TransportShipmentTypes { /** - * Enum value CustomerManaged. + * Shipment Logistics is handled by the customer. */ CUSTOMER_MANAGED("CustomerManaged"), /** - * Enum value MicrosoftManaged. + * Shipment Logistics is handled by Microsoft. */ MICROSOFT_MANAGED("MicrosoftManaged"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentials.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentials.java index 478a865e6b336..e0817849cf7f0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentials.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentials.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java index bdd25bb1f17b5..fcfa236e96b88 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -172,32 +172,6 @@ public UpdateJobDetails withReturnToCustomerPackageDetails(PackageCarrierDetails return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contactDetails() != null) { - contactDetails().validate(); - } - if (shippingAddress() != null) { - shippingAddress().validate(); - } - if (reverseShippingDetails() != null) { - reverseShippingDetails().validate(); - } - if (preferences() != null) { - preferences().validate(); - } - if (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - if (returnToCustomerPackageDetails() != null) { - returnToCustomerPackageDetails().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedIdentity.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedIdentity.java index 2ca2487ee69bf..f266ffeb67ad8 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedIdentity.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -12,17 +12,17 @@ import java.io.IOException; /** - * Class defining User assigned identity details. + * User assigned identity properties. */ @Immutable public final class UserAssignedIdentity implements JsonSerializable { /* - * The principal id of user assigned identity. + * The principal ID of the assigned identity. */ private String principalId; /* - * The client id of user assigned identity. + * The client ID of the assigned identity. */ private String clientId; @@ -33,7 +33,7 @@ public UserAssignedIdentity() { } /** - * Get the principalId property: The principal id of user assigned identity. + * Get the principalId property: The principal ID of the assigned identity. * * @return the principalId value. */ @@ -42,7 +42,7 @@ public String principalId() { } /** - * Get the clientId property: The client id of user assigned identity. + * Get the clientId property: The client ID of the assigned identity. * * @return the clientId value. */ @@ -50,14 +50,6 @@ public String clientId() { return this.clientId; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedProperties.java index 273648d17bc05..5c1ee210a315d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -47,14 +47,6 @@ public UserAssignedProperties withResourceId(String resourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidateAddress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidateAddress.java index 11822fbcacf1c..2768287ad85a9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidateAddress.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidateAddress.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -142,31 +141,6 @@ public ValidateAddress withModel(ModelName model) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (shippingAddress() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property shippingAddress in model ValidateAddress")); - } else { - shippingAddress().validate(); - } - if (deviceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property deviceType in model ValidateAddress")); - } - if (transportPreferences() != null) { - transportPreferences().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ValidateAddress.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputDiscriminator.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputDiscriminator.java index 19fb10eafed69..c3de2e5cc04dd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputDiscriminator.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputDiscriminator.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,32 +9,32 @@ */ public enum ValidationInputDiscriminator { /** - * Enum value ValidateAddress. + * Identify request and response of address validation. */ VALIDATE_ADDRESS("ValidateAddress"), /** - * Enum value ValidateSubscriptionIsAllowedToCreateJob. + * Identify request and response for validation of subscription permission to create job. */ VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB("ValidateSubscriptionIsAllowedToCreateJob"), /** - * Enum value ValidatePreferences. + * Identify request and response of preference validation. */ VALIDATE_PREFERENCES("ValidatePreferences"), /** - * Enum value ValidateCreateOrderLimit. + * Identify request and response of create order limit for subscription validation. */ VALIDATE_CREATE_ORDER_LIMIT("ValidateCreateOrderLimit"), /** - * Enum value ValidateSkuAvailability. + * Identify request and response of active job limit for sku availability. */ VALIDATE_SKU_AVAILABILITY("ValidateSkuAvailability"), /** - * Enum value ValidateDataTransferDetails. + * Identify request and response of data transfer details validation. */ VALIDATE_DATA_TRANSFER_DETAILS("ValidateDataTransferDetails"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputRequest.java index acc67a5e6458f..ecaa7b039ade7 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -36,14 +36,6 @@ public ValidationInputDiscriminator validationType() { return this.validationType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -79,9 +71,7 @@ public static ValidationInputRequest fromJson(JsonReader jsonReader) throws IOEx } } // Use the discriminator value to determine which subtype should be deserialized. - if ("ValidateAddress".equals(discriminatorValue)) { - return ValidateAddress.fromJson(readerToUse.reset()); - } else if ("ValidateCreateOrderLimit".equals(discriminatorValue)) { + if ("ValidateCreateOrderLimit".equals(discriminatorValue)) { return CreateOrderLimitForSubscriptionValidationRequest.fromJson(readerToUse.reset()); } else if ("ValidateDataTransferDetails".equals(discriminatorValue)) { return DataTransferDetailsValidationRequest.fromJson(readerToUse.reset()); @@ -91,6 +81,8 @@ public static ValidationInputRequest fromJson(JsonReader jsonReader) throws IOEx return SkuAvailabilityValidationRequest.fromJson(readerToUse.reset()); } else if ("ValidateSubscriptionIsAllowedToCreateJob".equals(discriminatorValue)) { return SubscriptionIsAllowedToCreateJobValidationRequest.fromJson(readerToUse.reset()); + } else if ("ValidateAddress".equals(discriminatorValue)) { + return ValidateAddress.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputResponse.java index e57da02496824..a01729ea4fe41 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -29,7 +29,7 @@ public class ValidationInputResponse implements JsonSerializable e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ValidationRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationResponse.java index 9d326a0787b64..9932933ed78fd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationStatus.java index eb7c8cefbfdd1..72ac4f003eab9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.models; @@ -9,17 +9,17 @@ */ public enum ValidationStatus { /** - * Enum value Valid. + * Validation is successful. */ VALID("Valid"), /** - * Enum value Invalid. + * Validation is not successful. */ INVALID("Invalid"), /** - * Enum value Skipped. + * Validation is skipped. */ SKIPPED("Skipped"); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/package-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/package-info.java index fed97edabdf78..f3f6b8d29d580 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/package-info.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for DataBoxManagementClient. - * null. + * Package containing the data models for DataBox. */ package com.azure.resourcemanager.databox.models; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/package-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/package-info.java index 920c93dc333f2..af1d625ef1301 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/package-info.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for DataBoxManagementClient. - * null. + * Package containing the classes for DataBox. */ package com.azure.resourcemanager.databox; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/module-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/module-info.java index 505d2efbfb573..d16976efa59c1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/module-info.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.databox { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.databox.fluent.models to com.azure.core; opens com.azure.resourcemanager.databox.models to com.azure.core; + opens com.azure.resourcemanager.databox.implementation.models to com.azure.core; } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/resources/META-INF/azure-resourcemanager-databox_metadata.json b/sdk/databox/azure-resourcemanager-databox/src/main/resources/META-INF/azure-resourcemanager-databox_metadata.json new file mode 100644 index 0000000000000..8876900117fb2 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/resources/META-INF/azure-resourcemanager-databox_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.DataBox":"2025-07-01"},"crossLanguagePackageId":"Microsoft.DataBox","crossLanguageVersion":"f8355a11ffc0","crossLanguageDefinitions":{"com.azure.resourcemanager.databox.fluent.DataBoxManagementClient":"Microsoft.DataBox","com.azure.resourcemanager.databox.fluent.JobsClient":"Microsoft.DataBox","com.azure.resourcemanager.databox.fluent.JobsClient.beginCreate":"Microsoft.DataBox.JobResources.create","com.azure.resourcemanager.databox.fluent.JobsClient.beginDelete":"Microsoft.DataBox.JobResources.delete","com.azure.resourcemanager.databox.fluent.JobsClient.beginUpdate":"Microsoft.DataBox.JobResources.update","com.azure.resourcemanager.databox.fluent.JobsClient.bookShipmentPickUp":"Microsoft.DataBox.JobResources.bookShipmentPickUp","com.azure.resourcemanager.databox.fluent.JobsClient.bookShipmentPickUpWithResponse":"Microsoft.DataBox.JobResources.bookShipmentPickUp","com.azure.resourcemanager.databox.fluent.JobsClient.cancel":"Microsoft.DataBox.JobResources.cancel","com.azure.resourcemanager.databox.fluent.JobsClient.cancelWithResponse":"Microsoft.DataBox.JobResources.cancel","com.azure.resourcemanager.databox.fluent.JobsClient.create":"Microsoft.DataBox.JobResources.create","com.azure.resourcemanager.databox.fluent.JobsClient.delete":"Microsoft.DataBox.JobResources.delete","com.azure.resourcemanager.databox.fluent.JobsClient.getByResourceGroup":"Microsoft.DataBox.JobResources.get","com.azure.resourcemanager.databox.fluent.JobsClient.getByResourceGroupWithResponse":"Microsoft.DataBox.JobResources.get","com.azure.resourcemanager.databox.fluent.JobsClient.list":"Microsoft.DataBox.JobResources.list","com.azure.resourcemanager.databox.fluent.JobsClient.listByResourceGroup":"Microsoft.DataBox.JobResources.listByResourceGroup","com.azure.resourcemanager.databox.fluent.JobsClient.listCredentials":"Microsoft.DataBox.JobResources.listCredentials","com.azure.resourcemanager.databox.fluent.JobsClient.markDevicesShipped":"Microsoft.DataBox.JobResources.markDevicesShipped","com.azure.resourcemanager.databox.fluent.JobsClient.markDevicesShippedWithResponse":"Microsoft.DataBox.JobResources.markDevicesShipped","com.azure.resourcemanager.databox.fluent.JobsClient.update":"Microsoft.DataBox.JobResources.update","com.azure.resourcemanager.databox.fluent.OperationsClient":"Microsoft.DataBox.Operations","com.azure.resourcemanager.databox.fluent.OperationsClient.list":"Microsoft.DataBox.Operations.list","com.azure.resourcemanager.databox.fluent.ResourceProvidersClient":"Microsoft.DataBox","com.azure.resourcemanager.databox.fluent.ResourceProvidersClient.mitigate":"Microsoft.DataBox.mitigate","com.azure.resourcemanager.databox.fluent.ResourceProvidersClient.mitigateWithResponse":"Microsoft.DataBox.mitigate","com.azure.resourcemanager.databox.fluent.ServicesClient":"Microsoft.DataBox","com.azure.resourcemanager.databox.fluent.ServicesClient.listAvailableSkusByResourceGroup":"Microsoft.DataBox.ServiceOperationGroup.listAvailableSkusByResourceGroup","com.azure.resourcemanager.databox.fluent.ServicesClient.regionConfiguration":"Microsoft.DataBox.ServiceOperationGroup.regionConfiguration","com.azure.resourcemanager.databox.fluent.ServicesClient.regionConfigurationByResourceGroup":"Microsoft.DataBox.ServiceOperationGroup.regionConfigurationByResourceGroup","com.azure.resourcemanager.databox.fluent.ServicesClient.regionConfigurationByResourceGroupWithResponse":"Microsoft.DataBox.ServiceOperationGroup.regionConfigurationByResourceGroup","com.azure.resourcemanager.databox.fluent.ServicesClient.regionConfigurationWithResponse":"Microsoft.DataBox.ServiceOperationGroup.regionConfiguration","com.azure.resourcemanager.databox.fluent.ServicesClient.validateAddress":"Microsoft.DataBox.ServiceOperationGroup.validateAddress","com.azure.resourcemanager.databox.fluent.ServicesClient.validateAddressWithResponse":"Microsoft.DataBox.ServiceOperationGroup.validateAddress","com.azure.resourcemanager.databox.fluent.ServicesClient.validateInputs":"Microsoft.DataBox.ServiceOperationGroup.validateInputs","com.azure.resourcemanager.databox.fluent.ServicesClient.validateInputsByResourceGroup":"Microsoft.DataBox.ServiceOperationGroup.validateInputsByResourceGroup","com.azure.resourcemanager.databox.fluent.ServicesClient.validateInputsByResourceGroupWithResponse":"Microsoft.DataBox.ServiceOperationGroup.validateInputsByResourceGroup","com.azure.resourcemanager.databox.fluent.ServicesClient.validateInputsWithResponse":"Microsoft.DataBox.ServiceOperationGroup.validateInputs","com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner":"Microsoft.DataBox.AddressValidationOutput","com.azure.resourcemanager.databox.fluent.models.JobProperties":"Microsoft.DataBox.JobProperties","com.azure.resourcemanager.databox.fluent.models.JobResourceInner":"Microsoft.DataBox.JobResource","com.azure.resourcemanager.databox.fluent.models.OperationInner":"Microsoft.DataBox.Operation","com.azure.resourcemanager.databox.fluent.models.OperationProperties":"Microsoft.DataBox.OperationProperties","com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner":"Microsoft.DataBox.RegionConfigurationResponse","com.azure.resourcemanager.databox.fluent.models.ShipmentPickUpResponseInner":"Microsoft.DataBox.ShipmentPickUpResponse","com.azure.resourcemanager.databox.fluent.models.SkuInformationInner":"Microsoft.DataBox.SkuInformation","com.azure.resourcemanager.databox.fluent.models.SkuProperties":"Microsoft.DataBox.SkuProperties","com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner":"Microsoft.DataBox.UnencryptedCredentials","com.azure.resourcemanager.databox.fluent.models.UpdateJobProperties":"Microsoft.DataBox.UpdateJobProperties","com.azure.resourcemanager.databox.fluent.models.ValidationResponseInner":"Microsoft.DataBox.ValidationResponse","com.azure.resourcemanager.databox.fluent.models.ValidationResponseProperties":"Microsoft.DataBox.ValidationResponseProperties","com.azure.resourcemanager.databox.implementation.DataBoxManagementClientBuilder":"Microsoft.DataBox","com.azure.resourcemanager.databox.implementation.models.AvailableSkusResult":"Microsoft.DataBox.AvailableSkusResult","com.azure.resourcemanager.databox.implementation.models.JobResourceList":"Microsoft.DataBox.JobResourceList","com.azure.resourcemanager.databox.implementation.models.OperationList":"Microsoft.DataBox.OperationList","com.azure.resourcemanager.databox.implementation.models.UnencryptedCredentialsList":"Microsoft.DataBox.UnencryptedCredentialsList","com.azure.resourcemanager.databox.models.AccessProtocol":"Microsoft.DataBox.AccessProtocol","com.azure.resourcemanager.databox.models.AccountCredentialDetails":"Microsoft.DataBox.AccountCredentialDetails","com.azure.resourcemanager.databox.models.AdditionalErrorInfo":"Microsoft.DataBox.AdditionalErrorInfo","com.azure.resourcemanager.databox.models.AddressType":"Microsoft.DataBox.AddressType","com.azure.resourcemanager.databox.models.AddressValidationProperties":"Microsoft.DataBox.AddressValidationProperties","com.azure.resourcemanager.databox.models.AddressValidationStatus":"Microsoft.DataBox.AddressValidationStatus","com.azure.resourcemanager.databox.models.ApplianceNetworkConfiguration":"Microsoft.DataBox.ApplianceNetworkConfiguration","com.azure.resourcemanager.databox.models.AvailableSkuRequest":"Microsoft.DataBox.AvailableSkuRequest","com.azure.resourcemanager.databox.models.AzureFileFilterDetails":"Microsoft.DataBox.AzureFileFilterDetails","com.azure.resourcemanager.databox.models.BlobFilterDetails":"Microsoft.DataBox.BlobFilterDetails","com.azure.resourcemanager.databox.models.CancellationReason":"Microsoft.DataBox.CancellationReason","com.azure.resourcemanager.databox.models.ClassDiscriminator":"Microsoft.DataBox.ClassDiscriminator","com.azure.resourcemanager.databox.models.CloudError":"Microsoft.DataBox.CloudError","com.azure.resourcemanager.databox.models.ContactDetails":"Microsoft.DataBox.ContactDetails","com.azure.resourcemanager.databox.models.ContactInfo":"Microsoft.DataBox.ContactInfo","com.azure.resourcemanager.databox.models.CopyLogDetails":"Microsoft.DataBox.CopyLogDetails","com.azure.resourcemanager.databox.models.CopyProgress":"Microsoft.DataBox.CopyProgress","com.azure.resourcemanager.databox.models.CopyStatus":"Microsoft.DataBox.CopyStatus","com.azure.resourcemanager.databox.models.CreateJobValidations":"Microsoft.DataBox.CreateJobValidations","com.azure.resourcemanager.databox.models.CreateOrderLimitForSubscriptionValidationRequest":"Microsoft.DataBox.CreateOrderLimitForSubscriptionValidationRequest","com.azure.resourcemanager.databox.models.CreateOrderLimitForSubscriptionValidationResponseProperties":"Microsoft.DataBox.CreateOrderLimitForSubscriptionValidationResponseProperties","com.azure.resourcemanager.databox.models.CustomerDiskJobSecrets":"Microsoft.DataBox.CustomerDiskJobSecrets","com.azure.resourcemanager.databox.models.CustomerResolutionCode":"Microsoft.DataBox.CustomerResolutionCode","com.azure.resourcemanager.databox.models.DataAccountDetails":"Microsoft.DataBox.DataAccountDetails","com.azure.resourcemanager.databox.models.DataAccountType":"Microsoft.DataBox.DataAccountType","com.azure.resourcemanager.databox.models.DataBoxAccountCopyLogDetails":"Microsoft.DataBox.DataBoxAccountCopyLogDetails","com.azure.resourcemanager.databox.models.DataBoxCustomerDiskCopyLogDetails":"Microsoft.DataBox.DataBoxCustomerDiskCopyLogDetails","com.azure.resourcemanager.databox.models.DataBoxCustomerDiskCopyProgress":"Microsoft.DataBox.DataBoxCustomerDiskCopyProgress","com.azure.resourcemanager.databox.models.DataBoxCustomerDiskJobDetails":"Microsoft.DataBox.DataBoxCustomerDiskJobDetails","com.azure.resourcemanager.databox.models.DataBoxDiskCopyLogDetails":"Microsoft.DataBox.DataBoxDiskCopyLogDetails","com.azure.resourcemanager.databox.models.DataBoxDiskCopyProgress":"Microsoft.DataBox.DataBoxDiskCopyProgress","com.azure.resourcemanager.databox.models.DataBoxDiskGranularCopyLogDetails":"Microsoft.DataBox.DataBoxDiskGranularCopyLogDetails","com.azure.resourcemanager.databox.models.DataBoxDiskGranularCopyProgress":"Microsoft.DataBox.DataBoxDiskGranularCopyProgress","com.azure.resourcemanager.databox.models.DataBoxDiskJobDetails":"Microsoft.DataBox.DataBoxDiskJobDetails","com.azure.resourcemanager.databox.models.DataBoxDiskJobSecrets":"Microsoft.DataBox.DataBoxDiskJobSecrets","com.azure.resourcemanager.databox.models.DataBoxHeavyAccountCopyLogDetails":"Microsoft.DataBox.DataBoxHeavyAccountCopyLogDetails","com.azure.resourcemanager.databox.models.DataBoxHeavyJobDetails":"Microsoft.DataBox.DataBoxHeavyJobDetails","com.azure.resourcemanager.databox.models.DataBoxHeavyJobSecrets":"Microsoft.DataBox.DataBoxHeavyJobSecrets","com.azure.resourcemanager.databox.models.DataBoxHeavySecret":"Microsoft.DataBox.DataBoxHeavySecret","com.azure.resourcemanager.databox.models.DataBoxJobDetails":"Microsoft.DataBox.DataBoxJobDetails","com.azure.resourcemanager.databox.models.DataBoxScheduleAvailabilityRequest":"Microsoft.DataBox.DataBoxScheduleAvailabilityRequest","com.azure.resourcemanager.databox.models.DataBoxSecret":"Microsoft.DataBox.DataBoxSecret","com.azure.resourcemanager.databox.models.DataCenterCode":"Microsoft.DataBox.DataCenterCode","com.azure.resourcemanager.databox.models.DataExportDetails":"Microsoft.DataBox.DataExportDetails","com.azure.resourcemanager.databox.models.DataImportDetails":"Microsoft.DataBox.DataImportDetails","com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap":"Microsoft.DataBox.DataLocationToServiceLocationMap","com.azure.resourcemanager.databox.models.DataTransferDetailsValidationRequest":"Microsoft.DataBox.DataTransferDetailsValidationRequest","com.azure.resourcemanager.databox.models.DataTransferDetailsValidationResponseProperties":"Microsoft.DataBox.DataTransferDetailsValidationResponseProperties","com.azure.resourcemanager.databox.models.DataboxJobSecrets":"Microsoft.DataBox.DataboxJobSecrets","com.azure.resourcemanager.databox.models.DatacenterAddressInstructionResponse":"Microsoft.DataBox.DatacenterAddressInstructionResponse","com.azure.resourcemanager.databox.models.DatacenterAddressLocationResponse":"Microsoft.DataBox.DatacenterAddressLocationResponse","com.azure.resourcemanager.databox.models.DatacenterAddressRequest":"Microsoft.DataBox.DatacenterAddressRequest","com.azure.resourcemanager.databox.models.DatacenterAddressResponse":"Microsoft.DataBox.DatacenterAddressResponse","com.azure.resourcemanager.databox.models.DatacenterAddressType":"Microsoft.DataBox.DatacenterAddressType","com.azure.resourcemanager.databox.models.DcAccessSecurityCode":"Microsoft.DataBox.DcAccessSecurityCode","com.azure.resourcemanager.databox.models.DelayNotificationStatus":"Microsoft.DataBox.DelayNotificationStatus","com.azure.resourcemanager.databox.models.DeviceCapabilityDetails":"Microsoft.DataBox.DeviceCapabilityDetails","com.azure.resourcemanager.databox.models.DeviceCapabilityRequest":"Microsoft.DataBox.DeviceCapabilityRequest","com.azure.resourcemanager.databox.models.DeviceCapabilityResponse":"Microsoft.DataBox.DeviceCapabilityResponse","com.azure.resourcemanager.databox.models.DeviceErasureDetails":"Microsoft.DataBox.DeviceErasureDetails","com.azure.resourcemanager.databox.models.DiskScheduleAvailabilityRequest":"Microsoft.DataBox.DiskScheduleAvailabilityRequest","com.azure.resourcemanager.databox.models.DiskSecret":"Microsoft.DataBox.DiskSecret","com.azure.resourcemanager.databox.models.DoubleEncryption":"Microsoft.DataBox.DoubleEncryption","com.azure.resourcemanager.databox.models.EncryptionPreferences":"Microsoft.DataBox.EncryptionPreferences","com.azure.resourcemanager.databox.models.ExportDiskDetails":"Microsoft.DataBox.ExportDiskDetails","com.azure.resourcemanager.databox.models.FilterFileDetails":"Microsoft.DataBox.FilterFileDetails","com.azure.resourcemanager.databox.models.FilterFileType":"Microsoft.DataBox.FilterFileType","com.azure.resourcemanager.databox.models.GranularCopyLogDetails":"Microsoft.DataBox.GranularCopyLogDetails","com.azure.resourcemanager.databox.models.GranularCopyProgress":"Microsoft.DataBox.GranularCopyProgress","com.azure.resourcemanager.databox.models.HardwareEncryption":"Microsoft.DataBox.HardwareEncryption","com.azure.resourcemanager.databox.models.HeavyScheduleAvailabilityRequest":"Microsoft.DataBox.HeavyScheduleAvailabilityRequest","com.azure.resourcemanager.databox.models.IdentityProperties":"Microsoft.DataBox.IdentityProperties","com.azure.resourcemanager.databox.models.ImportDiskDetails":"Microsoft.DataBox.ImportDiskDetails","com.azure.resourcemanager.databox.models.JobDelayDetails":"Microsoft.DataBox.JobDelayDetails","com.azure.resourcemanager.databox.models.JobDeliveryInfo":"Microsoft.DataBox.JobDeliveryInfo","com.azure.resourcemanager.databox.models.JobDeliveryType":"Microsoft.DataBox.JobDeliveryType","com.azure.resourcemanager.databox.models.JobDetails":"Microsoft.DataBox.JobDetails","com.azure.resourcemanager.databox.models.JobResourceUpdateParameter":"Microsoft.DataBox.JobResourceUpdateParameter","com.azure.resourcemanager.databox.models.JobSecrets":"Microsoft.DataBox.JobSecrets","com.azure.resourcemanager.databox.models.JobStages":"Microsoft.DataBox.JobStages","com.azure.resourcemanager.databox.models.KekType":"Microsoft.DataBox.KekType","com.azure.resourcemanager.databox.models.KeyEncryptionKey":"Microsoft.DataBox.KeyEncryptionKey","com.azure.resourcemanager.databox.models.LastMitigationActionOnJob":"Microsoft.DataBox.LastMitigationActionOnJob","com.azure.resourcemanager.databox.models.LogCollectionLevel":"Microsoft.DataBox.LogCollectionLevel","com.azure.resourcemanager.databox.models.ManagedDiskDetails":"Microsoft.DataBox.ManagedDiskDetails","com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest":"Microsoft.DataBox.MarkDevicesShippedRequest","com.azure.resourcemanager.databox.models.MitigateJobRequest":"Microsoft.DataBox.MitigateJobRequest","com.azure.resourcemanager.databox.models.ModelName":"Microsoft.DataBox.ModelName","com.azure.resourcemanager.databox.models.NotificationPreference":"Microsoft.DataBox.NotificationPreference","com.azure.resourcemanager.databox.models.NotificationStageName":"Microsoft.DataBox.NotificationStageName","com.azure.resourcemanager.databox.models.OperationDisplay":"Microsoft.DataBox.OperationDisplay","com.azure.resourcemanager.databox.models.OverallValidationStatus":"Microsoft.DataBox.OverallValidationStatus","com.azure.resourcemanager.databox.models.PackageCarrierDetails":"Microsoft.DataBox.PackageCarrierDetails","com.azure.resourcemanager.databox.models.PackageCarrierInfo":"Microsoft.DataBox.PackageCarrierInfo","com.azure.resourcemanager.databox.models.PackageShippingDetails":"Microsoft.DataBox.PackageShippingDetails","com.azure.resourcemanager.databox.models.PortalDelayErrorCode":"Microsoft.DataBox.PortalDelayErrorCode","com.azure.resourcemanager.databox.models.Preferences":"Microsoft.DataBox.Preferences","com.azure.resourcemanager.databox.models.PreferencesValidationRequest":"Microsoft.DataBox.PreferencesValidationRequest","com.azure.resourcemanager.databox.models.PreferencesValidationResponseProperties":"Microsoft.DataBox.PreferencesValidationResponseProperties","com.azure.resourcemanager.databox.models.RegionConfigurationRequest":"Microsoft.DataBox.RegionConfigurationRequest","com.azure.resourcemanager.databox.models.ResourceIdentity":"Microsoft.DataBox.ResourceIdentity","com.azure.resourcemanager.databox.models.ReverseShippingDetails":"Microsoft.DataBox.ReverseShippingDetails","com.azure.resourcemanager.databox.models.ReverseShippingDetailsEditStatus":"Microsoft.DataBox.ReverseShippingDetailsEditStatus","com.azure.resourcemanager.databox.models.ReverseTransportPreferenceEditStatus":"Microsoft.DataBox.ReverseTransportPreferenceEditStatus","com.azure.resourcemanager.databox.models.ScheduleAvailabilityRequest":"Microsoft.DataBox.ScheduleAvailabilityRequest","com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse":"Microsoft.DataBox.ScheduleAvailabilityResponse","com.azure.resourcemanager.databox.models.ShareCredentialDetails":"Microsoft.DataBox.ShareCredentialDetails","com.azure.resourcemanager.databox.models.ShareDestinationFormatType":"Microsoft.DataBox.ShareDestinationFormatType","com.azure.resourcemanager.databox.models.ShipmentPickUpRequest":"Microsoft.DataBox.ShipmentPickUpRequest","com.azure.resourcemanager.databox.models.ShippingAddress":"Microsoft.DataBox.ShippingAddress","com.azure.resourcemanager.databox.models.Sku":"Microsoft.DataBox.Sku","com.azure.resourcemanager.databox.models.SkuAvailabilityValidationRequest":"Microsoft.DataBox.SkuAvailabilityValidationRequest","com.azure.resourcemanager.databox.models.SkuAvailabilityValidationResponseProperties":"Microsoft.DataBox.SkuAvailabilityValidationResponseProperties","com.azure.resourcemanager.databox.models.SkuCapacity":"Microsoft.DataBox.SkuCapacity","com.azure.resourcemanager.databox.models.SkuCost":"Microsoft.DataBox.SkuCost","com.azure.resourcemanager.databox.models.SkuDisabledReason":"Microsoft.DataBox.SkuDisabledReason","com.azure.resourcemanager.databox.models.SkuName":"Microsoft.DataBox.SkuName","com.azure.resourcemanager.databox.models.StageName":"Microsoft.DataBox.StageName","com.azure.resourcemanager.databox.models.StageStatus":"Microsoft.DataBox.StageStatus","com.azure.resourcemanager.databox.models.StorageAccountDetails":"Microsoft.DataBox.StorageAccountDetails","com.azure.resourcemanager.databox.models.SubscriptionIsAllowedToCreateJobValidationRequest":"Microsoft.DataBox.SubscriptionIsAllowedToCreateJobValidationRequest","com.azure.resourcemanager.databox.models.SubscriptionIsAllowedToCreateJobValidationResponseProperties":"Microsoft.DataBox.SubscriptionIsAllowedToCreateJobValidationResponseProperties","com.azure.resourcemanager.databox.models.TransferAllDetails":"Microsoft.DataBox.TransferAllDetails","com.azure.resourcemanager.databox.models.TransferConfiguration":"Microsoft.DataBox.TransferConfiguration","com.azure.resourcemanager.databox.models.TransferConfigurationTransferAllDetails":"Microsoft.DataBox.TransferConfigurationTransferAllDetails","com.azure.resourcemanager.databox.models.TransferConfigurationTransferFilterDetails":"Microsoft.DataBox.TransferConfigurationTransferFilterDetails","com.azure.resourcemanager.databox.models.TransferConfigurationType":"Microsoft.DataBox.TransferConfigurationType","com.azure.resourcemanager.databox.models.TransferFilterDetails":"Microsoft.DataBox.TransferFilterDetails","com.azure.resourcemanager.databox.models.TransferType":"Microsoft.DataBox.TransferType","com.azure.resourcemanager.databox.models.TransportAvailabilityDetails":"Microsoft.DataBox.TransportAvailabilityDetails","com.azure.resourcemanager.databox.models.TransportAvailabilityRequest":"Microsoft.DataBox.TransportAvailabilityRequest","com.azure.resourcemanager.databox.models.TransportAvailabilityResponse":"Microsoft.DataBox.TransportAvailabilityResponse","com.azure.resourcemanager.databox.models.TransportPreferences":"Microsoft.DataBox.TransportPreferences","com.azure.resourcemanager.databox.models.TransportShipmentTypes":"Microsoft.DataBox.TransportShipmentTypes","com.azure.resourcemanager.databox.models.UpdateJobDetails":"Microsoft.DataBox.UpdateJobDetails","com.azure.resourcemanager.databox.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.databox.models.UserAssignedProperties":"Microsoft.DataBox.UserAssignedProperties","com.azure.resourcemanager.databox.models.ValidateAddress":"Microsoft.DataBox.ValidateAddress","com.azure.resourcemanager.databox.models.ValidationInputDiscriminator":"Microsoft.DataBox.ValidationInputDiscriminator","com.azure.resourcemanager.databox.models.ValidationInputRequest":"Microsoft.DataBox.ValidationInputRequest","com.azure.resourcemanager.databox.models.ValidationInputResponse":"Microsoft.DataBox.ValidationInputResponse","com.azure.resourcemanager.databox.models.ValidationRequest":"Microsoft.DataBox.ValidationRequest","com.azure.resourcemanager.databox.models.ValidationStatus":"Microsoft.DataBox.ValidationStatus"},"generatedFiles":["src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java","src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java","src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java","src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java","src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java","src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java","src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/ShipmentPickUpResponseImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/UnencryptedCredentialsImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/ValidationResponseImpl.java","src/main/java/com/azure/resourcemanager/databox/implementation/models/AvailableSkusResult.java","src/main/java/com/azure/resourcemanager/databox/implementation/models/JobResourceList.java","src/main/java/com/azure/resourcemanager/databox/implementation/models/OperationList.java","src/main/java/com/azure/resourcemanager/databox/implementation/models/UnencryptedCredentialsList.java","src/main/java/com/azure/resourcemanager/databox/implementation/package-info.java","src/main/java/com/azure/resourcemanager/databox/models/AccessProtocol.java","src/main/java/com/azure/resourcemanager/databox/models/AccountCredentialDetails.java","src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java","src/main/java/com/azure/resourcemanager/databox/models/AddressType.java","src/main/java/com/azure/resourcemanager/databox/models/AddressValidationOutput.java","src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java","src/main/java/com/azure/resourcemanager/databox/models/AddressValidationStatus.java","src/main/java/com/azure/resourcemanager/databox/models/ApplianceNetworkConfiguration.java","src/main/java/com/azure/resourcemanager/databox/models/AvailableSkuRequest.java","src/main/java/com/azure/resourcemanager/databox/models/AzureFileFilterDetails.java","src/main/java/com/azure/resourcemanager/databox/models/BlobFilterDetails.java","src/main/java/com/azure/resourcemanager/databox/models/CancellationReason.java","src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java","src/main/java/com/azure/resourcemanager/databox/models/CloudError.java","src/main/java/com/azure/resourcemanager/databox/models/ContactDetails.java","src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java","src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java","src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java","src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java","src/main/java/com/azure/resourcemanager/databox/models/CreateJobValidations.java","src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationRequest.java","src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationResponseProperties.java","src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java","src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java","src/main/java/com/azure/resourcemanager/databox/models/DataAccountDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataAccountType.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxAccountCopyLogDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyLogDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyProgress.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobSecrets.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyAccountCopyLogDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobSecrets.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavySecret.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxScheduleAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/databox/models/DataBoxSecret.java","src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java","src/main/java/com/azure/resourcemanager/databox/models/DataExportDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DataLocationToServiceLocationMap.java","src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationRequest.java","src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationResponseProperties.java","src/main/java/com/azure/resourcemanager/databox/models/DataboxJobSecrets.java","src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java","src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java","src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java","src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java","src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressType.java","src/main/java/com/azure/resourcemanager/databox/models/DcAccessSecurityCode.java","src/main/java/com/azure/resourcemanager/databox/models/DelayNotificationStatus.java","src/main/java/com/azure/resourcemanager/databox/models/DeviceCapabilityDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DeviceCapabilityRequest.java","src/main/java/com/azure/resourcemanager/databox/models/DeviceCapabilityResponse.java","src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java","src/main/java/com/azure/resourcemanager/databox/models/DiskScheduleAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/databox/models/DiskSecret.java","src/main/java/com/azure/resourcemanager/databox/models/DoubleEncryption.java","src/main/java/com/azure/resourcemanager/databox/models/EncryptionPreferences.java","src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java","src/main/java/com/azure/resourcemanager/databox/models/FilterFileDetails.java","src/main/java/com/azure/resourcemanager/databox/models/FilterFileType.java","src/main/java/com/azure/resourcemanager/databox/models/GranularCopyLogDetails.java","src/main/java/com/azure/resourcemanager/databox/models/GranularCopyProgress.java","src/main/java/com/azure/resourcemanager/databox/models/HardwareEncryption.java","src/main/java/com/azure/resourcemanager/databox/models/HeavyScheduleAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/databox/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java","src/main/java/com/azure/resourcemanager/databox/models/JobDelayDetails.java","src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryInfo.java","src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryType.java","src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java","src/main/java/com/azure/resourcemanager/databox/models/JobResource.java","src/main/java/com/azure/resourcemanager/databox/models/JobResourceUpdateParameter.java","src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java","src/main/java/com/azure/resourcemanager/databox/models/JobStages.java","src/main/java/com/azure/resourcemanager/databox/models/Jobs.java","src/main/java/com/azure/resourcemanager/databox/models/KekType.java","src/main/java/com/azure/resourcemanager/databox/models/KeyEncryptionKey.java","src/main/java/com/azure/resourcemanager/databox/models/LastMitigationActionOnJob.java","src/main/java/com/azure/resourcemanager/databox/models/LogCollectionLevel.java","src/main/java/com/azure/resourcemanager/databox/models/ManagedDiskDetails.java","src/main/java/com/azure/resourcemanager/databox/models/MarkDevicesShippedRequest.java","src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java","src/main/java/com/azure/resourcemanager/databox/models/ModelName.java","src/main/java/com/azure/resourcemanager/databox/models/NotificationPreference.java","src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java","src/main/java/com/azure/resourcemanager/databox/models/Operation.java","src/main/java/com/azure/resourcemanager/databox/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/databox/models/Operations.java","src/main/java/com/azure/resourcemanager/databox/models/OverallValidationStatus.java","src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java","src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java","src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java","src/main/java/com/azure/resourcemanager/databox/models/PortalDelayErrorCode.java","src/main/java/com/azure/resourcemanager/databox/models/Preferences.java","src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationRequest.java","src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationResponseProperties.java","src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java","src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java","src/main/java/com/azure/resourcemanager/databox/models/ResourceIdentity.java","src/main/java/com/azure/resourcemanager/databox/models/ResourceProviders.java","src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java","src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java","src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java","src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/databox/models/Services.java","src/main/java/com/azure/resourcemanager/databox/models/ShareCredentialDetails.java","src/main/java/com/azure/resourcemanager/databox/models/ShareDestinationFormatType.java","src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpRequest.java","src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpResponse.java","src/main/java/com/azure/resourcemanager/databox/models/ShippingAddress.java","src/main/java/com/azure/resourcemanager/databox/models/Sku.java","src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationRequest.java","src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationResponseProperties.java","src/main/java/com/azure/resourcemanager/databox/models/SkuCapacity.java","src/main/java/com/azure/resourcemanager/databox/models/SkuCost.java","src/main/java/com/azure/resourcemanager/databox/models/SkuDisabledReason.java","src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java","src/main/java/com/azure/resourcemanager/databox/models/SkuName.java","src/main/java/com/azure/resourcemanager/databox/models/StageName.java","src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java","src/main/java/com/azure/resourcemanager/databox/models/StorageAccountDetails.java","src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationRequest.java","src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java","src/main/java/com/azure/resourcemanager/databox/models/TransferAllDetails.java","src/main/java/com/azure/resourcemanager/databox/models/TransferConfiguration.java","src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferAllDetails.java","src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferFilterDetails.java","src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationType.java","src/main/java/com/azure/resourcemanager/databox/models/TransferFilterDetails.java","src/main/java/com/azure/resourcemanager/databox/models/TransferType.java","src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityDetails.java","src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java","src/main/java/com/azure/resourcemanager/databox/models/TransportShipmentTypes.java","src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentials.java","src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java","src/main/java/com/azure/resourcemanager/databox/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/databox/models/UserAssignedProperties.java","src/main/java/com/azure/resourcemanager/databox/models/ValidateAddress.java","src/main/java/com/azure/resourcemanager/databox/models/ValidationInputDiscriminator.java","src/main/java/com/azure/resourcemanager/databox/models/ValidationInputRequest.java","src/main/java/com/azure/resourcemanager/databox/models/ValidationInputResponse.java","src/main/java/com/azure/resourcemanager/databox/models/ValidationRequest.java","src/main/java/com/azure/resourcemanager/databox/models/ValidationResponse.java","src/main/java/com/azure/resourcemanager/databox/models/ValidationStatus.java","src/main/java/com/azure/resourcemanager/databox/models/package-info.java","src/main/java/com/azure/resourcemanager/databox/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java index 24cb9683b0ad3..c291676566dd5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,8 +12,7 @@ */ public final class JobsBookShipmentPickUpSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/BookShipmentPickupPost.json + * x-ms-original-file: 2025-07-01/BookShipmentPickupPost.json */ /** * Sample code: BookShipmentPickupPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java index cb57818efe7f4..e5542e33871d4 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,8 +11,7 @@ */ public final class JobsCancelSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCancelPost.json + * x-ms-original-file: 2025-07-01/JobsCancelPost.json */ /** * Sample code: JobsCancelPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java index a1c49419564cf..62aa000be1dff 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -34,8 +34,7 @@ */ public final class JobsCreateSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDevicePassword.json + * x-ms-original-file: 2025-07-01/JobsCreateDevicePassword.json */ /** * Sample code: JobsCreateDevicePassword. @@ -71,8 +70,7 @@ public static void jobsCreateDevicePassword(com.azure.resourcemanager.databox.Da } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreate.json + * x-ms-original-file: 2025-07-01/JobsCreate.json */ /** * Sample code: JobsCreate. @@ -106,9 +104,7 @@ public static void jobsCreate(com.azure.resourcemanager.databox.DataBoxManager m } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDoubleEncryption. - * json + * x-ms-original-file: 2025-07-01/JobsCreateDoubleEncryption.json */ /** * Sample code: JobsCreateDoubleEncryption. @@ -144,8 +140,7 @@ public static void jobsCreateDoubleEncryption(com.azure.resourcemanager.databox. } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ - * JobsCreateWithUserAssignedIdentity.json + * x-ms-original-file: 2025-07-01/JobsCreateWithUserAssignedIdentity.json */ /** * Sample code: JobsCreateWithUserAssignedIdentity. @@ -183,8 +178,7 @@ public static void jobsCreateWithUserAssignedIdentity(com.azure.resourcemanager. } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateExport.json + * x-ms-original-file: 2025-07-01/JobsCreateExport.json */ /** * Sample code: JobsCreateExport. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java index 9a163b2ff222c..b25e1da29e5aa 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -9,8 +9,7 @@ */ public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsDelete.json + * x-ms-original-file: 2025-07-01/JobsDelete.json */ /** * Sample code: JobsDelete. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java index 4ab97df8615a2..280f3e9a3146f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -9,8 +9,7 @@ */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGet.json + * x-ms-original-file: 2025-07-01/JobsGet.json */ /** * Sample code: JobsGet. @@ -24,8 +23,7 @@ public static void jobsGet(com.azure.resourcemanager.databox.DataBoxManager mana } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCmk.json + * x-ms-original-file: 2025-07-01/JobsGetCmk.json */ /** * Sample code: JobsGetCmk. @@ -39,8 +37,7 @@ public static void jobsGetCmk(com.azure.resourcemanager.databox.DataBoxManager m } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetExport.json + * x-ms-original-file: 2025-07-01/JobsGetExport.json */ /** * Sample code: JobsGetExport. @@ -54,8 +51,7 @@ public static void jobsGetExport(com.azure.resourcemanager.databox.DataBoxManage } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCopyStuck.json + * x-ms-original-file: 2025-07-01/JobsGetCopyStuck.json */ /** * Sample code: JobsGetCopyStuck. @@ -69,8 +65,7 @@ public static void jobsGetCopyStuck(com.azure.resourcemanager.databox.DataBoxMan } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetWaitingForAction.json + * x-ms-original-file: 2025-07-01/JobsGetWaitingForAction.json */ /** * Sample code: JobsGetWaitingForAction. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java index f6d1f745039da..39c77495c4ab0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -9,8 +9,7 @@ */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListByResourceGroup.json + * x-ms-original-file: 2025-07-01/JobsListByResourceGroup.json */ /** * Sample code: JobsListByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java index 12497651dcd70..73fa75a034040 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -9,8 +9,7 @@ */ public final class JobsListCredentialsSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListCredentials.json + * x-ms-original-file: 2025-07-01/JobsListCredentials.json */ /** * Sample code: JobsListCredentials. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java index 9aa80325d149a..6da58f796580c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -9,8 +9,7 @@ */ public final class JobsListSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsList.json + * x-ms-original-file: 2025-07-01/JobsList.json */ /** * Sample code: JobsList. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedSamples.java index 09ae4421adf62..184aceb2f302f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,8 +12,7 @@ */ public final class JobsMarkDevicesShippedSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/MarkDevicesShipped.json + * x-ms-original-file: 2025-07-01/MarkDevicesShipped.json */ /** * Sample code: MarkDevicesShipped. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java index 5d11b4c2c91be..c3289515b5167 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -24,8 +24,7 @@ */ public final class JobsUpdateSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsPatchCmk.json + * x-ms-original-file: 2025-07-01/JobsPatchCmk.json */ /** * Sample code: JobsPatchCmk. @@ -47,8 +46,7 @@ public static void jobsPatchCmk(com.azure.resourcemanager.databox.DataBoxManager } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ - * JobsPatchSystemAssignedToUserAssigned.json + * x-ms-original-file: 2025-07-01/JobsPatchSystemAssignedToUserAssigned.json */ /** * Sample code: JobsPatchSystemAssignedToUserAssigned. @@ -77,8 +75,7 @@ public static void jobsPatchSystemAssignedToUserAssigned(com.azure.resourcemanag } /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsPatch.json + * x-ms-original-file: 2025-07-01/JobsPatch.json */ /** * Sample code: JobsPatch. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java index 64f5421f30421..ac7a9a85bc24b 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -9,8 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/OperationsGet.json + * x-ms-original-file: 2025-07-01/OperationsGet.json */ /** * Sample code: OperationsGet. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java index db11293cc2147..f887336654afc 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -14,8 +14,7 @@ */ public final class ResourceProviderMitigateSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobMitigate.json + * x-ms-original-file: 2025-07-01/JobMitigate.json */ /** * Sample code: Mitigate. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java index 30d9dab94fcf2..8c9031f50011a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,8 +12,7 @@ */ public final class ServiceListAvailableSkusByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/AvailableSkusPost.json + * x-ms-original-file: 2025-07-01/AvailableSkusPost.json */ /** * Sample code: AvailableSkusPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java index 9f957b7a8ca60..93528b1dfb743 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,8 +15,7 @@ */ public final class ServiceRegionConfigurationByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ - * RegionConfigurationByResourceGroup.json + * x-ms-original-file: 2025-07-01/RegionConfigurationByResourceGroup.json */ /** * Sample code: RegionConfigurationByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java index 69e64d2515b70..f4913e9bba77f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,8 +15,7 @@ */ public final class ServiceRegionConfigurationSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/RegionConfiguration.json + * x-ms-original-file: 2025-07-01/RegionConfiguration.json */ /** * Sample code: RegionConfiguration. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java index 646f5b6f565ab..b0df4ce35055f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,8 +15,7 @@ */ public final class ServiceValidateAddressSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateAddressPost.json + * x-ms-original-file: 2025-07-01/ValidateAddressPost.json */ /** * Sample code: ValidateAddressPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java index 8162527ce550e..8a1b3bd3e5a88 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -28,9 +28,7 @@ */ public final class ServiceValidateInputsByResourceGroupSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputsByResourceGroup - * .json + * x-ms-original-file: 2025-07-01/ValidateInputsByResourceGroup.json */ /** * Sample code: ValidateInputsByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java index 145618d42bc0d..07329ab7e3107 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -28,8 +28,7 @@ */ public final class ServiceValidateInputsSamples { /* - * x-ms-original-file: - * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputs.json + * x-ms-original-file: 2025-07-01/ValidateInputs.json */ /** * Sample code: ValidateInputs. diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AdditionalErrorInfoTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AdditionalErrorInfoTests.java index 059f2ad5b9f77..0725f3bc51e4a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AdditionalErrorInfoTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AdditionalErrorInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,15 +11,8 @@ public final class AdditionalErrorInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AdditionalErrorInfo model = BinaryData.fromString("{\"info\":\"datalxxwrljdouskc\",\"type\":\"kocrcjdkwtnhx\"}") + AdditionalErrorInfo model = BinaryData.fromString("{\"info\":\"\\\"dataiqihn\\\"\",\"type\":\"ngbwjz\"}") .toObject(AdditionalErrorInfo.class); - Assertions.assertEquals("kocrcjdkwtnhx", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdditionalErrorInfo model = new AdditionalErrorInfo().withInfo("datalxxwrljdouskc").withType("kocrcjdkwtnhx"); - model = BinaryData.fromObject(model).toObject(AdditionalErrorInfo.class); - Assertions.assertEquals("kocrcjdkwtnhx", model.type()); + Assertions.assertEquals("ngbwjz", model.type()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ApplianceNetworkConfigurationTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ApplianceNetworkConfigurationTests.java index 4959c1ecabc9e..5241ff016ce3b 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ApplianceNetworkConfigurationTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ApplianceNetworkConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class ApplianceNetworkConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplianceNetworkConfiguration model - = BinaryData.fromString("{\"name\":\"pnppfuf\",\"macAddress\":\"wdmhdlxyjrxs\"}") + = BinaryData.fromString("{\"name\":\"vxysl\",\"macAddress\":\"hsfxoblytkb\"}") .toObject(ApplianceNetworkConfiguration.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceNetworkConfiguration model = new ApplianceNetworkConfiguration(); - model = BinaryData.fromObject(model).toObject(ApplianceNetworkConfiguration.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkuRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkuRequestTests.java index c98d518bdbeec..ddfd949e5a65d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkuRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkuRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,25 +15,24 @@ public final class AvailableSkuRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailableSkuRequest model = BinaryData.fromString( - "{\"transferType\":\"ExportFromAzure\",\"country\":\"c\",\"location\":\"r\",\"skuNames\":[\"DataBoxDisk\",\"DataBox\",\"DataBoxCustomerDisk\",\"DataBoxCustomerDisk\"]}") + "{\"transferType\":\"ExportFromAzure\",\"country\":\"d\",\"location\":\"aygdvwvgpioh\",\"skuNames\":[\"DataBoxHeavy\",\"DataBoxDisk\",\"DataBoxCustomerDisk\"]}") .toObject(AvailableSkuRequest.class); Assertions.assertEquals(TransferType.EXPORT_FROM_AZURE, model.transferType()); - Assertions.assertEquals("c", model.country()); - Assertions.assertEquals("r", model.location()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuNames().get(0)); + Assertions.assertEquals("d", model.country()); + Assertions.assertEquals("aygdvwvgpioh", model.location()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.skuNames().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AvailableSkuRequest model = new AvailableSkuRequest().withTransferType(TransferType.EXPORT_FROM_AZURE) - .withCountry("c") - .withLocation("r") - .withSkuNames(Arrays.asList(SkuName.DATA_BOX_DISK, SkuName.DATA_BOX, SkuName.DATA_BOX_CUSTOMER_DISK, - SkuName.DATA_BOX_CUSTOMER_DISK)); + .withCountry("d") + .withLocation("aygdvwvgpioh") + .withSkuNames(Arrays.asList(SkuName.DATA_BOX_HEAVY, SkuName.DATA_BOX_DISK, SkuName.DATA_BOX_CUSTOMER_DISK)); model = BinaryData.fromObject(model).toObject(AvailableSkuRequest.class); Assertions.assertEquals(TransferType.EXPORT_FROM_AZURE, model.transferType()); - Assertions.assertEquals("c", model.country()); - Assertions.assertEquals("r", model.location()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuNames().get(0)); + Assertions.assertEquals("d", model.country()); + Assertions.assertEquals("aygdvwvgpioh", model.location()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.skuNames().get(0)); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkusResultTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkusResultTests.java index 004bce7bb676b..4587fb93e7a63 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkusResultTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkusResultTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.AvailableSkusResult; +import com.azure.resourcemanager.databox.implementation.models.AvailableSkusResult; import org.junit.jupiter.api.Assertions; public final class AvailableSkusResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailableSkusResult model = BinaryData.fromString( - "{\"value\":[{\"sku\":{\"name\":\"DataBoxDisk\",\"displayName\":\"de\",\"family\":\"jzicwifsjt\",\"model\":\"DataBox\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"bkh\",\"serviceLocation\":\"deyeamdphagalpbu\"},{\"dataLocation\":\"gipwhonowkg\",\"serviceLocation\":\"wankixzbi\"},{\"dataLocation\":\"eputtmrywnuzoqf\",\"serviceLocation\":\"yqzrnkcqvyxlw\"}],\"capacity\":{\"usable\":\"sicohoqqnwvlry\",\"maximum\":\"w\",\"individualSkuUsable\":\"eun\"},\"costs\":[{\"meterId\":\"gyxzk\",\"meterType\":\"ocukoklyax\",\"multiplier\":20.767156204407467},{\"meterId\":\"qszf\",\"meterType\":\"eyp\",\"multiplier\":74.21012779160806},{\"meterId\":\"mwvvjektcxsenhw\",\"meterType\":\"s\",\"multiplier\":77.02938198483662},{\"meterId\":\"wvlqdqgb\",\"meterType\":\"ylihkaetckt\",\"multiplier\":77.05295281811806}],\"apiVersions\":[\"snkymuctq\",\"jf\",\"ebrjcxe\"],\"disabledReason\":\"Country\",\"disabledReasonMessage\":\"utttxfvjrbirp\",\"requiredFeature\":\"epcyvahfnlj\",\"countriesWithinCommerceBoundary\":[\"xjvuujqgidokg\"]}},{\"sku\":{\"name\":\"DataBoxHeavy\",\"displayName\":\"oxgvclt\",\"family\":\"sncghkjeszz\",\"model\":\"DataBoxDisk\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"gx\",\"serviceLocation\":\"smx\"},{\"dataLocation\":\"hmpvecx\",\"serviceLocation\":\"debfqkkrbmpukgri\"},{\"dataLocation\":\"lzlfbxzpuz\",\"serviceLocation\":\"ispnqzahmgkbrp\"}],\"capacity\":{\"usable\":\"hibnuqqkpika\",\"maximum\":\"gvtqagnbuynh\",\"individualSkuUsable\":\"gg\"},\"costs\":[{\"meterId\":\"siarbutrcvpn\",\"meterType\":\"zmhjrunmp\",\"multiplier\":50.4320274119209}],\"apiVersions\":[\"rbnlankxmyskp\",\"henbtkcxywnytn\",\"synlqidybyxczfc\",\"haaxdbabphl\"],\"disabledReason\":\"Feature\",\"disabledReasonMessage\":\"fkts\",\"requiredFeature\":\"sucocmnyyazttbtw\",\"countriesWithinCommerceBoundary\":[\"puedckzywbiexzf\",\"yueaxibxujwb\",\"qwalmuzyoxaepd\",\"zjancuxr\"]}}],\"nextLink\":\"wbavxbniwdj\"}") + "{\"value\":[{\"sku\":{\"name\":\"DataBoxCustomerDisk\",\"displayName\":\"pxgy\",\"family\":\"gvr\",\"model\":\"DataBox\"},\"enabled\":false,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"i\",\"serviceLocation\":\"blxgwimf\"},{\"dataLocation\":\"hfjx\",\"serviceLocation\":\"szkkfoqre\"}],\"capacity\":{\"usable\":\"zi\",\"maximum\":\"jawneaiv\",\"individualSkuUsable\":\"czelpcirel\"},\"costs\":[{\"meterId\":\"enwabfatk\",\"meterType\":\"dxbjhwuaanozj\",\"multiplier\":10.336873591952845}],\"apiVersions\":[\"ulpjr\",\"xagl\"],\"disabledReason\":\"NoSubscriptionInfo\",\"disabledReasonMessage\":\"jwosytxitcskfck\",\"requiredFeature\":\"umiekkezzi\",\"countriesWithinCommerceBoundary\":[\"yf\"]}},{\"sku\":{\"name\":\"DataBoxHeavy\",\"displayName\":\"qgge\",\"family\":\"unygaeqid\",\"model\":\"DataBox\"},\"enabled\":false,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"rxcyjmoad\",\"serviceLocation\":\"varmywdmj\"},{\"dataLocation\":\"q\",\"serviceLocation\":\"hhyxxrw\"},{\"dataLocation\":\"co\",\"serviceLocation\":\"hp\"}],\"capacity\":{\"usable\":\"gymare\",\"maximum\":\"ajxq\",\"individualSkuUsable\":\"jhkycub\"},\"costs\":[{\"meterId\":\"ssofwqmzqa\",\"meterType\":\"rmnjijpx\",\"multiplier\":5.180892672849591},{\"meterId\":\"dfnbyxbaaabjyv\",\"meterType\":\"ffimrzrtuzqogsex\",\"multiplier\":99.46708410677535},{\"meterId\":\"nwnwme\",\"meterType\":\"syyceuzsoibjud\",\"multiplier\":10.95765880828754},{\"meterId\":\"rthzvaytdwkqbrqu\",\"meterType\":\"axhexiilivp\",\"multiplier\":35.85446548107137}],\"apiVersions\":[\"tdqoaxoruzfgsq\"],\"disabledReason\":\"None\",\"disabledReasonMessage\":\"rxxle\",\"requiredFeature\":\"ramxjezwlwnw\",\"countriesWithinCommerceBoundary\":[\"lcvydy\",\"atdooaojkniod\"]}},{\"sku\":{\"name\":\"DataBoxHeavy\",\"displayName\":\"bw\",\"family\":\"jhemms\",\"model\":\"DataBoxCustomerDisk\"},\"enabled\":false,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"jinfw\",\"serviceLocation\":\"fltkacjv\"},{\"dataLocation\":\"kdlfoa\",\"serviceLocation\":\"gkfpaga\"}],\"capacity\":{\"usable\":\"ulpqblylsyxkqjn\",\"maximum\":\"ervtiagxs\",\"individualSkuUsable\":\"zuempsbzkf\"},\"costs\":[{\"meterId\":\"v\",\"meterType\":\"qi\",\"multiplier\":75.84854507381681},{\"meterId\":\"kjj\",\"meterType\":\"xrbuukzclew\",\"multiplier\":42.54727673161687},{\"meterId\":\"paztzpofncck\",\"meterType\":\"fz\",\"multiplier\":16.493538568853417},{\"meterId\":\"buy\",\"meterType\":\"xzfe\",\"multiplier\":14.164111559585502}],\"apiVersions\":[\"iolxor\",\"altol\",\"ncwsob\"],\"disabledReason\":\"None\",\"disabledReasonMessage\":\"dbnw\",\"requiredFeature\":\"fhucqdpfuv\",\"countriesWithinCommerceBoundary\":[\"bjj\",\"anvx\"]}}],\"nextLink\":\"t\"}") .toObject(AvailableSkusResult.class); - Assertions.assertEquals("wbavxbniwdj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableSkusResult model = new AvailableSkusResult().withNextLink("wbavxbniwdj"); - model = BinaryData.fromObject(model).toObject(AvailableSkusResult.class); - Assertions.assertEquals("wbavxbniwdj", model.nextLink()); + Assertions.assertEquals("t", model.nextLink()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AzureFileFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AzureFileFilterDetailsTests.java index 8e555276cba8b..241c91a315908 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AzureFileFilterDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AzureFileFilterDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,22 +13,22 @@ public final class AzureFileFilterDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureFileFilterDetails model = BinaryData.fromString( - "{\"filePrefixList\":[\"jease\",\"pheoflokeyy\",\"enjbdlwtgrhp\",\"jp\"],\"filePathList\":[\"asxazjpqyegualhb\",\"xhejjzzvdud\",\"wdslfhotwmcy\",\"pwlbjnpg\"],\"fileShareList\":[\"tadehxnltyfsopp\",\"suesnzw\",\"ej\",\"avo\"]}") + "{\"filePrefixList\":[\"agnb\",\"ynhijggme\"],\"filePathList\":[\"iarbutrcvpna\",\"zmhjrunmp\",\"ttdbhrbnl\"],\"fileShareList\":[\"xmyskp\"]}") .toObject(AzureFileFilterDetails.class); - Assertions.assertEquals("jease", model.filePrefixList().get(0)); - Assertions.assertEquals("asxazjpqyegualhb", model.filePathList().get(0)); - Assertions.assertEquals("tadehxnltyfsopp", model.fileShareList().get(0)); + Assertions.assertEquals("agnb", model.filePrefixList().get(0)); + Assertions.assertEquals("iarbutrcvpna", model.filePathList().get(0)); + Assertions.assertEquals("xmyskp", model.fileShareList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureFileFilterDetails model = new AzureFileFilterDetails() - .withFilePrefixList(Arrays.asList("jease", "pheoflokeyy", "enjbdlwtgrhp", "jp")) - .withFilePathList(Arrays.asList("asxazjpqyegualhb", "xhejjzzvdud", "wdslfhotwmcy", "pwlbjnpg")) - .withFileShareList(Arrays.asList("tadehxnltyfsopp", "suesnzw", "ej", "avo")); + AzureFileFilterDetails model + = new AzureFileFilterDetails().withFilePrefixList(Arrays.asList("agnb", "ynhijggme")) + .withFilePathList(Arrays.asList("iarbutrcvpna", "zmhjrunmp", "ttdbhrbnl")) + .withFileShareList(Arrays.asList("xmyskp")); model = BinaryData.fromObject(model).toObject(AzureFileFilterDetails.class); - Assertions.assertEquals("jease", model.filePrefixList().get(0)); - Assertions.assertEquals("asxazjpqyegualhb", model.filePathList().get(0)); - Assertions.assertEquals("tadehxnltyfsopp", model.fileShareList().get(0)); + Assertions.assertEquals("agnb", model.filePrefixList().get(0)); + Assertions.assertEquals("iarbutrcvpna", model.filePathList().get(0)); + Assertions.assertEquals("xmyskp", model.fileShareList().get(0)); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/BlobFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/BlobFilterDetailsTests.java index 4efd94fa50a59..c667019d41688 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/BlobFilterDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/BlobFilterDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,22 +13,21 @@ public final class BlobFilterDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BlobFilterDetails model = BinaryData.fromString( - "{\"blobPrefixList\":[\"pec\",\"vmmcoofs\",\"lzevgbmqjqab\",\"y\"],\"blobPathList\":[\"vkwlzuvccfwnf\",\"bacfionlebxetq\",\"tzxdpnqbqqwx\",\"jfeallnwsub\"],\"containerList\":[\"jampmngnzscxaqw\",\"ochcbonqvpkvl\"]}") + "{\"blobPrefixList\":[\"mxnehmp\"],\"blobPathList\":[\"xgodebfqkkrbmp\",\"kgriwflzlfbx\"],\"containerList\":[\"zycispn\",\"zahmgkbrpyydhibn\",\"qqkpikadrg\"]}") .toObject(BlobFilterDetails.class); - Assertions.assertEquals("pec", model.blobPrefixList().get(0)); - Assertions.assertEquals("vkwlzuvccfwnf", model.blobPathList().get(0)); - Assertions.assertEquals("jampmngnzscxaqw", model.containerList().get(0)); + Assertions.assertEquals("mxnehmp", model.blobPrefixList().get(0)); + Assertions.assertEquals("xgodebfqkkrbmp", model.blobPathList().get(0)); + Assertions.assertEquals("zycispn", model.containerList().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BlobFilterDetails model - = new BlobFilterDetails().withBlobPrefixList(Arrays.asList("pec", "vmmcoofs", "lzevgbmqjqab", "y")) - .withBlobPathList(Arrays.asList("vkwlzuvccfwnf", "bacfionlebxetq", "tzxdpnqbqqwx", "jfeallnwsub")) - .withContainerList(Arrays.asList("jampmngnzscxaqw", "ochcbonqvpkvl")); + BlobFilterDetails model = new BlobFilterDetails().withBlobPrefixList(Arrays.asList("mxnehmp")) + .withBlobPathList(Arrays.asList("xgodebfqkkrbmp", "kgriwflzlfbx")) + .withContainerList(Arrays.asList("zycispn", "zahmgkbrpyydhibn", "qqkpikadrg")); model = BinaryData.fromObject(model).toObject(BlobFilterDetails.class); - Assertions.assertEquals("pec", model.blobPrefixList().get(0)); - Assertions.assertEquals("vkwlzuvccfwnf", model.blobPathList().get(0)); - Assertions.assertEquals("jampmngnzscxaqw", model.containerList().get(0)); + Assertions.assertEquals("mxnehmp", model.blobPrefixList().get(0)); + Assertions.assertEquals("xgodebfqkkrbmp", model.blobPathList().get(0)); + Assertions.assertEquals("zycispn", model.containerList().get(0)); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CancellationReasonTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CancellationReasonTests.java index eb436de554a79..e9d76ba55dfa9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CancellationReasonTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CancellationReasonTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,14 +12,14 @@ public final class CancellationReasonTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CancellationReason model - = BinaryData.fromString("{\"reason\":\"mygtdssls\"}").toObject(CancellationReason.class); - Assertions.assertEquals("mygtdssls", model.reason()); + = BinaryData.fromString("{\"reason\":\"qjhhkxbpv\"}").toObject(CancellationReason.class); + Assertions.assertEquals("qjhhkxbpv", model.reason()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CancellationReason model = new CancellationReason().withReason("mygtdssls"); + CancellationReason model = new CancellationReason().withReason("qjhhkxbpv"); model = BinaryData.fromObject(model).toObject(CancellationReason.class); - Assertions.assertEquals("mygtdssls", model.reason()); + Assertions.assertEquals("qjhhkxbpv", model.reason()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactDetailsTests.java index e3b31425f74af..c0176767a1cae 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,34 +15,34 @@ public final class ContactDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ContactDetails model = BinaryData.fromString( - "{\"contactName\":\"ltmrldh\",\"phone\":\"gjzzdatqxhocdg\",\"phoneExtension\":\"blgphuticn\",\"mobile\":\"kao\",\"emailList\":[\"yiftyhxhuro\",\"ftyxolniw\",\"wcukjfkgiawxk\"],\"notificationPreference\":[{\"stageName\":\"PickedUp\",\"sendNotification\":true}]}") + "{\"contactName\":\"eallnwsubisnj\",\"phone\":\"mpmngnzscxaqwoo\",\"phoneExtension\":\"cbonqvpk\",\"mobile\":\"rxnjeaseipheofl\",\"emailList\":[\"eyy\",\"enjbdlwtgrhp\"],\"notificationPreference\":[{\"stageName\":\"Delivered\",\"sendNotification\":true}]}") .toObject(ContactDetails.class); - Assertions.assertEquals("ltmrldh", model.contactName()); - Assertions.assertEquals("gjzzdatqxhocdg", model.phone()); - Assertions.assertEquals("blgphuticn", model.phoneExtension()); - Assertions.assertEquals("kao", model.mobile()); - Assertions.assertEquals("yiftyhxhuro", model.emailList().get(0)); - Assertions.assertEquals(NotificationStageName.PICKED_UP, model.notificationPreference().get(0).stageName()); - Assertions.assertEquals(true, model.notificationPreference().get(0).sendNotification()); + Assertions.assertEquals("eallnwsubisnj", model.contactName()); + Assertions.assertEquals("mpmngnzscxaqwoo", model.phone()); + Assertions.assertEquals("cbonqvpk", model.phoneExtension()); + Assertions.assertEquals("rxnjeaseipheofl", model.mobile()); + Assertions.assertEquals("eyy", model.emailList().get(0)); + Assertions.assertEquals(NotificationStageName.DELIVERED, model.notificationPreference().get(0).stageName()); + Assertions.assertTrue(model.notificationPreference().get(0).sendNotification()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ContactDetails model = new ContactDetails().withContactName("ltmrldh") - .withPhone("gjzzdatqxhocdg") - .withPhoneExtension("blgphuticn") - .withMobile("kao") - .withEmailList(Arrays.asList("yiftyhxhuro", "ftyxolniw", "wcukjfkgiawxk")) + ContactDetails model = new ContactDetails().withContactName("eallnwsubisnj") + .withPhone("mpmngnzscxaqwoo") + .withPhoneExtension("cbonqvpk") + .withMobile("rxnjeaseipheofl") + .withEmailList(Arrays.asList("eyy", "enjbdlwtgrhp")) .withNotificationPreference( - Arrays.asList(new NotificationPreference().withStageName(NotificationStageName.PICKED_UP) + Arrays.asList(new NotificationPreference().withStageName(NotificationStageName.DELIVERED) .withSendNotification(true))); model = BinaryData.fromObject(model).toObject(ContactDetails.class); - Assertions.assertEquals("ltmrldh", model.contactName()); - Assertions.assertEquals("gjzzdatqxhocdg", model.phone()); - Assertions.assertEquals("blgphuticn", model.phoneExtension()); - Assertions.assertEquals("kao", model.mobile()); - Assertions.assertEquals("yiftyhxhuro", model.emailList().get(0)); - Assertions.assertEquals(NotificationStageName.PICKED_UP, model.notificationPreference().get(0).stageName()); - Assertions.assertEquals(true, model.notificationPreference().get(0).sendNotification()); + Assertions.assertEquals("eallnwsubisnj", model.contactName()); + Assertions.assertEquals("mpmngnzscxaqwoo", model.phone()); + Assertions.assertEquals("cbonqvpk", model.phoneExtension()); + Assertions.assertEquals("rxnjeaseipheofl", model.mobile()); + Assertions.assertEquals("eyy", model.emailList().get(0)); + Assertions.assertEquals(NotificationStageName.DELIVERED, model.notificationPreference().get(0).stageName()); + Assertions.assertTrue(model.notificationPreference().get(0).sendNotification()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactInfoTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactInfoTests.java index c67815b998179..b7344d88148c5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactInfoTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,24 +12,24 @@ public final class ContactInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ContactInfo model = BinaryData.fromString( - "{\"contactName\":\"dpuozmyz\",\"phone\":\"dagfuaxbezyiuok\",\"phoneExtension\":\"whrdxwzywqsmbsu\",\"mobile\":\"xim\"}") + "{\"contactName\":\"uosvmkfssxqukk\",\"phone\":\"plgmgsxnk\",\"phoneExtension\":\"kde\",\"mobile\":\"pvlopwiyighxpkd\"}") .toObject(ContactInfo.class); - Assertions.assertEquals("dpuozmyz", model.contactName()); - Assertions.assertEquals("dagfuaxbezyiuok", model.phone()); - Assertions.assertEquals("whrdxwzywqsmbsu", model.phoneExtension()); - Assertions.assertEquals("xim", model.mobile()); + Assertions.assertEquals("uosvmkfssxqukk", model.contactName()); + Assertions.assertEquals("plgmgsxnk", model.phone()); + Assertions.assertEquals("kde", model.phoneExtension()); + Assertions.assertEquals("pvlopwiyighxpkd", model.mobile()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ContactInfo model = new ContactInfo().withContactName("dpuozmyz") - .withPhone("dagfuaxbezyiuok") - .withPhoneExtension("whrdxwzywqsmbsu") - .withMobile("xim"); + ContactInfo model = new ContactInfo().withContactName("uosvmkfssxqukk") + .withPhone("plgmgsxnk") + .withPhoneExtension("kde") + .withMobile("pvlopwiyighxpkd"); model = BinaryData.fromObject(model).toObject(ContactInfo.class); - Assertions.assertEquals("dpuozmyz", model.contactName()); - Assertions.assertEquals("dagfuaxbezyiuok", model.phone()); - Assertions.assertEquals("whrdxwzywqsmbsu", model.phoneExtension()); - Assertions.assertEquals("xim", model.mobile()); + Assertions.assertEquals("uosvmkfssxqukk", model.contactName()); + Assertions.assertEquals("plgmgsxnk", model.phone()); + Assertions.assertEquals("kde", model.phoneExtension()); + Assertions.assertEquals("pvlopwiyighxpkd", model.mobile()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyLogDetailsTests.java index 1a0e51da10c9f..0a5e29ea965f0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyLogDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyLogDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { CopyLogDetails model = BinaryData.fromString("{\"copyLogDetailsType\":\"CopyLogDetails\"}").toObject(CopyLogDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CopyLogDetails model = new CopyLogDetails(); - model = BinaryData.fromObject(model).toObject(CopyLogDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateJobValidationsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateJobValidationsTests.java index cabbfa5f5d9d9..6f0f7e54b09b2 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateJobValidationsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateJobValidationsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,14 +13,14 @@ public final class CreateJobValidationsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CreateJobValidations model = BinaryData.fromString( - "{\"validationCategory\":\"JobCreationValidation\",\"individualRequestDetails\":[{\"validationType\":\"ValidationInputRequest\"}]}") + "{\"validationCategory\":\"JobCreationValidation\",\"individualRequestDetails\":[{\"validationType\":\"ValidationInputRequest\"},{\"validationType\":\"ValidationInputRequest\"},{\"validationType\":\"ValidationInputRequest\"}]}") .toObject(CreateJobValidations.class); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CreateJobValidations model - = new CreateJobValidations().withIndividualRequestDetails(Arrays.asList(new ValidationInputRequest())); + CreateJobValidations model = new CreateJobValidations().withIndividualRequestDetails( + Arrays.asList(new ValidationInputRequest(), new ValidationInputRequest(), new ValidationInputRequest())); model = BinaryData.fromObject(model).toObject(CreateJobValidations.class); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateOrderLimitForSubscriptionValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateOrderLimitForSubscriptionValidationRequestTests.java index 890aa8607e115..1866bc04d9782 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateOrderLimitForSubscriptionValidationRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateOrderLimitForSubscriptionValidationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -14,19 +14,19 @@ public final class CreateOrderLimitForSubscriptionValidationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CreateOrderLimitForSubscriptionValidationRequest model = BinaryData.fromString( - "{\"validationType\":\"ValidateCreateOrderLimit\",\"deviceType\":\"DataBoxDisk\",\"model\":\"AzureDataBox525\"}") + "{\"validationType\":\"ValidateCreateOrderLimit\",\"deviceType\":\"DataBoxHeavy\",\"model\":\"AzureDataBox525\"}") .toObject(CreateOrderLimitForSubscriptionValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.deviceType()); Assertions.assertEquals(ModelName.AZURE_DATA_BOX525, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CreateOrderLimitForSubscriptionValidationRequest model - = new CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX_DISK) + = new CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX_HEAVY) .withModel(ModelName.AZURE_DATA_BOX525); model = BinaryData.fromObject(model).toObject(CreateOrderLimitForSubscriptionValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.deviceType()); Assertions.assertEquals(ModelName.AZURE_DATA_BOX525, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxAccountCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxAccountCopyLogDetailsTests.java index 2d5c99f161af4..52bf7b797b3c9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxAccountCopyLogDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxAccountCopyLogDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DataBoxAccountCopyLogDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataBoxAccountCopyLogDetails model = BinaryData.fromString( - "{\"copyLogDetailsType\":\"DataBox\",\"accountName\":\"pxgy\",\"copyLogLink\":\"gvr\",\"copyVerboseLogLink\":\"npkukghimdblx\"}") + "{\"copyLogDetailsType\":\"DataBox\",\"accountName\":\"baiuebbaumny\",\"copyLogLink\":\"ped\",\"copyVerboseLogLink\":\"jn\"}") .toObject(DataBoxAccountCopyLogDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxAccountCopyLogDetails model = new DataBoxAccountCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxAccountCopyLogDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxCustomerDiskCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxCustomerDiskCopyLogDetailsTests.java index 41b06da98f512..73677dca4b7c2 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxCustomerDiskCopyLogDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxCustomerDiskCopyLogDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DataBoxCustomerDiskCopyLogDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataBoxCustomerDiskCopyLogDetails model = BinaryData.fromString( - "{\"copyLogDetailsType\":\"DataBoxCustomerDisk\",\"serialNumber\":\"imfnjhfjx\",\"errorLogLink\":\"szkkfoqre\",\"verboseLogLink\":\"kzikfjawneaivxwc\"}") + "{\"copyLogDetailsType\":\"DataBoxCustomerDisk\",\"serialNumber\":\"ckhsmtxpsieb\",\"errorLogLink\":\"hvpesapskrdqm\",\"verboseLogLink\":\"jdhtldwkyzxu\"}") .toObject(DataBoxCustomerDiskCopyLogDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxCustomerDiskCopyLogDetails model = new DataBoxCustomerDiskCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxCustomerDiskCopyLogDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyLogDetailsTests.java index 0a4f25357b64a..fae07ab6dd029 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyLogDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyLogDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DataBoxDiskCopyLogDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataBoxDiskCopyLogDetails model = BinaryData.fromString( - "{\"copyLogDetailsType\":\"DataBoxDisk\",\"diskSerialNumber\":\"lpcirelsf\",\"errorLogLink\":\"enwabfatk\",\"verboseLogLink\":\"dxbjhwuaanozj\"}") + "{\"copyLogDetailsType\":\"DataBoxDisk\",\"diskSerialNumber\":\"kn\",\"errorLogLink\":\"scwsv\",\"verboseLogLink\":\"otogtwrupqs\"}") .toObject(DataBoxDiskCopyLogDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxDiskCopyLogDetails model = new DataBoxDiskCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxDiskCopyLogDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskGranularCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskGranularCopyLogDetailsTests.java index 8aa397716c330..2d0b07ea832c1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskGranularCopyLogDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskGranularCopyLogDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DataBoxDiskGranularCopyLogDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataBoxDiskGranularCopyLogDetails model = BinaryData.fromString( - "{\"copyLogDetailsType\":\"DataBoxCustomerDisk\",\"serialNumber\":\"ph\",\"accountId\":\"ulpjr\",\"errorLogLink\":\"ag\",\"verboseLogLink\":\"vimjwos\"}") + "{\"copyLogDetailsType\":\"DataBoxCustomerDisk\",\"serialNumber\":\"aqsqsycbkbfk\",\"accountId\":\"kdkexxp\",\"errorLogLink\":\"fmxa\",\"verboseLogLink\":\"fjpgddtocjjxhvp\"}") .toObject(DataBoxDiskGranularCopyLogDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxDiskGranularCopyLogDetails model = new DataBoxDiskGranularCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxDiskGranularCopyLogDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxHeavyAccountCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxHeavyAccountCopyLogDetailsTests.java index fa14ec630c76d..94997b6952808 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxHeavyAccountCopyLogDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxHeavyAccountCopyLogDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DataBoxHeavyAccountCopyLogDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataBoxHeavyAccountCopyLogDetails model = BinaryData.fromString( - "{\"copyLogDetailsType\":\"DataBoxHeavy\",\"accountName\":\"ervtiagxs\",\"copyLogLink\":[\"uem\",\"sbzkf\",\"beyvpnqicvinvkjj\"],\"copyVerboseLogLink\":[\"rbuukzclewyhmlwp\",\"ztzp\",\"fn\"]}") + "{\"copyLogDetailsType\":\"DataBoxHeavy\",\"accountName\":\"nmic\",\"copyLogLink\":[\"ceoveilovno\"],\"copyVerboseLogLink\":[\"jfcn\"]}") .toObject(DataBoxHeavyAccountCopyLogDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxHeavyAccountCopyLogDetails model = new DataBoxHeavyAccountCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxHeavyAccountCopyLogDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxScheduleAvailabilityRequestTests.java index cd370ff988913..8db8d59606990 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxScheduleAvailabilityRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxScheduleAvailabilityRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,23 +12,23 @@ public final class DataBoxScheduleAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DataBoxScheduleAvailabilityRequest model = BinaryData.fromString( - "{\"skuName\":\"DataBox\",\"storageLocation\":\"pagmhrskdsnf\",\"country\":\"doakgtdlmkkzevdl\",\"model\":\"DataBox\"}") + DataBoxScheduleAvailabilityRequest model = BinaryData + .fromString( + "{\"skuName\":\"DataBox\",\"storageLocation\":\"d\",\"country\":\"wyhzdx\",\"model\":\"DataBoxHeavy\"}") .toObject(DataBoxScheduleAvailabilityRequest.class); - Assertions.assertEquals("pagmhrskdsnf", model.storageLocation()); - Assertions.assertEquals("doakgtdlmkkzevdl", model.country()); - Assertions.assertEquals(ModelName.DATA_BOX, model.model()); + Assertions.assertEquals("d", model.storageLocation()); + Assertions.assertEquals("wyhzdx", model.country()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DataBoxScheduleAvailabilityRequest model - = new DataBoxScheduleAvailabilityRequest().withStorageLocation("pagmhrskdsnf") - .withCountry("doakgtdlmkkzevdl") - .withModel(ModelName.DATA_BOX); + DataBoxScheduleAvailabilityRequest model = new DataBoxScheduleAvailabilityRequest().withStorageLocation("d") + .withCountry("wyhzdx") + .withModel(ModelName.DATA_BOX_HEAVY); model = BinaryData.fromObject(model).toObject(DataBoxScheduleAvailabilityRequest.class); - Assertions.assertEquals("pagmhrskdsnf", model.storageLocation()); - Assertions.assertEquals("doakgtdlmkkzevdl", model.country()); - Assertions.assertEquals(ModelName.DATA_BOX, model.model()); + Assertions.assertEquals("d", model.storageLocation()); + Assertions.assertEquals("wyhzdx", model.country()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataLocationToServiceLocationMapTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataLocationToServiceLocationMapTests.java index 5f22896cc9bfb..9990a0c7c8a83 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataLocationToServiceLocationMapTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataLocationToServiceLocationMapTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DataLocationToServiceLocationMapTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataLocationToServiceLocationMap model - = BinaryData.fromString("{\"dataLocation\":\"alaexqpvfadmwsrc\",\"serviceLocation\":\"vxpvgomz\"}") + = BinaryData.fromString("{\"dataLocation\":\"msweypqwdxggicc\",\"serviceLocation\":\"xqhuexm\"}") .toObject(DataLocationToServiceLocationMap.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLocationToServiceLocationMap model = new DataLocationToServiceLocationMap(); - model = BinaryData.fromObject(model).toObject(DataLocationToServiceLocationMap.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressInstructionResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressInstructionResponseTests.java index 9bdb2fc8ce878..6a76068165c5d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressInstructionResponseTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressInstructionResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DatacenterAddressInstructionResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatacenterAddressInstructionResponse model = BinaryData.fromString( - "{\"datacenterAddressType\":\"DatacenterAddressInstruction\",\"communicationInstruction\":\"hwit\",\"supportedCarriersForReturnShipment\":[\"pyy\",\"pcdpumnz\",\"mwzn\",\"abikns\"],\"dataCenterAzureLocation\":\"gj\"}") + "{\"datacenterAddressType\":\"DatacenterAddressInstruction\",\"communicationInstruction\":\"rnwb\",\"supportedCarriersForReturnShipment\":[\"hseyvju\",\"rts\"],\"dataCenterAzureLocation\":\"spkdee\"}") .toObject(DatacenterAddressInstructionResponse.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatacenterAddressInstructionResponse model = new DatacenterAddressInstructionResponse(); - model = BinaryData.fromObject(model).toObject(DatacenterAddressInstructionResponse.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressLocationResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressLocationResponseTests.java index 00fc9844fc1a3..80269b7e0dde9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressLocationResponseTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressLocationResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DatacenterAddressLocationResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatacenterAddressLocationResponse model = BinaryData.fromString( - "{\"datacenterAddressType\":\"DatacenterAddressLocation\",\"contactPersonName\":\"bldtlww\",\"company\":\"kdmtncvokotll\",\"street1\":\"yhgsy\",\"street2\":\"ogjltdtbnnhad\",\"street3\":\"crkvcikhnv\",\"city\":\"mqg\",\"state\":\"queziky\",\"zip\":\"gxk\",\"country\":\"la\",\"phone\":\"elwuipi\",\"phoneExtension\":\"jzkzi\",\"addressType\":\"vvcnayr\",\"additionalShippingInformation\":\"rnxxmueed\",\"supportedCarriersForReturnShipment\":[\"dvstkw\",\"qtc\",\"ealmfmtdaaygdvwv\"],\"dataCenterAzureLocation\":\"iohgwxrtfud\"}") + "{\"datacenterAddressType\":\"DatacenterAddressLocation\",\"contactPersonName\":\"ofmxagkvtmelmqkr\",\"company\":\"hvljuahaquh\",\"street1\":\"hmdua\",\"street2\":\"exq\",\"street3\":\"fadmws\",\"city\":\"r\",\"state\":\"xpvgo\",\"zip\":\"lf\",\"country\":\"sgwbnbbeld\",\"phone\":\"k\",\"phoneExtension\":\"ali\",\"addressType\":\"rqhakauha\",\"additionalShippingInformation\":\"sfwxosowzxc\",\"supportedCarriersForReturnShipment\":[\"cjooxdjebwpucwwf\"],\"dataCenterAzureLocation\":\"vbvmeu\"}") .toObject(DatacenterAddressLocationResponse.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatacenterAddressLocationResponse model = new DatacenterAddressLocationResponse(); - model = BinaryData.fromObject(model).toObject(DatacenterAddressLocationResponse.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressRequestTests.java index 7d064e2802465..38295c24e06f2 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -14,21 +14,22 @@ public final class DatacenterAddressRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatacenterAddressRequest model = BinaryData - .fromString("{\"storageLocation\":\"bdagxt\",\"skuName\":\"DataBoxDisk\",\"model\":\"DataBox\"}") + .fromString( + "{\"storageLocation\":\"mygtdssls\",\"skuName\":\"DataBoxHeavy\",\"model\":\"AzureDataBox120\"}") .toObject(DatacenterAddressRequest.class); - Assertions.assertEquals("bdagxt", model.storageLocation()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuName()); - Assertions.assertEquals(ModelName.DATA_BOX, model.model()); + Assertions.assertEquals("mygtdssls", model.storageLocation()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.skuName()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DatacenterAddressRequest model = new DatacenterAddressRequest().withStorageLocation("bdagxt") - .withSkuName(SkuName.DATA_BOX_DISK) - .withModel(ModelName.DATA_BOX); + DatacenterAddressRequest model = new DatacenterAddressRequest().withStorageLocation("mygtdssls") + .withSkuName(SkuName.DATA_BOX_HEAVY) + .withModel(ModelName.AZURE_DATA_BOX120); model = BinaryData.fromObject(model).toObject(DatacenterAddressRequest.class); - Assertions.assertEquals("bdagxt", model.storageLocation()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuName()); - Assertions.assertEquals(ModelName.DATA_BOX, model.model()); + Assertions.assertEquals("mygtdssls", model.storageLocation()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.skuName()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressResponseTests.java index 66c14436940fc..11872b14bdc62 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressResponseTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DatacenterAddressResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DatacenterAddressResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DatacenterAddressResponse model = BinaryData.fromString( - "{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"exxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"],\"dataCenterAzureLocation\":\"dobpxjmflbvvn\"}") + "{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"wfudwpzntxhdzhl\",\"qj\",\"hckfrlhrx\",\"bkyvp\"],\"dataCenterAzureLocation\":\"anuzbpzkafkuw\"}") .toObject(DatacenterAddressResponse.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatacenterAddressResponse model = new DatacenterAddressResponse(); - model = BinaryData.fromObject(model).toObject(DatacenterAddressResponse.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityDetailsTests.java index 4e20a580ece0f..e63f72153fe93 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { DeviceCapabilityDetails model = BinaryData.fromString("{\"hardwareEncryption\":\"Disabled\"}").toObject(DeviceCapabilityDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceCapabilityDetails model = new DeviceCapabilityDetails(); - model = BinaryData.fromObject(model).toObject(DeviceCapabilityDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityRequestTests.java index b7a15b9b0b51a..dcbee19a08bb0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,18 +13,19 @@ public final class DeviceCapabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeviceCapabilityRequest model = BinaryData.fromString("{\"skuName\":\"DataBoxDisk\",\"model\":\"DataBoxDisk\"}") - .toObject(DeviceCapabilityRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuName()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); + DeviceCapabilityRequest model + = BinaryData.fromString("{\"skuName\":\"DataBoxHeavy\",\"model\":\"DataBoxHeavy\"}") + .toObject(DeviceCapabilityRequest.class); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.skuName()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeviceCapabilityRequest model - = new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_DISK).withModel(ModelName.DATA_BOX_DISK); + = new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_HEAVY).withModel(ModelName.DATA_BOX_HEAVY); model = BinaryData.fromObject(model).toObject(DeviceCapabilityRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuName()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.skuName()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityResponseTests.java index 082a2d1e5f907..2201f495c956a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityResponseTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DeviceCapabilityResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class DeviceCapabilityResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeviceCapabilityResponse model = BinaryData.fromString( - "{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Enabled\"},{\"hardwareEncryption\":\"Enabled\"},{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Enabled\"}]}") + "{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Disabled\"}]}") .toObject(DeviceCapabilityResponse.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeviceCapabilityResponse model = new DeviceCapabilityResponse(); - model = BinaryData.fromObject(model).toObject(DeviceCapabilityResponse.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DiskScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DiskScheduleAvailabilityRequestTests.java index 1b0d9d9c4b9bc..05bdebd1985e6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DiskScheduleAvailabilityRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DiskScheduleAvailabilityRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,24 +13,24 @@ public final class DiskScheduleAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DiskScheduleAvailabilityRequest model = BinaryData.fromString( - "{\"skuName\":\"DataBoxDisk\",\"expectedDataSizeInTeraBytes\":1060937316,\"storageLocation\":\"rgzdwmsweyp\",\"country\":\"dxggicccnxqhuexm\",\"model\":\"DataBoxCustomerDisk\"}") + "{\"skuName\":\"DataBoxDisk\",\"expectedDataSizeInTeraBytes\":874839525,\"storageLocation\":\"bzmnvdfznud\",\"country\":\"dvxzbncblylpst\",\"model\":\"AzureDataBox525\"}") .toObject(DiskScheduleAvailabilityRequest.class); - Assertions.assertEquals("rgzdwmsweyp", model.storageLocation()); - Assertions.assertEquals("dxggicccnxqhuexm", model.country()); - Assertions.assertEquals(ModelName.DATA_BOX_CUSTOMER_DISK, model.model()); - Assertions.assertEquals(1060937316, model.expectedDataSizeInTeraBytes()); + Assertions.assertEquals("bzmnvdfznud", model.storageLocation()); + Assertions.assertEquals("dvxzbncblylpst", model.country()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX525, model.model()); + Assertions.assertEquals(874839525, model.expectedDataSizeInTeraBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DiskScheduleAvailabilityRequest model = new DiskScheduleAvailabilityRequest().withStorageLocation("rgzdwmsweyp") - .withCountry("dxggicccnxqhuexm") - .withModel(ModelName.DATA_BOX_CUSTOMER_DISK) - .withExpectedDataSizeInTeraBytes(1060937316); + DiskScheduleAvailabilityRequest model = new DiskScheduleAvailabilityRequest().withStorageLocation("bzmnvdfznud") + .withCountry("dvxzbncblylpst") + .withModel(ModelName.AZURE_DATA_BOX525) + .withExpectedDataSizeInTeraBytes(874839525); model = BinaryData.fromObject(model).toObject(DiskScheduleAvailabilityRequest.class); - Assertions.assertEquals("rgzdwmsweyp", model.storageLocation()); - Assertions.assertEquals("dxggicccnxqhuexm", model.country()); - Assertions.assertEquals(ModelName.DATA_BOX_CUSTOMER_DISK, model.model()); - Assertions.assertEquals(1060937316, model.expectedDataSizeInTeraBytes()); + Assertions.assertEquals("bzmnvdfznud", model.storageLocation()); + Assertions.assertEquals("dvxzbncblylpst", model.country()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX525, model.model()); + Assertions.assertEquals(874839525, model.expectedDataSizeInTeraBytes()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/EncryptionPreferencesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/EncryptionPreferencesTests.java index 97eeb72bf4a3a..5deb778f6e372 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/EncryptionPreferencesTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/EncryptionPreferencesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -14,18 +14,18 @@ public final class EncryptionPreferencesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EncryptionPreferences model - = BinaryData.fromString("{\"doubleEncryption\":\"Disabled\",\"hardwareEncryption\":\"Enabled\"}") + = BinaryData.fromString("{\"doubleEncryption\":\"Enabled\",\"hardwareEncryption\":\"Enabled\"}") .toObject(EncryptionPreferences.class); - Assertions.assertEquals(DoubleEncryption.DISABLED, model.doubleEncryption()); + Assertions.assertEquals(DoubleEncryption.ENABLED, model.doubleEncryption()); Assertions.assertEquals(HardwareEncryption.ENABLED, model.hardwareEncryption()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EncryptionPreferences model = new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.DISABLED) + EncryptionPreferences model = new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED) .withHardwareEncryption(HardwareEncryption.ENABLED); model = BinaryData.fromObject(model).toObject(EncryptionPreferences.class); - Assertions.assertEquals(DoubleEncryption.DISABLED, model.doubleEncryption()); + Assertions.assertEquals(DoubleEncryption.ENABLED, model.doubleEncryption()); Assertions.assertEquals(HardwareEncryption.ENABLED, model.hardwareEncryption()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ExportDiskDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ExportDiskDetailsTests.java index d01956353cda2..01d41860a9db1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ExportDiskDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ExportDiskDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class ExportDiskDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExportDiskDetails model = BinaryData.fromString( - "{\"manifestFile\":\"ynt\",\"manifestHash\":\"zihleosjswsr\",\"backupManifestCloudPath\":\"lyzrpzbchckqqzqi\"}") + "{\"manifestFile\":\"eebvmgxsab\",\"manifestHash\":\"qduujitcjczdz\",\"backupManifestCloudPath\":\"ndhkrw\"}") .toObject(ExportDiskDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExportDiskDetails model = new ExportDiskDetails(); - model = BinaryData.fromObject(model).toObject(ExportDiskDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/FilterFileDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/FilterFileDetailsTests.java index 09a00cddd3e84..1acd235210553 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/FilterFileDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/FilterFileDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,18 +13,18 @@ public final class FilterFileDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FilterFileDetails model - = BinaryData.fromString("{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"zdmohctbqvu\"}") + = BinaryData.fromString("{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"enbtkcxywny\"}") .toObject(FilterFileDetails.class); Assertions.assertEquals(FilterFileType.AZURE_FILE, model.filterFileType()); - Assertions.assertEquals("zdmohctbqvu", model.filterFilePath()); + Assertions.assertEquals("enbtkcxywny", model.filterFilePath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FilterFileDetails model - = new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("zdmohctbqvu"); + = new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("enbtkcxywny"); model = BinaryData.fromObject(model).toObject(FilterFileDetails.class); Assertions.assertEquals(FilterFileType.AZURE_FILE, model.filterFileType()); - Assertions.assertEquals("zdmohctbqvu", model.filterFilePath()); + Assertions.assertEquals("enbtkcxywny", model.filterFilePath()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/GranularCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/GranularCopyLogDetailsTests.java index 7dfd0de7b4d62..8b9bf6327b6a3 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/GranularCopyLogDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/GranularCopyLogDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { GranularCopyLogDetails model = BinaryData.fromString("{\"copyLogDetailsType\":\"GranularCopyLogDetails\"}") .toObject(GranularCopyLogDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GranularCopyLogDetails model = new GranularCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(GranularCopyLogDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/HeavyScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/HeavyScheduleAvailabilityRequestTests.java index 9dad3d8ce1532..ddfa1ca9a72d8 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/HeavyScheduleAvailabilityRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/HeavyScheduleAvailabilityRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,21 +13,22 @@ public final class HeavyScheduleAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HeavyScheduleAvailabilityRequest model = BinaryData.fromString( - "{\"skuName\":\"DataBoxHeavy\",\"storageLocation\":\"lstvlzywe\",\"country\":\"zrncsdt\",\"model\":\"DataBoxDisk\"}") + "{\"skuName\":\"DataBoxHeavy\",\"storageLocation\":\"hxsrzdzucersc\",\"country\":\"t\",\"model\":\"DataBoxHeavy\"}") .toObject(HeavyScheduleAvailabilityRequest.class); - Assertions.assertEquals("lstvlzywe", model.storageLocation()); - Assertions.assertEquals("zrncsdt", model.country()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); + Assertions.assertEquals("hxsrzdzucersc", model.storageLocation()); + Assertions.assertEquals("t", model.country()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HeavyScheduleAvailabilityRequest model = new HeavyScheduleAvailabilityRequest().withStorageLocation("lstvlzywe") - .withCountry("zrncsdt") - .withModel(ModelName.DATA_BOX_DISK); + HeavyScheduleAvailabilityRequest model + = new HeavyScheduleAvailabilityRequest().withStorageLocation("hxsrzdzucersc") + .withCountry("t") + .withModel(ModelName.DATA_BOX_HEAVY); model = BinaryData.fromObject(model).toObject(HeavyScheduleAvailabilityRequest.class); - Assertions.assertEquals("lstvlzywe", model.storageLocation()); - Assertions.assertEquals("zrncsdt", model.country()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); + Assertions.assertEquals("hxsrzdzucersc", model.storageLocation()); + Assertions.assertEquals("t", model.country()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/IdentityPropertiesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/IdentityPropertiesTests.java index 13f34d45504eb..cff416e32ff33 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/IdentityPropertiesTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/IdentityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,18 +13,18 @@ public final class IdentityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IdentityProperties model - = BinaryData.fromString("{\"type\":\"qrvkdv\",\"userAssigned\":{\"resourceId\":\"lrmv\"}}") + = BinaryData.fromString("{\"type\":\"xywpmueefjzwfqkq\",\"userAssigned\":{\"resourceId\":\"dsuyonobgla\"}}") .toObject(IdentityProperties.class); - Assertions.assertEquals("qrvkdv", model.type()); - Assertions.assertEquals("lrmv", model.userAssigned().resourceId()); + Assertions.assertEquals("xywpmueefjzwfqkq", model.type()); + Assertions.assertEquals("dsuyonobgla", model.userAssigned().resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IdentityProperties model = new IdentityProperties().withType("qrvkdv") - .withUserAssigned(new UserAssignedProperties().withResourceId("lrmv")); + IdentityProperties model = new IdentityProperties().withType("xywpmueefjzwfqkq") + .withUserAssigned(new UserAssignedProperties().withResourceId("dsuyonobgla")); model = BinaryData.fromObject(model).toObject(IdentityProperties.class); - Assertions.assertEquals("qrvkdv", model.type()); - Assertions.assertEquals("lrmv", model.userAssigned().resourceId()); + Assertions.assertEquals("xywpmueefjzwfqkq", model.type()); + Assertions.assertEquals("dsuyonobgla", model.userAssigned().resourceId()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobDeliveryInfoTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobDeliveryInfoTests.java index 2fc1b63f88445..e7a3fe0043ebb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobDeliveryInfoTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobDeliveryInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,15 +13,15 @@ public final class JobDeliveryInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobDeliveryInfo model - = BinaryData.fromString("{\"scheduledDateTime\":\"2021-11-01T14:14:41Z\"}").toObject(JobDeliveryInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T14:14:41Z"), model.scheduledDateTime()); + = BinaryData.fromString("{\"scheduledDateTime\":\"2021-12-02T03:16:54Z\"}").toObject(JobDeliveryInfo.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T03:16:54Z"), model.scheduledDateTime()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { JobDeliveryInfo model - = new JobDeliveryInfo().withScheduledDateTime(OffsetDateTime.parse("2021-11-01T14:14:41Z")); + = new JobDeliveryInfo().withScheduledDateTime(OffsetDateTime.parse("2021-12-02T03:16:54Z")); model = BinaryData.fromObject(model).toObject(JobDeliveryInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-01T14:14:41Z"), model.scheduledDateTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T03:16:54Z"), model.scheduledDateTime()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpWithResponseMockTests.java index c1c0e7a9dcdb9..22e975da2954d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpWithResponseMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -20,7 +20,7 @@ public final class JobsBookShipmentPickUpWithResponseMockTests { @Test public void testBookShipmentPickUpWithResponse() throws Exception { - String responseStr = "{\"confirmationNumber\":\"s\",\"readyByTime\":\"2021-06-13T17:46:53Z\"}"; + String responseStr = "{\"confirmationNumber\":\"zdmsyqtfi\",\"readyByTime\":\"2020-12-25T23:20:44Z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,10 +30,10 @@ public void testBookShipmentPickUpWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ShipmentPickUpResponse response = manager.jobs() - .bookShipmentPickUpWithResponse("kkgll", "wjygvjayvblmhvk", - new ShipmentPickUpRequest().withStartTime(OffsetDateTime.parse("2021-11-27T02:03:43Z")) - .withEndTime(OffsetDateTime.parse("2021-12-10T06:42:49Z")) - .withShipmentLocation("xvvy"), + .bookShipmentPickUpWithResponse("hhahhxvrhmzkwpjg", "wspughftqsxhqx", + new ShipmentPickUpRequest().withStartTime(OffsetDateTime.parse("2020-12-22T03:09:08Z")) + .withEndTime(OffsetDateTime.parse("2021-01-21T16:10:27Z")) + .withShipmentLocation("ukndxdigrjgu"), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsCancelWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsCancelWithResponseMockTests.java index befe6f0b53f80..5ccbb91834586 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsCancelWithResponseMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsCancelWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -29,7 +29,7 @@ public void testCancelWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.jobs() - .cancelWithResponse("yrqufegxuvwz", "bnhlmc", new CancellationReason().withReason("l"), + .cancelWithResponse("botzingamvppho", "zqzudph", new CancellationReason().withReason("amvdkfwynwcvtbv"), com.azure.core.util.Context.NONE); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsDeleteMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsDeleteMockTests.java index 87b4c55f3cff2..93bce9779b897 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsDeleteMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.jobs().delete("x", "v", com.azure.core.util.Context.NONE); + manager.jobs().delete("budurgkakmo", "zhjjklffhmouwq", com.azure.core.util.Context.NONE); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedWithResponseMockTests.java index 3099b64870b35..df54ee9c8de94 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedWithResponseMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -30,9 +30,9 @@ public void testMarkDevicesShippedWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.jobs() - .markDevicesShippedWithResponse("j", "ukndxdigrjgu", + .markDevicesShippedWithResponse("yajguqfhwygzlv", "nk", new MarkDevicesShippedRequest().withDeliverToDcPackageDetails( - new PackageCarrierInfo().withCarrierName("zdmsyqtfi").withTrackingId("hbotzingamvppho")), + new PackageCarrierInfo().withCarrierName("usemdwzrmuhap").withTrackingId("qdpsqxqvpsvu")), com.azure.core.util.Context.NONE); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/KeyEncryptionKeyTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/KeyEncryptionKeyTests.java index 09f090f4bc5af..a133cda7ab6f4 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/KeyEncryptionKeyTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/KeyEncryptionKeyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,27 +15,27 @@ public final class KeyEncryptionKeyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KeyEncryptionKey model = BinaryData.fromString( - "{\"kekType\":\"MicrosoftManaged\",\"identityProperties\":{\"type\":\"ddystkiiuxhqy\",\"userAssigned\":{\"resourceId\":\"o\"}},\"kekUrl\":\"qn\",\"kekVaultResourceID\":\"oczvy\"}") + "{\"kekType\":\"CustomerManaged\",\"identityProperties\":{\"type\":\"ywpnvjt\",\"userAssigned\":{\"resourceId\":\"ermclfplphoxuscr\"}},\"kekUrl\":\"bgyepsbj\",\"kekVaultResourceID\":\"zq\"}") .toObject(KeyEncryptionKey.class); - Assertions.assertEquals(KekType.MICROSOFT_MANAGED, model.kekType()); - Assertions.assertEquals("ddystkiiuxhqy", model.identityProperties().type()); - Assertions.assertEquals("o", model.identityProperties().userAssigned().resourceId()); - Assertions.assertEquals("qn", model.kekUrl()); - Assertions.assertEquals("oczvy", model.kekVaultResourceId()); + Assertions.assertEquals(KekType.CUSTOMER_MANAGED, model.kekType()); + Assertions.assertEquals("ywpnvjt", model.identityProperties().type()); + Assertions.assertEquals("ermclfplphoxuscr", model.identityProperties().userAssigned().resourceId()); + Assertions.assertEquals("bgyepsbj", model.kekUrl()); + Assertions.assertEquals("zq", model.kekVaultResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - KeyEncryptionKey model = new KeyEncryptionKey().withKekType(KekType.MICROSOFT_MANAGED) - .withIdentityProperties(new IdentityProperties().withType("ddystkiiuxhqy") - .withUserAssigned(new UserAssignedProperties().withResourceId("o"))) - .withKekUrl("qn") - .withKekVaultResourceId("oczvy"); + KeyEncryptionKey model = new KeyEncryptionKey().withKekType(KekType.CUSTOMER_MANAGED) + .withIdentityProperties(new IdentityProperties().withType("ywpnvjt") + .withUserAssigned(new UserAssignedProperties().withResourceId("ermclfplphoxuscr"))) + .withKekUrl("bgyepsbj") + .withKekVaultResourceId("zq"); model = BinaryData.fromObject(model).toObject(KeyEncryptionKey.class); - Assertions.assertEquals(KekType.MICROSOFT_MANAGED, model.kekType()); - Assertions.assertEquals("ddystkiiuxhqy", model.identityProperties().type()); - Assertions.assertEquals("o", model.identityProperties().userAssigned().resourceId()); - Assertions.assertEquals("qn", model.kekUrl()); - Assertions.assertEquals("oczvy", model.kekVaultResourceId()); + Assertions.assertEquals(KekType.CUSTOMER_MANAGED, model.kekType()); + Assertions.assertEquals("ywpnvjt", model.identityProperties().type()); + Assertions.assertEquals("ermclfplphoxuscr", model.identityProperties().userAssigned().resourceId()); + Assertions.assertEquals("bgyepsbj", model.kekUrl()); + Assertions.assertEquals("zq", model.kekVaultResourceId()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/LastMitigationActionOnJobTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/LastMitigationActionOnJobTests.java index 965e364c6d2db..77cf91aa31682 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/LastMitigationActionOnJobTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/LastMitigationActionOnJobTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -14,22 +14,10 @@ public final class LastMitigationActionOnJobTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LastMitigationActionOnJob model = BinaryData.fromString( - "{\"actionDateTimeInUtc\":\"2021-12-05T03:26:34Z\",\"isPerformedByCustomer\":true,\"customerResolution\":\"None\"}") + "{\"actionDateTimeInUtc\":\"2021-04-24T05:00:51Z\",\"isPerformedByCustomer\":true,\"customerResolution\":\"Restart\"}") .toObject(LastMitigationActionOnJob.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-05T03:26:34Z"), model.actionDateTimeInUtc()); - Assertions.assertEquals(true, model.isPerformedByCustomer()); - Assertions.assertEquals(CustomerResolutionCode.NONE, model.customerResolution()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LastMitigationActionOnJob model - = new LastMitigationActionOnJob().withActionDateTimeInUtc(OffsetDateTime.parse("2021-12-05T03:26:34Z")) - .withIsPerformedByCustomer(true) - .withCustomerResolution(CustomerResolutionCode.NONE); - model = BinaryData.fromObject(model).toObject(LastMitigationActionOnJob.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-05T03:26:34Z"), model.actionDateTimeInUtc()); - Assertions.assertEquals(true, model.isPerformedByCustomer()); - Assertions.assertEquals(CustomerResolutionCode.NONE, model.customerResolution()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-24T05:00:51Z"), model.actionDateTimeInUtc()); + Assertions.assertTrue(model.isPerformedByCustomer()); + Assertions.assertEquals(CustomerResolutionCode.RESTART, model.customerResolution()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/MarkDevicesShippedRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/MarkDevicesShippedRequestTests.java index 87454a0a85a10..15d36d4268f34 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/MarkDevicesShippedRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/MarkDevicesShippedRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,19 +13,18 @@ public final class MarkDevicesShippedRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarkDevicesShippedRequest model = BinaryData - .fromString( - "{\"deliverToDcPackageDetails\":{\"carrierName\":\"pocipazyxoegu\",\"trackingId\":\"jnpiucgyg\"}}") + .fromString("{\"deliverToDcPackageDetails\":{\"carrierName\":\"oygmift\",\"trackingId\":\"zdnds\"}}") .toObject(MarkDevicesShippedRequest.class); - Assertions.assertEquals("pocipazyxoegu", model.deliverToDcPackageDetails().carrierName()); - Assertions.assertEquals("jnpiucgyg", model.deliverToDcPackageDetails().trackingId()); + Assertions.assertEquals("oygmift", model.deliverToDcPackageDetails().carrierName()); + Assertions.assertEquals("zdnds", model.deliverToDcPackageDetails().trackingId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MarkDevicesShippedRequest model = new MarkDevicesShippedRequest().withDeliverToDcPackageDetails( - new PackageCarrierInfo().withCarrierName("pocipazyxoegu").withTrackingId("jnpiucgyg")); + MarkDevicesShippedRequest model = new MarkDevicesShippedRequest() + .withDeliverToDcPackageDetails(new PackageCarrierInfo().withCarrierName("oygmift").withTrackingId("zdnds")); model = BinaryData.fromObject(model).toObject(MarkDevicesShippedRequest.class); - Assertions.assertEquals("pocipazyxoegu", model.deliverToDcPackageDetails().carrierName()); - Assertions.assertEquals("jnpiucgyg", model.deliverToDcPackageDetails().trackingId()); + Assertions.assertEquals("oygmift", model.deliverToDcPackageDetails().carrierName()); + Assertions.assertEquals("zdnds", model.deliverToDcPackageDetails().trackingId()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/NotificationPreferenceTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/NotificationPreferenceTests.java index 6684c8d8ed347..9a99ef94060b1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/NotificationPreferenceTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/NotificationPreferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,18 +12,18 @@ public final class NotificationPreferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NotificationPreference model = BinaryData.fromString("{\"stageName\":\"DataCopy\",\"sendNotification\":true}") + NotificationPreference model = BinaryData.fromString("{\"stageName\":\"Created\",\"sendNotification\":true}") .toObject(NotificationPreference.class); - Assertions.assertEquals(NotificationStageName.DATA_COPY, model.stageName()); - Assertions.assertEquals(true, model.sendNotification()); + Assertions.assertEquals(NotificationStageName.CREATED, model.stageName()); + Assertions.assertTrue(model.sendNotification()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NotificationPreference model - = new NotificationPreference().withStageName(NotificationStageName.DATA_COPY).withSendNotification(true); + = new NotificationPreference().withStageName(NotificationStageName.CREATED).withSendNotification(true); model = BinaryData.fromObject(model).toObject(NotificationPreference.class); - Assertions.assertEquals(NotificationStageName.DATA_COPY, model.stageName()); - Assertions.assertEquals(true, model.sendNotification()); + Assertions.assertEquals(NotificationStageName.CREATED, model.stageName()); + Assertions.assertTrue(model.sendNotification()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationDisplayTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationDisplayTests.java index af2bdd435164d..80a9d7c53ded8 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationDisplayTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,24 +12,11 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"bifpikxwczb\",\"resource\":\"cnpqxuhivyqniwby\",\"operation\":\"k\",\"description\":\"dumjgrtfwvuk\"}") + "{\"provider\":\"xvd\",\"resource\":\"jgrtfwvukxga\",\"operation\":\"ccsnhsjc\",\"description\":\"ejhkry\"}") .toObject(OperationDisplay.class); - Assertions.assertEquals("bifpikxwczb", model.provider()); - Assertions.assertEquals("cnpqxuhivyqniwby", model.resource()); - Assertions.assertEquals("k", model.operation()); - Assertions.assertEquals("dumjgrtfwvuk", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("bifpikxwczb") - .withResource("cnpqxuhivyqniwby") - .withOperation("k") - .withDescription("dumjgrtfwvuk"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("bifpikxwczb", model.provider()); - Assertions.assertEquals("cnpqxuhivyqniwby", model.resource()); - Assertions.assertEquals("k", model.operation()); - Assertions.assertEquals("dumjgrtfwvuk", model.description()); + Assertions.assertEquals("xvd", model.provider()); + Assertions.assertEquals("jgrtfwvukxga", model.resource()); + Assertions.assertEquals("ccsnhsjc", model.operation()); + Assertions.assertEquals("ejhkry", model.description()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationInnerTests.java index 6b716c3b62c18..ec37874a2c7f5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationInnerTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,15 +12,8 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"rqobmtuk\",\"display\":{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"},\"properties\":\"dataa\",\"origin\":\"th\",\"isDataAction\":false}") + "{\"name\":\"cbjy\",\"display\":{\"provider\":\"ithxqhabifpi\",\"resource\":\"wczbys\",\"operation\":\"pqxu\",\"description\":\"vyq\"},\"properties\":{},\"origin\":\"b\",\"isDataAction\":false}") .toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withIsDataAction(false); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); + Assertions.assertFalse(model.isDataAction()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationListTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationListTests.java index 948e4a59dc787..a49c851d90482 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationListTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.OperationList; +import com.azure.resourcemanager.databox.implementation.models.OperationList; import org.junit.jupiter.api.Assertions; public final class OperationListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationList model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"properties\":\"dataownoizhw\",\"origin\":\"xybqsoqij\",\"isDataAction\":true},{\"name\":\"bpazlobcufpdzn\",\"display\":{\"provider\":\"cqqjnqglhqgn\",\"resource\":\"ooojywifsqe\",\"operation\":\"agdfmglzlh\",\"description\":\"rifkwm\"},\"properties\":\"dataktsizntocipaou\",\"origin\":\"psqucmpoyf\",\"isDataAction\":true},{\"name\":\"gknygjofjddeqs\",\"display\":{\"provider\":\"upewnwreitjzy\",\"resource\":\"usarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"properties\":\"datatxukcdmp\",\"origin\":\"cryuan\",\"isDataAction\":false}],\"nextLink\":\"zdxtayrlhmwhf\"}") + "{\"value\":[{\"name\":\"vgjxpybczm\",\"display\":{\"provider\":\"tzopbsphrupidgsy\",\"resource\":\"ejhphoyc\",\"operation\":\"xaobhdxbmtqioqjz\",\"description\":\"tbmufpo\"},\"properties\":{},\"origin\":\"izhwlrxy\",\"isDataAction\":false},{\"name\":\"qijgkd\",\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"properties\":{},\"origin\":\"wmrvktsizntocipa\",\"isDataAction\":false},{\"name\":\"psqucmpoyf\",\"display\":{\"provider\":\"ogknygjofjdd\",\"resource\":\"s\",\"operation\":\"eupewnwreitjz\",\"description\":\"lusarh\"},\"properties\":{},\"origin\":\"cqhsm\",\"isDataAction\":false},{\"name\":\"dtmlxhekuksjt\",\"display\":{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"},\"properties\":{},\"origin\":\"jbpzvgnwzsymg\",\"isDataAction\":false}],\"nextLink\":\"cyzkohdbihanuf\"}") .toObject(OperationList.class); - Assertions.assertEquals("zdxtayrlhmwhf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationList model = new OperationList().withNextLink("zdxtayrlhmwhf"); - model = BinaryData.fromObject(model).toObject(OperationList.class); - Assertions.assertEquals("zdxtayrlhmwhf", model.nextLink()); + Assertions.assertEquals("cyzkohdbihanuf", model.nextLink()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationPropertiesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationPropertiesTests.java new file mode 100644 index 0000000000000..776a0e3050e7c --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationPropertiesTests.java @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.databox.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.databox.fluent.models.OperationProperties; + +public final class OperationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationProperties model = BinaryData.fromString("{}").toObject(OperationProperties.class); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationsListMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationsListMockTests.java index e104df5862257..ae639ef7b1139 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationsListMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -22,7 +22,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"t\",\"display\":{\"provider\":\"bi\",\"resource\":\"gpikpzimejza\",\"operation\":\"fzxiavrmb\",\"description\":\"nokixrjqcirgz\"},\"properties\":\"datarlazszrnw\",\"origin\":\"indfpwpjyl\",\"isDataAction\":true}]}"; + = "{\"value\":[{\"name\":\"vu\",\"display\":{\"provider\":\"aehtwd\",\"resource\":\"ftswibyrcdlbhsh\",\"operation\":\"p\",\"description\":\"cstwity\"},\"properties\":{},\"origin\":\"vxccedcp\",\"isDataAction\":true}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,6 +33,6 @@ public void testList() throws Exception { PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); + Assertions.assertTrue(response.iterator().next().isDataAction()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierDetailsTests.java index b6200f40fb80a..759f24f620118 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,21 +12,21 @@ public final class PackageCarrierDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PackageCarrierDetails model = BinaryData.fromString( - "{\"carrierAccountNumber\":\"dnbbglzps\",\"carrierName\":\"ydmcwyhzdxssa\",\"trackingId\":\"zmnvdfznudaod\"}") + "{\"carrierAccountNumber\":\"gbquxigj\",\"carrierName\":\"gzjaoyfhrtxilne\",\"trackingId\":\"ujysvle\"}") .toObject(PackageCarrierDetails.class); - Assertions.assertEquals("dnbbglzps", model.carrierAccountNumber()); - Assertions.assertEquals("ydmcwyhzdxssa", model.carrierName()); - Assertions.assertEquals("zmnvdfznudaod", model.trackingId()); + Assertions.assertEquals("gbquxigj", model.carrierAccountNumber()); + Assertions.assertEquals("gzjaoyfhrtxilne", model.carrierName()); + Assertions.assertEquals("ujysvle", model.trackingId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PackageCarrierDetails model = new PackageCarrierDetails().withCarrierAccountNumber("dnbbglzps") - .withCarrierName("ydmcwyhzdxssa") - .withTrackingId("zmnvdfznudaod"); + PackageCarrierDetails model = new PackageCarrierDetails().withCarrierAccountNumber("gbquxigj") + .withCarrierName("gzjaoyfhrtxilne") + .withTrackingId("ujysvle"); model = BinaryData.fromObject(model).toObject(PackageCarrierDetails.class); - Assertions.assertEquals("dnbbglzps", model.carrierAccountNumber()); - Assertions.assertEquals("ydmcwyhzdxssa", model.carrierName()); - Assertions.assertEquals("zmnvdfznudaod", model.trackingId()); + Assertions.assertEquals("gbquxigj", model.carrierAccountNumber()); + Assertions.assertEquals("gzjaoyfhrtxilne", model.carrierName()); + Assertions.assertEquals("ujysvle", model.trackingId()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierInfoTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierInfoTests.java index d34fddfc67855..d61ed2fdd0d24 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierInfoTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageCarrierInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,17 +11,17 @@ public final class PackageCarrierInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PackageCarrierInfo model = BinaryData.fromString("{\"carrierName\":\"qzntypm\",\"trackingId\":\"p\"}") + PackageCarrierInfo model = BinaryData.fromString("{\"carrierName\":\"htqqrolfp\",\"trackingId\":\"s\"}") .toObject(PackageCarrierInfo.class); - Assertions.assertEquals("qzntypm", model.carrierName()); - Assertions.assertEquals("p", model.trackingId()); + Assertions.assertEquals("htqqrolfp", model.carrierName()); + Assertions.assertEquals("s", model.trackingId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PackageCarrierInfo model = new PackageCarrierInfo().withCarrierName("qzntypm").withTrackingId("p"); + PackageCarrierInfo model = new PackageCarrierInfo().withCarrierName("htqqrolfp").withTrackingId("s"); model = BinaryData.fromObject(model).toObject(PackageCarrierInfo.class); - Assertions.assertEquals("qzntypm", model.carrierName()); - Assertions.assertEquals("p", model.trackingId()); + Assertions.assertEquals("htqqrolfp", model.carrierName()); + Assertions.assertEquals("s", model.trackingId()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageShippingDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageShippingDetailsTests.java index 8131268cbeaf7..e2a88dfb6f39d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageShippingDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageShippingDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class PackageShippingDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PackageShippingDetails model = BinaryData - .fromString("{\"trackingUrl\":\"yb\",\"carrierName\":\"qedqytbciqfoufl\",\"trackingId\":\"nkzsmodmglou\"}") + .fromString("{\"trackingUrl\":\"suesnzw\",\"carrierName\":\"jbavorxzdm\",\"trackingId\":\"ctbqvudwx\"}") .toObject(PackageShippingDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PackageShippingDetails model = new PackageShippingDetails(); - model = BinaryData.fromObject(model).toObject(PackageShippingDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesTests.java index 5b4cac67318c0..8cc4bc97369c0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -18,37 +18,36 @@ public final class PreferencesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Preferences model = BinaryData.fromString( - "{\"preferredDataCenterRegion\":[\"ugw\",\"kcglhslaz\",\"dyggdtjixhbku\"],\"transportPreferences\":{\"preferredShipmentType\":\"MicrosoftManaged\",\"isUpdated\":false},\"reverseTransportPreferences\":{\"preferredShipmentType\":\"CustomerManaged\",\"isUpdated\":true},\"encryptionPreferences\":{\"doubleEncryption\":\"Disabled\",\"hardwareEncryption\":\"Enabled\"},\"storageAccountAccessTierPreferences\":[\"xfw\",\"ybcibvyvdcsit\"]}") + "{\"preferredDataCenterRegion\":[\"czfc\",\"haaxdbabphl\"],\"transportPreferences\":{\"preferredShipmentType\":\"MicrosoftManaged\",\"isUpdated\":false},\"reverseTransportPreferences\":{\"preferredShipmentType\":\"MicrosoftManaged\",\"isUpdated\":false},\"encryptionPreferences\":{\"doubleEncryption\":\"Enabled\",\"hardwareEncryption\":\"Disabled\"},\"storageAccountAccessTierPreferences\":[\"nyyazttbtwwrqpue\",\"ckzywbiexzfeyue\"]}") .toObject(Preferences.class); - Assertions.assertEquals("ugw", model.preferredDataCenterRegion().get(0)); + Assertions.assertEquals("czfc", model.preferredDataCenterRegion().get(0)); Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.transportPreferences().preferredShipmentType()); - Assertions.assertEquals(TransportShipmentTypes.CUSTOMER_MANAGED, + Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.reverseTransportPreferences().preferredShipmentType()); - Assertions.assertEquals(DoubleEncryption.DISABLED, model.encryptionPreferences().doubleEncryption()); - Assertions.assertEquals(HardwareEncryption.ENABLED, model.encryptionPreferences().hardwareEncryption()); - Assertions.assertEquals("xfw", model.storageAccountAccessTierPreferences().get(0)); + Assertions.assertEquals(DoubleEncryption.ENABLED, model.encryptionPreferences().doubleEncryption()); + Assertions.assertEquals(HardwareEncryption.DISABLED, model.encryptionPreferences().hardwareEncryption()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.storageAccountAccessTierPreferences().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Preferences model - = new Preferences().withPreferredDataCenterRegion(Arrays.asList("ugw", "kcglhslaz", "dyggdtjixhbku")) - .withTransportPreferences( - new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)) - .withReverseTransportPreferences( - new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.CUSTOMER_MANAGED)) - .withEncryptionPreferences(new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.DISABLED) - .withHardwareEncryption(HardwareEncryption.ENABLED)) - .withStorageAccountAccessTierPreferences(Arrays.asList("xfw", "ybcibvyvdcsit")); + Preferences model = new Preferences().withPreferredDataCenterRegion(Arrays.asList("czfc", "haaxdbabphl")) + .withTransportPreferences( + new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)) + .withReverseTransportPreferences( + new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)) + .withEncryptionPreferences(new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED) + .withHardwareEncryption(HardwareEncryption.DISABLED)) + .withStorageAccountAccessTierPreferences(Arrays.asList("nyyazttbtwwrqpue", "ckzywbiexzfeyue")); model = BinaryData.fromObject(model).toObject(Preferences.class); - Assertions.assertEquals("ugw", model.preferredDataCenterRegion().get(0)); + Assertions.assertEquals("czfc", model.preferredDataCenterRegion().get(0)); Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.transportPreferences().preferredShipmentType()); - Assertions.assertEquals(TransportShipmentTypes.CUSTOMER_MANAGED, + Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.reverseTransportPreferences().preferredShipmentType()); - Assertions.assertEquals(DoubleEncryption.DISABLED, model.encryptionPreferences().doubleEncryption()); - Assertions.assertEquals(HardwareEncryption.ENABLED, model.encryptionPreferences().hardwareEncryption()); - Assertions.assertEquals("xfw", model.storageAccountAccessTierPreferences().get(0)); + Assertions.assertEquals(DoubleEncryption.ENABLED, model.encryptionPreferences().doubleEncryption()); + Assertions.assertEquals(HardwareEncryption.DISABLED, model.encryptionPreferences().hardwareEncryption()); + Assertions.assertEquals("nyyazttbtwwrqpue", model.storageAccountAccessTierPreferences().get(0)); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesValidationRequestTests.java index e5e161e004a2f..20f196bac96fb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesValidationRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesValidationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -21,48 +21,48 @@ public final class PreferencesValidationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PreferencesValidationRequest model = BinaryData.fromString( - "{\"validationType\":\"ValidatePreferences\",\"preference\":{\"preferredDataCenterRegion\":[\"ejhzisxg\",\"pelol\"],\"transportPreferences\":{\"preferredShipmentType\":\"CustomerManaged\",\"isUpdated\":false},\"reverseTransportPreferences\":{\"preferredShipmentType\":\"MicrosoftManaged\",\"isUpdated\":false},\"encryptionPreferences\":{\"doubleEncryption\":\"Enabled\",\"hardwareEncryption\":\"Enabled\"},\"storageAccountAccessTierPreferences\":[\"twdw\",\"ftswibyrcdlbhsh\",\"wpracstwitykhev\",\"c\"]},\"deviceType\":\"DataBoxCustomerDisk\",\"model\":\"DataBoxCustomerDisk\"}") + "{\"validationType\":\"ValidatePreferences\",\"preference\":{\"preferredDataCenterRegion\":[\"phsdyhto\",\"fikdowwqu\",\"v\",\"zx\"],\"transportPreferences\":{\"preferredShipmentType\":\"CustomerManaged\",\"isUpdated\":true},\"reverseTransportPreferences\":{\"preferredShipmentType\":\"MicrosoftManaged\",\"isUpdated\":false},\"encryptionPreferences\":{\"doubleEncryption\":\"Enabled\",\"hardwareEncryption\":\"Disabled\"},\"storageAccountAccessTierPreferences\":[\"hcohfwdsjnk\"]},\"deviceType\":\"DataBoxDisk\",\"model\":\"DataBoxDisk\"}") .toObject(PreferencesValidationRequest.class); - Assertions.assertEquals("ejhzisxg", model.preference().preferredDataCenterRegion().get(0)); + Assertions.assertEquals("phsdyhto", model.preference().preferredDataCenterRegion().get(0)); Assertions.assertEquals(TransportShipmentTypes.CUSTOMER_MANAGED, model.preference().transportPreferences().preferredShipmentType()); Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.preference().reverseTransportPreferences().preferredShipmentType()); Assertions.assertEquals(DoubleEncryption.ENABLED, model.preference().encryptionPreferences().doubleEncryption()); - Assertions.assertEquals(HardwareEncryption.ENABLED, + Assertions.assertEquals(HardwareEncryption.DISABLED, model.preference().encryptionPreferences().hardwareEncryption()); - Assertions.assertEquals("twdw", model.preference().storageAccountAccessTierPreferences().get(0)); - Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.deviceType()); - Assertions.assertEquals(ModelName.DATA_BOX_CUSTOMER_DISK, model.model()); + Assertions.assertEquals("hcohfwdsjnk", model.preference().storageAccountAccessTierPreferences().get(0)); + Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); + Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PreferencesValidationRequest model = new PreferencesValidationRequest() - .withPreference(new Preferences().withPreferredDataCenterRegion(Arrays.asList("ejhzisxg", "pelol")) + .withPreference(new Preferences() + .withPreferredDataCenterRegion(Arrays.asList("phsdyhto", "fikdowwqu", "v", "zx")) .withTransportPreferences( new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.CUSTOMER_MANAGED)) .withReverseTransportPreferences( new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)) .withEncryptionPreferences(new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED) - .withHardwareEncryption(HardwareEncryption.ENABLED)) - .withStorageAccountAccessTierPreferences( - Arrays.asList("twdw", "ftswibyrcdlbhsh", "wpracstwitykhev", "c"))) - .withDeviceType(SkuName.DATA_BOX_CUSTOMER_DISK) - .withModel(ModelName.DATA_BOX_CUSTOMER_DISK); + .withHardwareEncryption(HardwareEncryption.DISABLED)) + .withStorageAccountAccessTierPreferences(Arrays.asList("hcohfwdsjnk"))) + .withDeviceType(SkuName.DATA_BOX_DISK) + .withModel(ModelName.DATA_BOX_DISK); model = BinaryData.fromObject(model).toObject(PreferencesValidationRequest.class); - Assertions.assertEquals("ejhzisxg", model.preference().preferredDataCenterRegion().get(0)); + Assertions.assertEquals("phsdyhto", model.preference().preferredDataCenterRegion().get(0)); Assertions.assertEquals(TransportShipmentTypes.CUSTOMER_MANAGED, model.preference().transportPreferences().preferredShipmentType()); Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.preference().reverseTransportPreferences().preferredShipmentType()); Assertions.assertEquals(DoubleEncryption.ENABLED, model.preference().encryptionPreferences().doubleEncryption()); - Assertions.assertEquals(HardwareEncryption.ENABLED, + Assertions.assertEquals(HardwareEncryption.DISABLED, model.preference().encryptionPreferences().hardwareEncryption()); - Assertions.assertEquals("twdw", model.preference().storageAccountAccessTierPreferences().get(0)); - Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.deviceType()); - Assertions.assertEquals(ModelName.DATA_BOX_CUSTOMER_DISK, model.model()); + Assertions.assertEquals("hcohfwdsjnk", model.preference().storageAccountAccessTierPreferences().get(0)); + Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); + Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationRequestTests.java index 8cc17d4bf766f..d4e2c7ad3565b 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -18,43 +18,43 @@ public final class RegionConfigurationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionConfigurationRequest model = BinaryData.fromString( - "{\"scheduleAvailabilityRequest\":{\"skuName\":\"ScheduleAvailabilityRequest\",\"storageLocation\":\"esl\",\"country\":\"k\",\"model\":\"AzureDataBox120\"},\"transportAvailabilityRequest\":{\"skuName\":\"DataBoxDisk\",\"model\":\"DataBoxDisk\"},\"datacenterAddressRequest\":{\"storageLocation\":\"xogaokonzmnsikv\",\"skuName\":\"DataBox\",\"model\":\"DataBoxHeavy\"},\"deviceCapabilityRequest\":{\"skuName\":\"DataBoxDisk\",\"model\":\"AzureDataBox120\"}}") + "{\"scheduleAvailabilityRequest\":{\"skuName\":\"ScheduleAvailabilityRequest\",\"storageLocation\":\"nayqi\",\"country\":\"nduhavhqlkthum\",\"model\":\"DataBoxHeavy\"},\"transportAvailabilityRequest\":{\"skuName\":\"DataBoxDisk\",\"model\":\"AzureDataBox120\"},\"datacenterAddressRequest\":{\"storageLocation\":\"uie\",\"skuName\":\"DataBoxCustomerDisk\",\"model\":\"DataBox\"},\"deviceCapabilityRequest\":{\"skuName\":\"DataBoxDisk\",\"model\":\"DataBoxDisk\"}}") .toObject(RegionConfigurationRequest.class); - Assertions.assertEquals("esl", model.scheduleAvailabilityRequest().storageLocation()); - Assertions.assertEquals("k", model.scheduleAvailabilityRequest().country()); - Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.scheduleAvailabilityRequest().model()); + Assertions.assertEquals("nayqi", model.scheduleAvailabilityRequest().storageLocation()); + Assertions.assertEquals("nduhavhqlkthum", model.scheduleAvailabilityRequest().country()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.scheduleAvailabilityRequest().model()); Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.transportAvailabilityRequest().skuName()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.transportAvailabilityRequest().model()); - Assertions.assertEquals("xogaokonzmnsikv", model.datacenterAddressRequest().storageLocation()); - Assertions.assertEquals(SkuName.DATA_BOX, model.datacenterAddressRequest().skuName()); - Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.datacenterAddressRequest().model()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.transportAvailabilityRequest().model()); + Assertions.assertEquals("uie", model.datacenterAddressRequest().storageLocation()); + Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.datacenterAddressRequest().skuName()); + Assertions.assertEquals(ModelName.DATA_BOX, model.datacenterAddressRequest().model()); Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceCapabilityRequest().skuName()); - Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.deviceCapabilityRequest().model()); + Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.deviceCapabilityRequest().model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RegionConfigurationRequest model = new RegionConfigurationRequest() - .withScheduleAvailabilityRequest(new ScheduleAvailabilityRequest().withStorageLocation("esl") - .withCountry("k") - .withModel(ModelName.AZURE_DATA_BOX120)) - .withTransportAvailabilityRequest(new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_DISK) - .withModel(ModelName.DATA_BOX_DISK)) - .withDatacenterAddressRequest(new DatacenterAddressRequest().withStorageLocation("xogaokonzmnsikv") - .withSkuName(SkuName.DATA_BOX) + .withScheduleAvailabilityRequest(new ScheduleAvailabilityRequest().withStorageLocation("nayqi") + .withCountry("nduhavhqlkthum") .withModel(ModelName.DATA_BOX_HEAVY)) - .withDeviceCapabilityRequest(new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_DISK) - .withModel(ModelName.AZURE_DATA_BOX120)); + .withTransportAvailabilityRequest(new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_DISK) + .withModel(ModelName.AZURE_DATA_BOX120)) + .withDatacenterAddressRequest(new DatacenterAddressRequest().withStorageLocation("uie") + .withSkuName(SkuName.DATA_BOX_CUSTOMER_DISK) + .withModel(ModelName.DATA_BOX)) + .withDeviceCapabilityRequest( + new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_DISK).withModel(ModelName.DATA_BOX_DISK)); model = BinaryData.fromObject(model).toObject(RegionConfigurationRequest.class); - Assertions.assertEquals("esl", model.scheduleAvailabilityRequest().storageLocation()); - Assertions.assertEquals("k", model.scheduleAvailabilityRequest().country()); - Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.scheduleAvailabilityRequest().model()); + Assertions.assertEquals("nayqi", model.scheduleAvailabilityRequest().storageLocation()); + Assertions.assertEquals("nduhavhqlkthum", model.scheduleAvailabilityRequest().country()); + Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.scheduleAvailabilityRequest().model()); Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.transportAvailabilityRequest().skuName()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.transportAvailabilityRequest().model()); - Assertions.assertEquals("xogaokonzmnsikv", model.datacenterAddressRequest().storageLocation()); - Assertions.assertEquals(SkuName.DATA_BOX, model.datacenterAddressRequest().skuName()); - Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.datacenterAddressRequest().model()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.transportAvailabilityRequest().model()); + Assertions.assertEquals("uie", model.datacenterAddressRequest().storageLocation()); + Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.datacenterAddressRequest().skuName()); + Assertions.assertEquals(ModelName.DATA_BOX, model.datacenterAddressRequest().model()); Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceCapabilityRequest().skuName()); - Assertions.assertEquals(ModelName.AZURE_DATA_BOX120, model.deviceCapabilityRequest().model()); + Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.deviceCapabilityRequest().model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationResponseInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationResponseInnerTests.java index fb12e38667a64..7a5720d96c95f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationResponseInnerTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class RegionConfigurationResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionConfigurationResponseInner model = BinaryData.fromString( - "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-09-19T17:10:39Z\",\"2021-01-16T00:33:56Z\",\"2021-01-22T07:28:26Z\",\"2021-11-13T02:15:02Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"MicrosoftManaged\"},{\"shipmentType\":\"MicrosoftManaged\"}]},\"datacenterAddressResponse\":{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"podxunkb\",\"bxmubyynt\",\"lrb\",\"tkoievseotgq\"],\"dataCenterAzureLocation\":\"ltmuwlauwzizx\"},\"deviceCapabilityResponse\":{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Disabled\"}]}}") + "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-03-20T05:47:35Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"CustomerManaged\"}]},\"datacenterAddressResponse\":{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"shhszhedplvwiw\",\"bmwmbesldnkw\",\"tppjflcx\"],\"dataCenterAzureLocation\":\"aokonzmnsik\"},\"deviceCapabilityResponse\":{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Enabled\"},{\"hardwareEncryption\":\"Enabled\"},{\"hardwareEncryption\":\"Enabled\"}]}}") .toObject(RegionConfigurationResponseInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionConfigurationResponseInner model = new RegionConfigurationResponseInner(); - model = BinaryData.fromObject(model).toObject(RegionConfigurationResponseInner.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ResourceIdentityTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ResourceIdentityTests.java index 819a31bab49e1..29121089c6bb0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ResourceIdentityTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ResourceIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,18 +15,17 @@ public final class ResourceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceIdentity model = BinaryData.fromString( - "{\"type\":\"mvxi\",\"principalId\":\"uugidyjrrfby\",\"tenantId\":\"svexcsonpclhoco\",\"userAssignedIdentities\":{\"fmvfaxkffeiit\":{\"principalId\":\"ev\",\"clientId\":\"ggzfbu\"},\"xwburvjxxjns\":{\"principalId\":\"vmezy\",\"clientId\":\"hxmzsbbzoggig\"}}}") + "{\"type\":\"dxwitx\",\"principalId\":\"jawgqwg\",\"tenantId\":\"ni\",\"userAssignedIdentities\":{\"nhjdauw\":{\"principalId\":\"bkpyc\",\"clientId\":\"lwn\"}}}") .toObject(ResourceIdentity.class); - Assertions.assertEquals("mvxi", model.type()); + Assertions.assertEquals("dxwitx", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceIdentity model = new ResourceIdentity().withType("mvxi") - .withUserAssignedIdentities( - mapOf("fmvfaxkffeiit", new UserAssignedIdentity(), "xwburvjxxjns", new UserAssignedIdentity())); + ResourceIdentity model = new ResourceIdentity().withType("dxwitx") + .withUserAssignedIdentities(mapOf("nhjdauw", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ResourceIdentity.class); - Assertions.assertEquals("mvxi", model.type()); + Assertions.assertEquals("dxwitx", model.type()); } // Use "Map.of" if available diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityRequestTests.java index 3e49108dc9ec5..f2f514f810464 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,21 +13,21 @@ public final class ScheduleAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduleAvailabilityRequest model = BinaryData.fromString( - "{\"skuName\":\"ScheduleAvailabilityRequest\",\"storageLocation\":\"l\",\"country\":\"zxmhhvhgu\",\"model\":\"DataBoxHeavy\"}") + "{\"skuName\":\"ScheduleAvailabilityRequest\",\"storageLocation\":\"olpsslqlf\",\"country\":\"dnbbglzps\",\"model\":\"DataBoxHeavy\"}") .toObject(ScheduleAvailabilityRequest.class); - Assertions.assertEquals("l", model.storageLocation()); - Assertions.assertEquals("zxmhhvhgu", model.country()); + Assertions.assertEquals("olpsslqlf", model.storageLocation()); + Assertions.assertEquals("dnbbglzps", model.country()); Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduleAvailabilityRequest model = new ScheduleAvailabilityRequest().withStorageLocation("l") - .withCountry("zxmhhvhgu") + ScheduleAvailabilityRequest model = new ScheduleAvailabilityRequest().withStorageLocation("olpsslqlf") + .withCountry("dnbbglzps") .withModel(ModelName.DATA_BOX_HEAVY); model = BinaryData.fromObject(model).toObject(ScheduleAvailabilityRequest.class); - Assertions.assertEquals("l", model.storageLocation()); - Assertions.assertEquals("zxmhhvhgu", model.country()); + Assertions.assertEquals("olpsslqlf", model.storageLocation()); + Assertions.assertEquals("dnbbglzps", model.country()); Assertions.assertEquals(ModelName.DATA_BOX_HEAVY, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityResponseTests.java index 82e6d78130d37..aefaae7fc75fc 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityResponseTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,13 +12,7 @@ public final class ScheduleAvailabilityResponseTests { public void testDeserialize() throws Exception { ScheduleAvailabilityResponse model = BinaryData .fromString( - "{\"availableDates\":[\"2021-05-08T07:32:01Z\",\"2021-05-02T05:37:12Z\",\"2021-09-15T06:09:09Z\"]}") + "{\"availableDates\":[\"2021-01-04T01:34:57Z\",\"2021-06-11T23:31:33Z\",\"2021-02-07T06:52:46Z\"]}") .toObject(ScheduleAvailabilityResponse.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleAvailabilityResponse model = new ScheduleAvailabilityResponse(); - model = BinaryData.fromObject(model).toObject(ScheduleAvailabilityResponse.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesListAvailableSkusByResourceGroupMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesListAvailableSkusByResourceGroupMockTests.java index 8798032a5ba1f..e7a363e1033ad 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesListAvailableSkusByResourceGroupMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesListAvailableSkusByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -25,7 +25,7 @@ public final class ServicesListAvailableSkusByResourceGroupMockTests { @Test public void testListAvailableSkusByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"sku\":{\"name\":\"DataBoxDisk\",\"displayName\":\"oqkag\",\"family\":\"sxtta\",\"model\":\"DataBoxHeavy\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"pxdtnkdmkq\",\"serviceLocation\":\"lwuenvrkp\"},{\"dataLocation\":\"uaibrebqaaysj\",\"serviceLocation\":\"xqtnq\"},{\"dataLocation\":\"ezl\",\"serviceLocation\":\"ffiakp\"},{\"dataLocation\":\"qqmtedltmmji\",\"serviceLocation\":\"eozphv\"}],\"capacity\":{\"usable\":\"y\",\"maximum\":\"c\",\"individualSkuUsable\":\"upkvipmdsc\"},\"costs\":[{\"meterId\":\"pevzhfst\",\"meterType\":\"xhojuj\",\"multiplier\":93.60903040035382},{\"meterId\":\"mc\",\"meterType\":\"hixbjxyfwnyl\",\"multiplier\":16.99641354040682}],\"apiVersions\":[\"ttpkiwkkbnujrywv\"],\"disabledReason\":\"Region\",\"disabledReasonMessage\":\"fpncurdo\",\"requiredFeature\":\"iithtywu\",\"countriesWithinCommerceBoundary\":[\"bihwqknfdnt\",\"jchrdgoihxumw\"]}}]}"; + = "{\"value\":[{\"sku\":{\"name\":\"DataBoxHeavy\",\"displayName\":\"eafxtsgumhjglikk\",\"family\":\"slol\",\"model\":\"DataBox\"},\"enabled\":false,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"felfktg\",\"serviceLocation\":\"crpw\"}],\"capacity\":{\"usable\":\"znoigbrn\",\"maximum\":\"mw\",\"individualSkuUsable\":\"nbsazejjoqkag\"},\"costs\":[{\"meterId\":\"ttaugzxnfaazp\",\"meterType\":\"tnkdmkqj\",\"multiplier\":37.23605933106301},{\"meterId\":\"nvrk\",\"meterType\":\"ou\",\"multiplier\":13.595698149098478}],\"apiVersions\":[\"qaaysjkixqt\",\"qttezlwfffiakpjp\"],\"disabledReason\":\"None\",\"disabledReasonMessage\":\"edltmmjihyeozp\",\"requiredFeature\":\"wau\",\"countriesWithinCommerceBoundary\":[\"c\"]}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,11 +35,11 @@ public void testListAvailableSkusByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.services() - .listAvailableSkusByResourceGroup("lcrpw", "xeznoi", - new AvailableSkuRequest().withTransferType(TransferType.IMPORT_TO_AZURE) - .withCountry("rnjwmw") - .withLocation("pn") - .withSkuNames(Arrays.asList(SkuName.DATA_BOX_DISK)), + .listAvailableSkusByResourceGroup("svfycxzbfv", "owvrvmtgjqppyos", + new AvailableSkuRequest().withTransferType(TransferType.EXPORT_FROM_AZURE) + .withCountry("on") + .withLocation("myhgfipnsxkmc") + .withSkuNames(Arrays.asList(SkuName.DATA_BOX_DISK, SkuName.DATA_BOX_HEAVY)), com.azure.core.util.Context.NONE); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationByResourceGroupWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationByResourceGroupWithResponseMockTests.java index 2e9e09091dc9a..feae8a9f5f5c5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationByResourceGroupWithResponseMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -27,7 +27,7 @@ public final class ServicesRegionConfigurationByResourceGroupWithResponseMockTes @Test public void testRegionConfigurationByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-08-09T21:16:26Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[{\"shipmentType\":\"MicrosoftManaged\"},{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"CustomerManaged\"}]},\"datacenterAddressResponse\":{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"nc\",\"tmr\"],\"dataCenterAzureLocation\":\"irctymoxoftpipiw\"},\"deviceCapabilityResponse\":{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Enabled\"}]}}"; + = "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-11-03T04:42:22Z\",\"2021-02-15T19:37:09Z\",\"2021-06-06T05:18:15Z\",\"2021-04-08T10:27:26Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[{\"shipmentType\":\"MicrosoftManaged\"},{\"shipmentType\":\"CustomerManaged\"}]},\"datacenterAddressResponse\":{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"wiithtywub\"],\"dataCenterAzureLocation\":\"bihwqknfdnt\"},\"deviceCapabilityResponse\":{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Disabled\"}]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,20 +37,19 @@ public void testRegionConfigurationByResourceGroupWithResponse() throws Exceptio new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RegionConfigurationResponse response = manager.services() - .regionConfigurationByResourceGroupWithResponse("xumvfcluyovw", "nbkfezzxscy", + .regionConfigurationByResourceGroupWithResponse("gupkvipmdscwxq", "pevzhfst", new RegionConfigurationRequest() - .withScheduleAvailabilityRequest(new ScheduleAvailabilityRequest().withStorageLocation("zdgiruj") - .withCountry("bomvzzbtdcqv") - .withModel(ModelName.AZURE_DATA_BOX525)) + .withScheduleAvailabilityRequest(new ScheduleAvailabilityRequest().withStorageLocation("xhojuj") + .withCountry("pelmcuvhixbjxyf") + .withModel(ModelName.DATA_BOX_CUSTOMER_DISK)) .withTransportAvailabilityRequest( - new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_HEAVY) - .withModel(ModelName.DATA_BOX_CUSTOMER_DISK)) - .withDatacenterAddressRequest(new DatacenterAddressRequest().withStorageLocation("l") - .withSkuName(SkuName.DATA_BOX) + new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_CUSTOMER_DISK) + .withModel(ModelName.DATA_BOX_HEAVY)) + .withDatacenterAddressRequest(new DatacenterAddressRequest().withStorageLocation("sttp") + .withSkuName(SkuName.DATA_BOX_DISK) .withModel(ModelName.DATA_BOX)) - .withDeviceCapabilityRequest( - new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_CUSTOMER_DISK) - .withModel(ModelName.AZURE_DATA_BOX525)), + .withDeviceCapabilityRequest(new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_HEAVY) + .withModel(ModelName.DATA_BOX_HEAVY)), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationWithResponseMockTests.java index 69e361e35b045..0e7c3d0e6be35 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationWithResponseMockTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -27,7 +27,7 @@ public final class ServicesRegionConfigurationWithResponseMockTests { @Test public void testRegionConfigurationWithResponse() throws Exception { String responseStr - = "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-07-10T01:21:20Z\",\"2021-10-13T21:08:10Z\",\"2021-06-29T12:35:18Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[{\"shipmentType\":\"MicrosoftManaged\"},{\"shipmentType\":\"MicrosoftManaged\"},{\"shipmentType\":\"CustomerManaged\"}]},\"datacenterAddressResponse\":{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"ntps\",\"wgioilqukry\",\"xtqmieoxor\",\"gufhyaomtbg\"],\"dataCenterAzureLocation\":\"avgrvkffovjz\"},\"deviceCapabilityResponse\":{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Enabled\"},{\"hardwareEncryption\":\"Enabled\"},{\"hardwareEncryption\":\"Enabled\"}]}}"; + = "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-01-23T14:08:39Z\",\"2021-01-19T02:48:32Z\",\"2021-12-09T01:29:35Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[{\"shipmentType\":\"MicrosoftManaged\"}]},\"datacenterAddressResponse\":{\"datacenterAddressType\":\"DatacenterAddressResponse\",\"supportedCarriersForReturnShipment\":[\"oqrvqqaatjin\",\"vgoup\",\"fiibfggjioolvr\"],\"dataCenterAzureLocation\":\"kvtkkg\"},\"deviceCapabilityResponse\":{\"deviceCapabilityDetails\":[{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Disabled\"},{\"hardwareEncryption\":\"Enabled\"}]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,17 +37,19 @@ public void testRegionConfigurationWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); RegionConfigurationResponse response = manager.services() - .regionConfigurationWithResponse("gh", new RegionConfigurationRequest() - .withScheduleAvailabilityRequest(new ScheduleAvailabilityRequest().withStorageLocation("bdhqxvcxgf") - .withCountry("dsofbshrns") - .withModel(ModelName.DATA_BOX_DISK)) - .withTransportAvailabilityRequest(new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_HEAVY) - .withModel(ModelName.DATA_BOX_DISK)) - .withDatacenterAddressRequest(new DatacenterAddressRequest().withStorageLocation("ybycnunvj") - .withSkuName(SkuName.DATA_BOX_HEAVY) - .withModel(ModelName.DATA_BOX_DISK)) - .withDeviceCapabilityRequest(new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_CUSTOMER_DISK) - .withModel(ModelName.DATA_BOX_DISK)), + .regionConfigurationWithResponse("njv", + new RegionConfigurationRequest() + .withScheduleAvailabilityRequest(new ScheduleAvailabilityRequest().withStorageLocation("wxlp") + .withCountry("kftnkhtjsyin") + .withModel(ModelName.AZURE_DATA_BOX120)) + .withTransportAvailabilityRequest( + new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_CUSTOMER_DISK) + .withModel(ModelName.AZURE_DATA_BOX120)) + .withDatacenterAddressRequest(new DatacenterAddressRequest().withStorageLocation("htmdvy") + .withSkuName(SkuName.DATA_BOX_DISK) + .withModel(ModelName.DATA_BOX_HEAVY)) + .withDeviceCapabilityRequest(new DeviceCapabilityRequest().withSkuName(SkuName.DATA_BOX_HEAVY) + .withModel(ModelName.DATA_BOX_CUSTOMER_DISK)), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpRequestTests.java index 5455a758bd5c6..f3fea6797db48 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,22 +13,22 @@ public final class ShipmentPickUpRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ShipmentPickUpRequest model = BinaryData.fromString( - "{\"startTime\":\"2021-09-27T09:43:19Z\",\"endTime\":\"2021-09-09T21:04:39Z\",\"shipmentLocation\":\"bncblylpstdbhhx\"}") + "{\"startTime\":\"2021-02-19T08:33:13Z\",\"endTime\":\"2021-06-06T08:14:27Z\",\"shipmentLocation\":\"ahzxctobgbk\"}") .toObject(ShipmentPickUpRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T09:43:19Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-09T21:04:39Z"), model.endTime()); - Assertions.assertEquals("bncblylpstdbhhx", model.shipmentLocation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T08:33:13Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T08:14:27Z"), model.endTime()); + Assertions.assertEquals("ahzxctobgbk", model.shipmentLocation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ShipmentPickUpRequest model - = new ShipmentPickUpRequest().withStartTime(OffsetDateTime.parse("2021-09-27T09:43:19Z")) - .withEndTime(OffsetDateTime.parse("2021-09-09T21:04:39Z")) - .withShipmentLocation("bncblylpstdbhhx"); + = new ShipmentPickUpRequest().withStartTime(OffsetDateTime.parse("2021-02-19T08:33:13Z")) + .withEndTime(OffsetDateTime.parse("2021-06-06T08:14:27Z")) + .withShipmentLocation("ahzxctobgbk"); model = BinaryData.fromObject(model).toObject(ShipmentPickUpRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T09:43:19Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-09T21:04:39Z"), model.endTime()); - Assertions.assertEquals("bncblylpstdbhhx", model.shipmentLocation()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T08:33:13Z"), model.startTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T08:14:27Z"), model.endTime()); + Assertions.assertEquals("ahzxctobgbk", model.shipmentLocation()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpResponseInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpResponseInnerTests.java index ecdcdf8b8f51c..40b97132d38f3 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpResponseInnerTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpResponseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class ShipmentPickUpResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ShipmentPickUpResponseInner model = BinaryData - .fromString("{\"confirmationNumber\":\"zdzucerscdntnevf\",\"readyByTime\":\"2021-05-10T05:26:40Z\"}") + .fromString("{\"confirmationNumber\":\"oizpostmgrcfbun\",\"readyByTime\":\"2021-04-30T20:29:14Z\"}") .toObject(ShipmentPickUpResponseInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShipmentPickUpResponseInner model = new ShipmentPickUpResponseInner(); - model = BinaryData.fromObject(model).toObject(ShipmentPickUpResponseInner.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuAvailabilityValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuAvailabilityValidationRequestTests.java index 12f9c76bcec37..220978037b451 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuAvailabilityValidationRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuAvailabilityValidationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -15,28 +15,28 @@ public final class SkuAvailabilityValidationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuAvailabilityValidationRequest model = BinaryData.fromString( - "{\"validationType\":\"ValidateSkuAvailability\",\"deviceType\":\"DataBoxCustomerDisk\",\"transferType\":\"ImportToAzure\",\"country\":\"fajpjorwk\",\"location\":\"nyhgbijtji\",\"model\":\"DataBoxDisk\"}") + "{\"validationType\":\"ValidateSkuAvailability\",\"deviceType\":\"DataBoxHeavy\",\"transferType\":\"ExportFromAzure\",\"country\":\"iswac\",\"location\":\"fgdkzzew\",\"model\":\"DataBoxCustomerDisk\"}") .toObject(SkuAvailabilityValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.deviceType()); - Assertions.assertEquals(TransferType.IMPORT_TO_AZURE, model.transferType()); - Assertions.assertEquals("fajpjorwk", model.country()); - Assertions.assertEquals("nyhgbijtji", model.location()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.deviceType()); + Assertions.assertEquals(TransferType.EXPORT_FROM_AZURE, model.transferType()); + Assertions.assertEquals("iswac", model.country()); + Assertions.assertEquals("fgdkzzew", model.location()); + Assertions.assertEquals(ModelName.DATA_BOX_CUSTOMER_DISK, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SkuAvailabilityValidationRequest model - = new SkuAvailabilityValidationRequest().withDeviceType(SkuName.DATA_BOX_CUSTOMER_DISK) - .withTransferType(TransferType.IMPORT_TO_AZURE) - .withCountry("fajpjorwk") - .withLocation("nyhgbijtji") - .withModel(ModelName.DATA_BOX_DISK); + = new SkuAvailabilityValidationRequest().withDeviceType(SkuName.DATA_BOX_HEAVY) + .withTransferType(TransferType.EXPORT_FROM_AZURE) + .withCountry("iswac") + .withLocation("fgdkzzew") + .withModel(ModelName.DATA_BOX_CUSTOMER_DISK); model = BinaryData.fromObject(model).toObject(SkuAvailabilityValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.deviceType()); - Assertions.assertEquals(TransferType.IMPORT_TO_AZURE, model.transferType()); - Assertions.assertEquals("fajpjorwk", model.country()); - Assertions.assertEquals("nyhgbijtji", model.location()); - Assertions.assertEquals(ModelName.DATA_BOX_DISK, model.model()); + Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.deviceType()); + Assertions.assertEquals(TransferType.EXPORT_FROM_AZURE, model.transferType()); + Assertions.assertEquals("iswac", model.country()); + Assertions.assertEquals("fgdkzzew", model.location()); + Assertions.assertEquals(ModelName.DATA_BOX_CUSTOMER_DISK, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCapacityTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCapacityTests.java index a250193732057..3508056d92cd8 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCapacityTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCapacityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,13 +12,7 @@ public final class SkuCapacityTests { public void testDeserialize() throws Exception { SkuCapacity model = BinaryData .fromString( - "{\"usable\":\"misgwbnb\",\"maximum\":\"ldawkzbaliourqha\",\"individualSkuUsable\":\"uhashsfwx\"}") + "{\"usable\":\"tlstvlzywem\",\"maximum\":\"rncsdtclu\",\"individualSkuUsable\":\"ypbsfgytguslfead\"}") .toObject(SkuCapacity.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = new SkuCapacity(); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCostTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCostTests.java index 4cf1e1e1d8dc1..ec03933e34d28 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCostTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCostTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class SkuCostTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuCost model = BinaryData - .fromString("{\"meterId\":\"owzxcu\",\"meterType\":\"cjooxdjebwpucwwf\",\"multiplier\":33.68336197524414}") + .fromString("{\"meterId\":\"gq\",\"meterType\":\"yhejhzisxgfp\",\"multiplier\":81.46863810068963}") .toObject(SkuCost.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCost model = new SkuCost(); - model = BinaryData.fromObject(model).toObject(SkuCost.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuInformationInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuInformationInnerTests.java index 42a0a45db767d..83e89303a63ec 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuInformationInnerTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuInformationInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class SkuInformationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuInformationInner model = BinaryData.fromString( - "{\"sku\":{\"name\":\"DataBox\",\"displayName\":\"s\",\"family\":\"pgn\",\"model\":\"AzureDataBox120\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"zpfzabglc\",\"serviceLocation\":\"xwtctyqiklbbovpl\"},{\"dataLocation\":\"bhvgy\",\"serviceLocation\":\"uosvmkfssxqukk\"}],\"capacity\":{\"usable\":\"gmgsxnkjzkde\",\"maximum\":\"pvlopwiyighxpkd\",\"individualSkuUsable\":\"baiuebbaumny\"},\"costs\":[{\"meterId\":\"deoj\",\"meterType\":\"bckhsmtxpsi\",\"multiplier\":96.5782605370898}],\"apiVersions\":[\"pesapskrdqmhjj\",\"htldwk\",\"zxuutkncwscwsvl\",\"otogtwrupqs\"],\"disabledReason\":\"Feature\",\"disabledReasonMessage\":\"i\",\"requiredFeature\":\"kvceoveilovnotyf\",\"countriesWithinCommerceBoundary\":[\"njbkcnxdhbttkph\",\"wpn\",\"jtoqne\"]}}") + "{\"sku\":{\"name\":\"DataBox\",\"displayName\":\"tncormrlxqtvco\",\"family\":\"dflvkg\",\"model\":\"AzureDataBox120\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"vsaznqntorudsg\",\"serviceLocation\":\"hmk\"},{\"dataLocation\":\"grauwjuetaebur\",\"serviceLocation\":\"dmovsm\"},{\"dataLocation\":\"xwabmqoe\",\"serviceLocation\":\"ifrvtpu\"}],\"capacity\":{\"usable\":\"mqlgk\",\"maximum\":\"tndoaongbjc\",\"individualSkuUsable\":\"ujitcjedftww\"},\"costs\":[{\"meterId\":\"ojvdcpzfoqo\",\"meterType\":\"cybxa\",\"multiplier\":83.77780451240132}],\"apiVersions\":[\"foxciq\",\"p\"],\"disabledReason\":\"Country\",\"disabledReasonMessage\":\"mciodhkhazxkhn\",\"requiredFeature\":\"onlwntoeg\",\"countriesWithinCommerceBoundary\":[\"wbw\",\"kszzcmrvexztv\",\"t\",\"gsfraoyzkoow\"]}}") .toObject(SkuInformationInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuInformationInner model = new SkuInformationInner(); - model = BinaryData.fromObject(model).toObject(SkuInformationInner.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuPropertiesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuPropertiesTests.java index 6539e2774d817..c049cda9d3314 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuPropertiesTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -11,13 +11,7 @@ public final class SkuPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuProperties model = BinaryData.fromString( - "{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"fpl\",\"serviceLocation\":\"oxuscrpabgyepsbj\"}],\"capacity\":{\"usable\":\"qugxywpmueefjzwf\",\"maximum\":\"q\",\"individualSkuUsable\":\"ids\"},\"costs\":[{\"meterId\":\"obglaocqxtcc\",\"meterType\":\"yudxytlmoy\",\"multiplier\":80.88741588233587},{\"meterId\":\"u\",\"meterType\":\"pz\",\"multiplier\":85.11812605556538},{\"meterId\":\"zhlrqjb\",\"meterType\":\"kfrlhrxsbky\",\"multiplier\":86.14609996604706}],\"apiVersions\":[\"uzbpzkafku\"],\"disabledReason\":\"Country\",\"disabledReasonMessage\":\"nwbmeh\",\"requiredFeature\":\"eyvjusrtslhspkde\",\"countriesWithinCommerceBoundary\":[\"ofmxagkvtmelmqkr\",\"ahvljuaha\",\"uhcdhm\"]}") + "{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"guxawqaldsyuuxi\",\"serviceLocation\":\"rqf\"},{\"dataLocation\":\"wyznkbyku\",\"serviceLocation\":\"pfhpagmhrskdsnfd\"},{\"dataLocation\":\"oakgtdlmkkzev\",\"serviceLocation\":\"hewpusdsttwv\"},{\"dataLocation\":\"vbbejdcng\",\"serviceLocation\":\"m\"}],\"capacity\":{\"usable\":\"ufgmjzrwrdg\",\"maximum\":\"wae\",\"individualSkuUsable\":\"uzkopbminrfd\"},\"costs\":[{\"meterId\":\"hhziuief\",\"meterType\":\"bhdmsmlmzqhof\",\"multiplier\":92.21513436527684},{\"meterId\":\"qu\",\"meterType\":\"hxicslfaoqz\",\"multiplier\":82.90245627643519}],\"apiVersions\":[\"alnswhccsphk\",\"ivwitqscywugg\"],\"disabledReason\":\"None\",\"disabledReasonMessage\":\"h\",\"requiredFeature\":\"bwemhairs\",\"countriesWithinCommerceBoundary\":[\"z\"]}") .toObject(SkuProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuProperties model = new SkuProperties(); - model = BinaryData.fromObject(model).toObject(SkuProperties.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuTests.java index 6ef40ad2f99ca..9f5cf6f23ab2d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -14,24 +14,24 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Sku model = BinaryData.fromString( - "{\"name\":\"DataBoxCustomerDisk\",\"displayName\":\"ciwwzjuqkhr\",\"family\":\"jiwkuofoskghsau\",\"model\":\"DataBox\"}") + "{\"name\":\"DataBoxCustomerDisk\",\"displayName\":\"hzceuojgjrwjue\",\"family\":\"twm\",\"model\":\"AzureDataBox525\"}") .toObject(Sku.class); Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.name()); - Assertions.assertEquals("ciwwzjuqkhr", model.displayName()); - Assertions.assertEquals("jiwkuofoskghsau", model.family()); - Assertions.assertEquals(ModelName.DATA_BOX, model.model()); + Assertions.assertEquals("hzceuojgjrwjue", model.displayName()); + Assertions.assertEquals("twm", model.family()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX525, model.model()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { Sku model = new Sku().withName(SkuName.DATA_BOX_CUSTOMER_DISK) - .withDisplayName("ciwwzjuqkhr") - .withFamily("jiwkuofoskghsau") - .withModel(ModelName.DATA_BOX); + .withDisplayName("hzceuojgjrwjue") + .withFamily("twm") + .withModel(ModelName.AZURE_DATA_BOX525); model = BinaryData.fromObject(model).toObject(Sku.class); Assertions.assertEquals(SkuName.DATA_BOX_CUSTOMER_DISK, model.name()); - Assertions.assertEquals("ciwwzjuqkhr", model.displayName()); - Assertions.assertEquals("jiwkuofoskghsau", model.family()); - Assertions.assertEquals(ModelName.DATA_BOX, model.model()); + Assertions.assertEquals("hzceuojgjrwjue", model.displayName()); + Assertions.assertEquals("twm", model.family()); + Assertions.assertEquals(ModelName.AZURE_DATA_BOX525, model.model()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SubscriptionIsAllowedToCreateJobValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SubscriptionIsAllowedToCreateJobValidationRequestTests.java index c2dfb0409428b..e490fd1f29a30 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SubscriptionIsAllowedToCreateJobValidationRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SubscriptionIsAllowedToCreateJobValidationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferAllDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferAllDetailsTests.java index e5e1721499cd9..821fdf12f8121 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferAllDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferAllDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,21 +13,21 @@ public final class TransferAllDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TransferAllDetails model = BinaryData - .fromString("{\"dataAccountType\":\"StorageAccount\",\"transferAllBlobs\":false,\"transferAllFiles\":true}") + .fromString("{\"dataAccountType\":\"StorageAccount\",\"transferAllBlobs\":true,\"transferAllFiles\":false}") .toObject(TransferAllDetails.class); Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.dataAccountType()); - Assertions.assertEquals(false, model.transferAllBlobs()); - Assertions.assertEquals(true, model.transferAllFiles()); + Assertions.assertTrue(model.transferAllBlobs()); + Assertions.assertFalse(model.transferAllFiles()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TransferAllDetails model = new TransferAllDetails().withDataAccountType(DataAccountType.STORAGE_ACCOUNT) - .withTransferAllBlobs(false) - .withTransferAllFiles(true); + .withTransferAllBlobs(true) + .withTransferAllFiles(false); model = BinaryData.fromObject(model).toObject(TransferAllDetails.class); Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.dataAccountType()); - Assertions.assertEquals(false, model.transferAllBlobs()); - Assertions.assertEquals(true, model.transferAllFiles()); + Assertions.assertTrue(model.transferAllBlobs()); + Assertions.assertFalse(model.transferAllFiles()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTests.java index a7330597d4a9c..99a7cf47f2cbf 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -23,82 +23,77 @@ public final class TransferConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TransferConfiguration model = BinaryData.fromString( - "{\"transferConfigurationType\":\"TransferAll\",\"transferFilterDetails\":{\"include\":{\"dataAccountType\":\"ManagedDisk\",\"blobFilterDetails\":{\"blobPrefixList\":[\"jcmmxdcufufsrp\",\"mzidnsezcxtb\"],\"blobPathList\":[\"fycc\",\"newmdwzjeiachbo\"],\"containerList\":[\"lnrosfqp\",\"eeh\",\"zvypyqrimzinp\",\"swjdkirso\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"hc\"],\"filePathList\":[\"ohjtckw\",\"dsoifiyipj\"],\"fileShareList\":[\"wpgrjbzno\",\"cjxvsnbyxqab\",\"mocpc\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"rzafbljjgpbtoqcj\"},{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"ljavbqid\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"ajzyul\"}]}},\"transferAllDetails\":{\"include\":{\"dataAccountType\":\"StorageAccount\",\"transferAllBlobs\":true,\"transferAllFiles\":false}}}") + "{\"transferConfigurationType\":\"TransferAll\",\"transferFilterDetails\":{\"include\":{\"dataAccountType\":\"StorageAccount\",\"blobFilterDetails\":{\"blobPrefixList\":[\"oczvy\",\"fqrvkdvjsllrmvvd\",\"watkpnpulexxb\",\"zwtruwiqzbqjvsov\"],\"blobPathList\":[\"kacspkw\",\"hzdobpxjmflbvvnc\"],\"containerList\":[\"cciw\",\"zjuqkhrsaj\",\"wkuofoskghsauu\",\"mjmvxieduugidyjr\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"aos\"],\"filePathList\":[\"csonpclhoco\"],\"fileShareList\":[\"kevle\",\"gz\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"fmvfaxkffeiit\"}]}},\"transferAllDetails\":{\"include\":{\"dataAccountType\":\"StorageAccount\",\"transferAllBlobs\":false,\"transferAllFiles\":false}}}") .toObject(TransferConfiguration.class); Assertions.assertEquals(TransferConfigurationType.TRANSFER_ALL, model.transferConfigurationType()); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, + Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.transferFilterDetails().include().dataAccountType()); - Assertions.assertEquals("jcmmxdcufufsrp", + Assertions.assertEquals("oczvy", model.transferFilterDetails().include().blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("fycc", + Assertions.assertEquals("kacspkw", model.transferFilterDetails().include().blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("lnrosfqp", + Assertions.assertEquals("cciw", model.transferFilterDetails().include().blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("hc", + Assertions.assertEquals("aos", model.transferFilterDetails().include().azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("ohjtckw", + Assertions.assertEquals("csonpclhoco", model.transferFilterDetails().include().azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("wpgrjbzno", + Assertions.assertEquals("kevle", model.transferFilterDetails().include().azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, + Assertions.assertEquals(FilterFileType.AZURE_FILE, model.transferFilterDetails().include().filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("rzafbljjgpbtoqcj", + Assertions.assertEquals("fmvfaxkffeiit", model.transferFilterDetails().include().filterFileDetails().get(0).filterFilePath()); Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.transferAllDetails().include().dataAccountType()); - Assertions.assertEquals(true, model.transferAllDetails().include().transferAllBlobs()); - Assertions.assertEquals(false, model.transferAllDetails().include().transferAllFiles()); + Assertions.assertFalse(model.transferAllDetails().include().transferAllBlobs()); + Assertions.assertFalse(model.transferAllDetails().include().transferAllFiles()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TransferConfiguration model - = new TransferConfiguration().withTransferConfigurationType(TransferConfigurationType.TRANSFER_ALL) - .withTransferFilterDetails( - new TransferConfigurationTransferFilterDetails() - .withInclude(new TransferFilterDetails().withDataAccountType(DataAccountType.MANAGED_DISK) - .withBlobFilterDetails(new BlobFilterDetails() - .withBlobPrefixList(Arrays.asList("jcmmxdcufufsrp", "mzidnsezcxtb")) - .withBlobPathList(Arrays.asList("fycc", "newmdwzjeiachbo")) - .withContainerList(Arrays.asList("lnrosfqp", "eeh", "zvypyqrimzinp", "swjdkirso"))) - .withAzureFileFilterDetails( - new AzureFileFilterDetails().withFilePrefixList(Arrays.asList("hc")) - .withFilePathList(Arrays.asList("ohjtckw", "dsoifiyipj")) - .withFileShareList(Arrays.asList("wpgrjbzno", "cjxvsnbyxqab", "mocpc"))) - .withFilterFileDetails(Arrays.asList( - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_BLOB) - .withFilterFilePath("rzafbljjgpbtoqcj"), - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_BLOB) - .withFilterFilePath("ljavbqid"), - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE) - .withFilterFilePath("ajzyul"))))) - .withTransferAllDetails(new TransferConfigurationTransferAllDetails() - .withInclude(new TransferAllDetails().withDataAccountType(DataAccountType.STORAGE_ACCOUNT) - .withTransferAllBlobs(true) - .withTransferAllFiles(false))); + TransferConfiguration model = new TransferConfiguration() + .withTransferConfigurationType(TransferConfigurationType.TRANSFER_ALL) + .withTransferFilterDetails(new TransferConfigurationTransferFilterDetails() + .withInclude(new TransferFilterDetails().withDataAccountType(DataAccountType.STORAGE_ACCOUNT) + .withBlobFilterDetails(new BlobFilterDetails() + .withBlobPrefixList( + Arrays.asList("oczvy", "fqrvkdvjsllrmvvd", "watkpnpulexxb", "zwtruwiqzbqjvsov")) + .withBlobPathList(Arrays.asList("kacspkw", "hzdobpxjmflbvvnc")) + .withContainerList(Arrays.asList("cciw", "zjuqkhrsaj", "wkuofoskghsauu", "mjmvxieduugidyjr"))) + .withAzureFileFilterDetails(new AzureFileFilterDetails().withFilePrefixList(Arrays.asList("aos")) + .withFilePathList(Arrays.asList("csonpclhoco")) + .withFileShareList(Arrays.asList("kevle", "gz"))) + .withFilterFileDetails( + Arrays.asList(new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE) + .withFilterFilePath("fmvfaxkffeiit"))))) + .withTransferAllDetails(new TransferConfigurationTransferAllDetails() + .withInclude(new TransferAllDetails().withDataAccountType(DataAccountType.STORAGE_ACCOUNT) + .withTransferAllBlobs(false) + .withTransferAllFiles(false))); model = BinaryData.fromObject(model).toObject(TransferConfiguration.class); Assertions.assertEquals(TransferConfigurationType.TRANSFER_ALL, model.transferConfigurationType()); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, + Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.transferFilterDetails().include().dataAccountType()); - Assertions.assertEquals("jcmmxdcufufsrp", + Assertions.assertEquals("oczvy", model.transferFilterDetails().include().blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("fycc", + Assertions.assertEquals("kacspkw", model.transferFilterDetails().include().blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("lnrosfqp", + Assertions.assertEquals("cciw", model.transferFilterDetails().include().blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("hc", + Assertions.assertEquals("aos", model.transferFilterDetails().include().azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("ohjtckw", + Assertions.assertEquals("csonpclhoco", model.transferFilterDetails().include().azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("wpgrjbzno", + Assertions.assertEquals("kevle", model.transferFilterDetails().include().azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, + Assertions.assertEquals(FilterFileType.AZURE_FILE, model.transferFilterDetails().include().filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("rzafbljjgpbtoqcj", + Assertions.assertEquals("fmvfaxkffeiit", model.transferFilterDetails().include().filterFileDetails().get(0).filterFilePath()); Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.transferAllDetails().include().dataAccountType()); - Assertions.assertEquals(true, model.transferAllDetails().include().transferAllBlobs()); - Assertions.assertEquals(false, model.transferAllDetails().include().transferAllFiles()); + Assertions.assertFalse(model.transferAllDetails().include().transferAllBlobs()); + Assertions.assertFalse(model.transferAllDetails().include().transferAllFiles()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferAllDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferAllDetailsTests.java index 7727f6aa1b259..fc2a39b8c4c3d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferAllDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferAllDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -14,11 +14,11 @@ public final class TransferConfigurationTransferAllDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TransferConfigurationTransferAllDetails model = BinaryData.fromString( - "{\"include\":{\"dataAccountType\":\"StorageAccount\",\"transferAllBlobs\":false,\"transferAllFiles\":true}}") + "{\"include\":{\"dataAccountType\":\"StorageAccount\",\"transferAllBlobs\":false,\"transferAllFiles\":false}}") .toObject(TransferConfigurationTransferAllDetails.class); Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.include().dataAccountType()); - Assertions.assertEquals(false, model.include().transferAllBlobs()); - Assertions.assertEquals(true, model.include().transferAllFiles()); + Assertions.assertFalse(model.include().transferAllBlobs()); + Assertions.assertFalse(model.include().transferAllFiles()); } @org.junit.jupiter.api.Test @@ -26,10 +26,10 @@ public void testSerialize() throws Exception { TransferConfigurationTransferAllDetails model = new TransferConfigurationTransferAllDetails() .withInclude(new TransferAllDetails().withDataAccountType(DataAccountType.STORAGE_ACCOUNT) .withTransferAllBlobs(false) - .withTransferAllFiles(true)); + .withTransferAllFiles(false)); model = BinaryData.fromObject(model).toObject(TransferConfigurationTransferAllDetails.class); Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.include().dataAccountType()); - Assertions.assertEquals(false, model.include().transferAllBlobs()); - Assertions.assertEquals(true, model.include().transferAllFiles()); + Assertions.assertFalse(model.include().transferAllBlobs()); + Assertions.assertFalse(model.include().transferAllFiles()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferFilterDetailsTests.java index 824d6ea3d98ba..1f8d2d7c7ebfc 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferFilterDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferFilterDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -19,44 +19,47 @@ public final class TransferConfigurationTransferFilterDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TransferConfigurationTransferFilterDetails model = BinaryData.fromString( - "{\"include\":{\"dataAccountType\":\"StorageAccount\",\"blobFilterDetails\":{\"blobPrefixList\":[\"fepgzgq\",\"xzlocxscp\",\"ierhhbcsglummaj\"],\"blobPathList\":[\"odxobnbdxkqpxok\",\"jionpimexgstxgc\"],\"containerList\":[\"gmaajrm\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"zrlovmclwhijcoej\",\"tbzaqsqsycbkbfk\",\"ukdkexxppofmxa\",\"c\"],\"filePathList\":[\"gddtocj\"],\"fileShareList\":[\"vpmouexhdzxib\",\"eojnxqbzvddn\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"eic\"}]}}") + "{\"include\":{\"dataAccountType\":\"ManagedDisk\",\"blobFilterDetails\":{\"blobPrefixList\":[\"sbbzo\",\"gigr\",\"wburvjxxjnspydpt\",\"oenkouknvudwti\"],\"blobPathList\":[\"ldngkpoci\",\"azyxoegukg\",\"npiucgygevqznty\"],\"containerList\":[\"bpizcdrqjsdpydn\",\"yhxdeoejzicwi\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"tgzfbishcbkh\",\"jdeyeamdpha\"],\"filePathList\":[\"pbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"],\"fileShareList\":[\"uttmrywnuzoqft\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"rnkcqvyxlw\"},{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"lsicohoqqnwv\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"yav\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"heun\"}]}}") .toObject(TransferConfigurationTransferFilterDetails.class); - Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.include().dataAccountType()); - Assertions.assertEquals("fepgzgq", model.include().blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("odxobnbdxkqpxok", model.include().blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("gmaajrm", model.include().blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("zrlovmclwhijcoej", model.include().azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("gddtocj", model.include().azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("vpmouexhdzxib", model.include().azureFileFilterDetails().fileShareList().get(0)); + Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.include().dataAccountType()); + Assertions.assertEquals("sbbzo", model.include().blobFilterDetails().blobPrefixList().get(0)); + Assertions.assertEquals("ldngkpoci", model.include().blobFilterDetails().blobPathList().get(0)); + Assertions.assertEquals("bpizcdrqjsdpydn", model.include().blobFilterDetails().containerList().get(0)); + Assertions.assertEquals("tgzfbishcbkh", model.include().azureFileFilterDetails().filePrefixList().get(0)); + Assertions.assertEquals("pbuxwgipwhon", model.include().azureFileFilterDetails().filePathList().get(0)); + Assertions.assertEquals("uttmrywnuzoqft", model.include().azureFileFilterDetails().fileShareList().get(0)); Assertions.assertEquals(FilterFileType.AZURE_FILE, model.include().filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("eic", model.include().filterFileDetails().get(0).filterFilePath()); + Assertions.assertEquals("rnkcqvyxlw", model.include().filterFileDetails().get(0).filterFilePath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TransferConfigurationTransferFilterDetails model - = new TransferConfigurationTransferFilterDetails() - .withInclude(new TransferFilterDetails().withDataAccountType(DataAccountType.STORAGE_ACCOUNT) - .withBlobFilterDetails(new BlobFilterDetails() - .withBlobPrefixList(Arrays.asList("fepgzgq", "xzlocxscp", "ierhhbcsglummaj")) - .withBlobPathList(Arrays.asList("odxobnbdxkqpxok", "jionpimexgstxgc")) - .withContainerList(Arrays.asList("gmaajrm"))) - .withAzureFileFilterDetails(new AzureFileFilterDetails() - .withFilePrefixList(Arrays.asList("zrlovmclwhijcoej", "tbzaqsqsycbkbfk", "ukdkexxppofmxa", "c")) - .withFilePathList(Arrays.asList("gddtocj")) - .withFileShareList(Arrays.asList("vpmouexhdzxib", "eojnxqbzvddn"))) - .withFilterFileDetails( - Arrays.asList(new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE) - .withFilterFilePath("eic")))); + TransferConfigurationTransferFilterDetails model = new TransferConfigurationTransferFilterDetails() + .withInclude(new TransferFilterDetails().withDataAccountType(DataAccountType.MANAGED_DISK) + .withBlobFilterDetails(new BlobFilterDetails() + .withBlobPrefixList(Arrays.asList("sbbzo", "gigr", "wburvjxxjnspydpt", "oenkouknvudwti")) + .withBlobPathList(Arrays.asList("ldngkpoci", "azyxoegukg", "npiucgygevqznty")) + .withContainerList(Arrays.asList("bpizcdrqjsdpydn", "yhxdeoejzicwi"))) + .withAzureFileFilterDetails( + new AzureFileFilterDetails().withFilePrefixList(Arrays.asList("tgzfbishcbkh", "jdeyeamdpha")) + .withFilePathList(Arrays.asList("pbuxwgipwhon", "wkgshwa", "kix", "bin")) + .withFileShareList(Arrays.asList("uttmrywnuzoqft"))) + .withFilterFileDetails(Arrays.asList( + new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE) + .withFilterFilePath("rnkcqvyxlw"), + new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_BLOB) + .withFilterFilePath("lsicohoqqnwv"), + new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("yav"), + new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("heun")))); model = BinaryData.fromObject(model).toObject(TransferConfigurationTransferFilterDetails.class); - Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.include().dataAccountType()); - Assertions.assertEquals("fepgzgq", model.include().blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("odxobnbdxkqpxok", model.include().blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("gmaajrm", model.include().blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("zrlovmclwhijcoej", model.include().azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("gddtocj", model.include().azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("vpmouexhdzxib", model.include().azureFileFilterDetails().fileShareList().get(0)); + Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.include().dataAccountType()); + Assertions.assertEquals("sbbzo", model.include().blobFilterDetails().blobPrefixList().get(0)); + Assertions.assertEquals("ldngkpoci", model.include().blobFilterDetails().blobPathList().get(0)); + Assertions.assertEquals("bpizcdrqjsdpydn", model.include().blobFilterDetails().containerList().get(0)); + Assertions.assertEquals("tgzfbishcbkh", model.include().azureFileFilterDetails().filePrefixList().get(0)); + Assertions.assertEquals("pbuxwgipwhon", model.include().azureFileFilterDetails().filePathList().get(0)); + Assertions.assertEquals("uttmrywnuzoqft", model.include().azureFileFilterDetails().fileShareList().get(0)); Assertions.assertEquals(FilterFileType.AZURE_FILE, model.include().filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("eic", model.include().filterFileDetails().get(0).filterFilePath()); + Assertions.assertEquals("rnkcqvyxlw", model.include().filterFileDetails().get(0).filterFilePath()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferFilterDetailsTests.java index db0f36ef6929f..6840da9a49ce5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferFilterDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferFilterDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -18,44 +18,41 @@ public final class TransferFilterDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TransferFilterDetails model = BinaryData.fromString( - "{\"dataAccountType\":\"ManagedDisk\",\"blobFilterDetails\":{\"blobPrefixList\":[\"zao\",\"vuhrhcffcyddgl\",\"jthjqkwpyei\"],\"blobPathList\":[\"qciwqvhkhixuigdt\"],\"containerList\":[\"objoghmewu\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"hrzayvvtpgvdf\",\"iotkftutqxl\",\"gxlefgugnxkrxd\"],\"filePathList\":[\"dt\"],\"fileShareList\":[\"rvqdra\",\"hjybigehoqfbo\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"nyktzlcuiy\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"qyw\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"drvyn\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"gpphrcgyn\"}]}") + "{\"dataAccountType\":\"ManagedDisk\",\"blobFilterDetails\":{\"blobPrefixList\":[\"yxzk\",\"noc\"],\"blobPathList\":[\"klyaxuconu\",\"szfkbe\",\"pewr\"],\"containerList\":[\"wv\",\"jektcxsenh\",\"lrsf\",\"rzpwvlqdqgbiq\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"kaet\",\"kt\",\"fcivfsnkym\"],\"filePathList\":[\"qhjfbebr\",\"cxerf\",\"wutttxfvjrbi\"],\"fileShareList\":[\"xepcyvahfn\",\"jky\",\"xjvuujqgidokg\",\"ljyoxgvcltb\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"ghkjeszzhbi\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"txfvgx\"}]}") .toObject(TransferFilterDetails.class); Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.dataAccountType()); - Assertions.assertEquals("zao", model.blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("qciwqvhkhixuigdt", model.blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("objoghmewu", model.blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("hrzayvvtpgvdf", model.azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("dt", model.azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("rvqdra", model.azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_FILE, model.filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("nyktzlcuiy", model.filterFileDetails().get(0).filterFilePath()); + Assertions.assertEquals("yxzk", model.blobFilterDetails().blobPrefixList().get(0)); + Assertions.assertEquals("klyaxuconu", model.blobFilterDetails().blobPathList().get(0)); + Assertions.assertEquals("wv", model.blobFilterDetails().containerList().get(0)); + Assertions.assertEquals("kaet", model.azureFileFilterDetails().filePrefixList().get(0)); + Assertions.assertEquals("qhjfbebr", model.azureFileFilterDetails().filePathList().get(0)); + Assertions.assertEquals("xepcyvahfn", model.azureFileFilterDetails().fileShareList().get(0)); + Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.filterFileDetails().get(0).filterFileType()); + Assertions.assertEquals("ghkjeszzhbi", model.filterFileDetails().get(0).filterFilePath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { TransferFilterDetails model = new TransferFilterDetails().withDataAccountType(DataAccountType.MANAGED_DISK) - .withBlobFilterDetails( - new BlobFilterDetails().withBlobPrefixList(Arrays.asList("zao", "vuhrhcffcyddgl", "jthjqkwpyei")) - .withBlobPathList(Arrays.asList("qciwqvhkhixuigdt")) - .withContainerList(Arrays.asList("objoghmewu"))) - .withAzureFileFilterDetails(new AzureFileFilterDetails() - .withFilePrefixList(Arrays.asList("hrzayvvtpgvdf", "iotkftutqxl", "gxlefgugnxkrxd")) - .withFilePathList(Arrays.asList("dt")) - .withFileShareList(Arrays.asList("rvqdra", "hjybigehoqfbo"))) + .withBlobFilterDetails(new BlobFilterDetails().withBlobPrefixList(Arrays.asList("yxzk", "noc")) + .withBlobPathList(Arrays.asList("klyaxuconu", "szfkbe", "pewr")) + .withContainerList(Arrays.asList("wv", "jektcxsenh", "lrsf", "rzpwvlqdqgbiq"))) + .withAzureFileFilterDetails( + new AzureFileFilterDetails().withFilePrefixList(Arrays.asList("kaet", "kt", "fcivfsnkym")) + .withFilePathList(Arrays.asList("qhjfbebr", "cxerf", "wutttxfvjrbi")) + .withFileShareList(Arrays.asList("xepcyvahfn", "jky", "xjvuujqgidokg", "ljyoxgvcltb"))) .withFilterFileDetails(Arrays.asList( - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("nyktzlcuiy"), - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("qyw"), - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("drvyn"), - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("gpphrcgyn"))); + new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_BLOB).withFilterFilePath("ghkjeszzhbi"), + new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_FILE).withFilterFilePath("txfvgx"))); model = BinaryData.fromObject(model).toObject(TransferFilterDetails.class); Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.dataAccountType()); - Assertions.assertEquals("zao", model.blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("qciwqvhkhixuigdt", model.blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("objoghmewu", model.blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("hrzayvvtpgvdf", model.azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("dt", model.azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("rvqdra", model.azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_FILE, model.filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("nyktzlcuiy", model.filterFileDetails().get(0).filterFilePath()); + Assertions.assertEquals("yxzk", model.blobFilterDetails().blobPrefixList().get(0)); + Assertions.assertEquals("klyaxuconu", model.blobFilterDetails().blobPathList().get(0)); + Assertions.assertEquals("wv", model.blobFilterDetails().containerList().get(0)); + Assertions.assertEquals("kaet", model.azureFileFilterDetails().filePrefixList().get(0)); + Assertions.assertEquals("qhjfbebr", model.azureFileFilterDetails().filePathList().get(0)); + Assertions.assertEquals("xepcyvahfn", model.azureFileFilterDetails().fileShareList().get(0)); + Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.filterFileDetails().get(0).filterFileType()); + Assertions.assertEquals("ghkjeszzhbi", model.filterFileDetails().get(0).filterFilePath()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityDetailsTests.java index 5c6b06dbdef60..25fa1579948d7 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityDetailsTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { TransportAvailabilityDetails model = BinaryData.fromString("{\"shipmentType\":\"CustomerManaged\"}") .toObject(TransportAvailabilityDetails.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransportAvailabilityDetails model = new TransportAvailabilityDetails(); - model = BinaryData.fromObject(model).toObject(TransportAvailabilityDetails.class); - } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityRequestTests.java index 065f152cf42a9..e0fe919390661 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityResponseTests.java index 31b4cd4ab674b..0a28ed8de2264 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityResponseTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -10,14 +10,8 @@ public final class TransportAvailabilityResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TransportAvailabilityResponse model = BinaryData.fromString( - "{\"transportAvailabilityDetails\":[{\"shipmentType\":\"MicrosoftManaged\"},{\"shipmentType\":\"CustomerManaged\"}]}") - .toObject(TransportAvailabilityResponse.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransportAvailabilityResponse model = new TransportAvailabilityResponse(); - model = BinaryData.fromObject(model).toObject(TransportAvailabilityResponse.class); + TransportAvailabilityResponse model + = BinaryData.fromString("{\"transportAvailabilityDetails\":[{\"shipmentType\":\"MicrosoftManaged\"}]}") + .toObject(TransportAvailabilityResponse.class); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportPreferencesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportPreferencesTests.java index 35298403ead86..41e6df22195cc 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportPreferencesTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportPreferencesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedIdentityTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedIdentityTests.java index eab0ea8f6cb08..9a3c09f084b05 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedIdentityTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -10,9 +10,8 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model - = BinaryData.fromString("{\"principalId\":\"dptkoenkouk\",\"clientId\":\"udwtiukbl\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"ylwz\",\"clientId\":\"dhxujznbmpo\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedPropertiesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedPropertiesTests.java index b587358de4cb3..91ced279fcc88 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedPropertiesTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; @@ -12,14 +12,14 @@ public final class UserAssignedPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserAssignedProperties model - = BinaryData.fromString("{\"resourceId\":\"f\"}").toObject(UserAssignedProperties.class); - Assertions.assertEquals("f", model.resourceId()); + = BinaryData.fromString("{\"resourceId\":\"qxtccmgyudx\"}").toObject(UserAssignedProperties.class); + Assertions.assertEquals("qxtccmgyudx", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserAssignedProperties model = new UserAssignedProperties().withResourceId("f"); + UserAssignedProperties model = new UserAssignedProperties().withResourceId("qxtccmgyudx"); model = BinaryData.fromObject(model).toObject(UserAssignedProperties.class); - Assertions.assertEquals("f", model.resourceId()); + Assertions.assertEquals("qxtccmgyudx", model.resourceId()); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationInputRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationInputRequestTests.java index b8f3a0ed60958..92ede0113af47 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationInputRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationInputRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationRequestTests.java index bd467b1c57c9c..7ef1232c4efc4 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationRequestTests.java +++ b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.databox.generated; diff --git a/sdk/databox/azure-resourcemanager-databox/tsp-location.yaml b/sdk/databox/azure-resourcemanager-databox/tsp-location.yaml new file mode 100644 index 0000000000000..6778eb270b27b --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/databox/resource-manager/Microsoft.DataBox/DataBox +commit: 53fc8d667c2b484f58c938166b1cd146e69467c5 +repo: Azure/azure-rest-api-specs +additionalDirectories: From 7fcd7ddbe7eca4efde02264200cf7c3a8a5814ca Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 12 Oct 2026 14:58:46 +0800 Subject: [PATCH 2/3] Skip Revapi for accepted Data Box TypeSpec migration changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bd7a0557-efcc-4fd1-950f-c8ac9b171df7 --- sdk/databox/azure-resourcemanager-databox/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/databox/azure-resourcemanager-databox/pom.xml b/sdk/databox/azure-resourcemanager-databox/pom.xml index 99b5b965d44f1..266b104f60b4c 100644 --- a/sdk/databox/azure-resourcemanager-databox/pom.xml +++ b/sdk/databox/azure-resourcemanager-databox/pom.xml @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true From 733ffa793c16b0e53b62240f8c1fa05715167b86 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 25 Nov 2026 12:19:07 +0800 Subject: [PATCH 3/3] Regenerate management SDK with Java emitter 0.49.2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 21414032-74cf-43a0-b7a5-6b4cb46e104f --- .../DataBoxManagementClientImpl.java | 42 +- .../implementation/JobResourceImpl.java | 17 +- .../implementation/JobsClientImpl.java | 425 ++---------------- .../databox/implementation/JobsImpl.java | 74 +-- .../implementation/OperationsClientImpl.java | 31 +- .../implementation/OperationsImpl.java | 3 +- .../implementation/ResourceManagerUtils.java | 11 + .../ResourceProvidersClientImpl.java | 26 +- .../implementation/ResourceProvidersImpl.java | 2 +- .../implementation/ServicesClientImpl.java | 164 +------ .../databox/implementation/ServicesImpl.java | 4 +- 11 files changed, 137 insertions(+), 662 deletions(-) diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java index 2b094b8faac39..375004403e2b7 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java @@ -22,6 +22,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollResponse; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; @@ -263,6 +264,24 @@ public SyncPoller, U> getLroResult(Response act defaultPollInterval, () -> activationResponse, context); } + /** + * Waits for completion and gets the final result, or throws an error. + * + * @param poller the synchronous poller. + * @param type of poll result. + * @param type of final result. + * @return the final result. + * @throws ManagementException if the long running operation fails. + */ + public U getLroFinalResultOrError(SyncPoller, U> poller) { + PollResponse> response = poller.waitForCompletion(); + ManagementException exception = getLroException(response.getStatus(), response.getValue()); + if (exception != null) { + throw exception; + } + return poller.getFinalResult(); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -272,17 +291,25 @@ public SyncPoller, U> getLroResult(Response act * @return the final result, or an error. */ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + ManagementException exception = getLroException(response.getStatus(), response.getValue()); + if (exception != null) { + return Mono.error(exception); + } + return response.getFinalResult(); + } + + private ManagementException getLroException(LongRunningOperationStatus status, PollResult result) { + PollResult.Error lroError = result == null ? null : result.getError(); + if (status != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED || lroError != null) { String errorMessage; ManagementError managementError = null; HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); + errorMessage = lroError.getMessage(); + String errorBody = lroError.getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { @@ -301,12 +328,11 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, } if (managementError == null) { // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); + managementError = new ManagementError(status.toString(), errorMessage); } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); + return new ManagementException(errorMessage, errorResponse, managementError); } + return null; } private static final class HttpResponseImpl extends HttpResponse { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java index 473a994782454..095b10de2a1f9 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java @@ -176,10 +176,7 @@ public JobResourceImpl withExistingResourceGroup(String resourceGroupName) { } public JobResource create() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .create(resourceGroupName, jobName, this.innerModel(), Context.NONE); - return this; + return this.create(Context.NONE); } public JobResource create(Context context) { @@ -201,10 +198,7 @@ public JobResourceImpl update() { } public JobResource apply() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .update(resourceGroupName, jobName, updateJobResourceUpdateParameter, updateIfMatch, Context.NONE); - return this; + return this.apply(Context.NONE); } public JobResource apply(Context context) { @@ -226,12 +220,7 @@ public JobResource apply(Context context) { } public JobResource refresh() { - String localExpand = null; - this.innerObject = serviceManager.serviceClient() - .getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, localExpand, Context.NONE) - .getValue(); - return this; + return this.refresh(Context.NONE); } public JobResource refresh(Context context) { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java index 3834e2bc510d5..911f710b6699f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java @@ -350,19 +350,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Gets information about the specified job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param expand $expand is supported on details parameter for job, which provides details on the job stages. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand, Context context) { @@ -371,17 +359,7 @@ public Response getByResourceGroupWithResponse(String resource this.client.getSubscriptionId(), resourceGroupName, jobName, expand, accept, context); } - /** - * Gets information about the specified job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public JobResourceInner getByResourceGroup(String resourceGroupName, String jobName) { final String expand = null; @@ -428,11 +406,7 @@ private Mono>> createWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response createWithResponse(String resourceGroupName, String jobName, JobResourceInner jobResource) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, jobResource, - Context.NONE); + return createWithResponse(resourceGroupName, jobName, jobResource, Context.NONE); } /** @@ -479,41 +453,14 @@ private PollerFlux, JobResourceInner> beginCreateAs JobResourceInner.class, JobResourceInner.class, this.client.getContext()); } - /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName, JobResourceInner jobResource) { - Response response = createWithResponse(resourceGroupName, jobName, jobResource); - return this.client.getLroResult(response, JobResourceInner.class, - JobResourceInner.class, Context.NONE); + return beginCreate(resourceGroupName, jobName, jobResource, Context.NONE); } - /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) { @@ -541,42 +488,17 @@ private Mono createAsync(String resourceGroupName, String jobN .flatMap(this.client::getLroFinalResultOrError); } - /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource) { - return beginCreate(resourceGroupName, jobName, jobResource).getFinalResult(); + return create(resourceGroupName, jobName, jobResource, Context.NONE); } - /** - * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead - * be updated with the Update job API. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResource Job details from request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) { - return beginCreate(resourceGroupName, jobName, jobResource, context).getFinalResult(); + return this.client.getLroFinalResultOrError(beginCreate(resourceGroupName, jobName, jobResource, context)); } /** @@ -622,11 +544,7 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, jobName, ifMatch, contentType, accept, - jobResourceUpdateParameter, Context.NONE); + return updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE); } /** @@ -716,49 +634,18 @@ private PollerFlux, JobResourceInner> beginUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { - Response response - = updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); - return this.client.getLroResult(response, JobResourceInner.class, - JobResourceInner.class, Context.NONE); + return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE); } - /** - * Updates the properties of an existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { final String ifMatch = null; - Response response - = updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch); - return this.client.getLroResult(response, JobResourceInner.class, - JobResourceInner.class, Context.NONE); + return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE); } - /** - * Updates the properties of an existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { @@ -809,44 +696,20 @@ private Mono updateAsync(String resourceGroupName, String jobN .flatMap(this.client::getLroFinalResultOrError); } - /** - * Updates the properties of an existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public JobResourceInner update(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { final String ifMatch = null; - return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).getFinalResult(); + return update(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE); } - /** - * Updates the properties of an existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param jobResourceUpdateParameter Job update parameters from request body. - * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the - * server matches this value. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public JobResourceInner update(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) { - return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context).getFinalResult(); + return this.client.getLroFinalResultOrError( + beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context)); } /** @@ -881,8 +744,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String jobName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, jobName, Context.NONE); + return deleteWithResponse(resourceGroupName, jobName, Context.NONE); } /** @@ -921,35 +783,13 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup this.client.getContext()); } - /** - * Deletes a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName) { - Response response = deleteWithResponse(resourceGroupName, jobName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + return beginDelete(resourceGroupName, jobName, Context.NONE); } - /** - * Deletes a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ + @Override @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context) { Response response = deleteWithResponse(resourceGroupName, jobName, context); @@ -972,35 +812,16 @@ private Mono deleteAsync(String resourceGroupName, String jobName) { return beginDeleteAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Deletes a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String jobName) { - beginDelete(resourceGroupName, jobName).getFinalResult(); + delete(resourceGroupName, jobName, Context.NONE); } - /** - * Deletes a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String jobName, Context context) { - beginDelete(resourceGroupName, jobName, context).getFinalResult(); + this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, jobName, context)); } /** @@ -1069,12 +890,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String skipToken) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupSinglePage(resourceGroupName, skipToken, Context.NONE); } /** @@ -1099,33 +915,14 @@ private PagedResponse listByResourceGroupSinglePage(String res res.getValue().nextLink(), null); } - /** - * Lists all the jobs available under the given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { final String skipToken = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, skipToken), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + return listByResourceGroup(resourceGroupName, skipToken, Context.NONE); } - /** - * Lists all the jobs available under the given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context) { @@ -1191,11 +988,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String skipToken) { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), skipToken, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(skipToken, Context.NONE); } /** @@ -1217,29 +1010,14 @@ private PagedResponse listSinglePage(String skipToken, Context res.getValue().nextLink(), null); } - /** - * Lists all the jobs available under the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { final String skipToken = null; - return new PagedIterable<>(() -> listSinglePage(skipToken), nextLink -> listNextSinglePage(nextLink)); + return list(skipToken, Context.NONE); } - /** - * Lists all the jobs available under the subscription. - * - * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String skipToken, Context context) { return new PagedIterable<>(() -> listSinglePage(skipToken, context), @@ -1289,19 +1067,7 @@ private Mono bookShipmentPickUpAsync(String resourc .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Book shipment pick up. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param shipmentPickUpRequest Details of shipment pick up request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shipment pick up response along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response bookShipmentPickUpWithResponse(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context) { @@ -1312,18 +1078,7 @@ public Response bookShipmentPickUpWithResponse(Stri context); } - /** - * Book shipment pick up. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param shipmentPickUpRequest Details of shipment pick up request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return shipment pick up response. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { @@ -1370,19 +1125,7 @@ private Mono cancelAsync(String resourceGroupName, String jobName, Cancell return cancelWithResponseAsync(resourceGroupName, jobName, cancellationReason).flatMap(ignored -> Mono.empty()); } - /** - * CancelJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param cancellationReason Reason for cancellation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response cancelWithResponse(String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context) { @@ -1391,17 +1134,7 @@ public Response cancelWithResponse(String resourceGroupName, String jobNam this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, cancellationReason, context); } - /** - * CancelJob. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param cancellationReason Reason for cancellation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason) { cancelWithResponse(resourceGroupName, jobName, cancellationReason, Context.NONE); @@ -1462,12 +1195,7 @@ private PagedFlux listCredentialsAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listCredentialsSinglePage(String resourceGroupName, String jobName) { - final String accept = "application/json"; - Response res - = service.listCredentialsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, jobName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listCredentialsSinglePage(resourceGroupName, jobName, Context.NONE); } /** @@ -1492,35 +1220,13 @@ private PagedResponse listCredentialsSinglePage(Str res.getValue().nextLink(), null); } - /** - * This method gets the unencrypted secrets related to the job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listCredentials(String resourceGroupName, String jobName) { - return new PagedIterable<>(() -> listCredentialsSinglePage(resourceGroupName, jobName), - nextLink -> listCredentialsNextSinglePage(nextLink)); + return listCredentials(resourceGroupName, jobName, Context.NONE); } - /** - * This method gets the unencrypted secrets related to the job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listCredentials(String resourceGroupName, String jobName, Context context) { @@ -1570,19 +1276,7 @@ private Mono markDevicesShippedAsync(String jobName, String resourceGroupN .flatMap(ignored -> Mono.empty()); } - /** - * Request to mark devices for a given job as shipped. - * - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param markDevicesShippedRequest Mark Devices Shipped Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response markDevicesShippedWithResponse(String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest, Context context) { @@ -1592,17 +1286,7 @@ public Response markDevicesShippedWithResponse(String jobName, String reso context); } - /** - * Request to mark devices for a given job as shipped. - * - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param markDevicesShippedRequest Mark Devices Shipped Request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void markDevicesShipped(String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) { @@ -1640,11 +1324,7 @@ private Mono> listByResourceGroupNextSinglePageA */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** @@ -1695,10 +1375,7 @@ private Mono> listNextSinglePageAsync(String nex */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** @@ -1750,11 +1427,7 @@ private Mono> listCredentialsNextSing */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listCredentialsNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listCredentialsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listCredentialsNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java index 30ee25ef7ee05..600ebcf890bdf 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java @@ -51,7 +51,7 @@ public JobResource getByResourceGroup(String resourceGroupName, String jobName) } public void deleteByResourceGroup(String resourceGroupName, String jobName) { - this.serviceClient().delete(resourceGroupName, jobName); + this.delete(resourceGroupName, jobName, Context.NONE); } public void delete(String resourceGroupName, String jobName, Context context) { @@ -104,13 +104,11 @@ public Response cancelWithResponse(String resourceGroupName, String jobNam } public void cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason) { - this.serviceClient().cancel(resourceGroupName, jobName, cancellationReason); + this.cancelWithResponse(resourceGroupName, jobName, cancellationReason, Context.NONE); } public PagedIterable listCredentials(String resourceGroupName, String jobName) { - PagedIterable inner - = this.serviceClient().listCredentials(resourceGroupName, jobName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UnencryptedCredentialsImpl(inner1, this.manager())); + return this.listCredentials(resourceGroupName, jobName, Context.NONE); } public PagedIterable listCredentials(String resourceGroupName, String jobName, @@ -128,79 +126,35 @@ public Response markDevicesShippedWithResponse(String jobName, String reso public void markDevicesShipped(String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) { - this.serviceClient().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest); + this.markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, Context.NONE); } public JobResource getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "jobName"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } String localExpand = null; - return this.getByResourceGroupWithResponse(resourceGroupName, jobName, localExpand, Context.NONE).getValue(); + return this.getByIdWithResponse(id, localExpand, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, String expand, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String jobName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "jobName"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } + "jobName", "jobs", LOGGER); return this.getByResourceGroupWithResponse(resourceGroupName, jobName, expand, context); } public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByParameterName(id, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "jobName"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, jobName, Context.NONE); + this.deleteByIdWithResponse(id, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(id, + String resourceGroupName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "resourceGroupName"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = ResourceManagerUtils.getValueFromIdByParameterName(id, + "resourceGroupName", "resourceGroups", LOGGER); + String jobName = ResourceManagerUtils.getRequiredValueFromIdByParameterName(id, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", - "jobName"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } + "jobName", "jobs", LOGGER); this.delete(resourceGroupName, jobName, context); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java index 5ac9a92894162..c962414e7300f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java @@ -131,11 +131,7 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res - = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listSinglePage(Context.NONE); } /** @@ -156,27 +152,13 @@ private PagedResponse listSinglePage(Context context) { res.getValue().nextLink(), null); } - /** - * List the operations for the provider. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + return list(Context.NONE); } - /** - * List the operations for the provider. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); @@ -212,10 +194,7 @@ private Mono> listNextSinglePageAsync(String nextL */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java index acb58fc02a592..c14c3ae45fc3f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java @@ -26,8 +26,7 @@ public OperationsImpl(OperationsClient innerClient, } public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return this.list(Context.NONE); } public PagedIterable list(Context context) { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java index f346e5d1e7857..8348435590081 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceManagerUtils.java @@ -8,6 +8,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.util.logging.ClientLogger; import java.util.Arrays; import java.util.Iterator; import java.util.function.Function; @@ -58,6 +59,16 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri return idIndex < idStart ? value : null; } + static String getRequiredValueFromIdByParameterName(String id, String pathTemplate, String parameterName, + String segmentName, ClientLogger logger) { + String value = getValueFromIdByParameterName(id, pathTemplate, parameterName); + if (value == null) { + throw logger.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment '%s'.", id, segmentName))); + } + return value; + } + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { return new PagedIterableImpl<>(pageIterable, mapper); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java index 886f284e7f845..edae2e946854e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java @@ -119,19 +119,7 @@ private Mono mitigateAsync(String jobName, String resourceGroupName, Mitig .flatMap(ignored -> Mono.empty()); } - /** - * Request to mitigate for a given job. - * - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param mitigateJobRequest Mitigation Request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response mitigateWithResponse(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context) { @@ -140,17 +128,7 @@ public Response mitigateWithResponse(String jobName, String resourceGroupN this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, mitigateJobRequest, context); } - /** - * Request to mitigate for a given job. - * - * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and - * 24 characters in length and use any alphanumeric and underscore only. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param mitigateJobRequest Mitigation Request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) { mitigateWithResponse(jobName, resourceGroupName, mitigateJobRequest, Context.NONE); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java index 470f33dc38a78..6ca86dae961ab 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java @@ -30,7 +30,7 @@ public Response mitigateWithResponse(String jobName, String resourceGroupN } public void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) { - this.serviceClient().mitigate(jobName, resourceGroupName, mitigateJobRequest); + this.mitigateWithResponse(jobName, resourceGroupName, mitigateJobRequest, Context.NONE); } private ResourceProvidersClient serviceClient() { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java index aabccf38405fa..36e561bbf2e62 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java @@ -238,17 +238,7 @@ private Mono regionConfigurationAsync(String l .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * This API provides configuration details specific to given region/location at Subscription level. - * - * @param location The name of the Azure region. - * @param regionConfigurationRequest The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response regionConfigurationWithResponse(String location, RegionConfigurationRequest regionConfigurationRequest, Context context) { @@ -258,16 +248,7 @@ public Response regionConfigurationWithRespons this.client.getSubscriptionId(), location, contentType, accept, regionConfigurationRequest, context); } - /** - * This API provides configuration details specific to given region/location at Subscription level. - * - * @param location The name of the Azure region. - * @param regionConfigurationRequest The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public RegionConfigurationResponseInner regionConfiguration(String location, RegionConfigurationRequest regionConfigurationRequest) { @@ -314,18 +295,7 @@ private Mono validateAddressAsync(String location, .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and - * provide alternate addresses if any. - * - * @param location The name of the Azure region. - * @param validateAddress The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of the address validation api along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response validateAddressWithResponse(String location, ValidateAddress validateAddress, Context context) { @@ -335,17 +305,7 @@ public Response validateAddressWithResponse(String this.client.getSubscriptionId(), location, contentType, accept, validateAddress, context); } - /** - * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and - * provide alternate addresses if any. - * - * @param location The name of the Azure region. - * @param validateAddress The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return output of the address validation api. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public AddressValidationOutputInner validateAddress(String location, ValidateAddress validateAddress) { return validateAddressWithResponse(location, validateAddress, Context.NONE).getValue(); @@ -389,17 +349,7 @@ private Mono validateInputsAsync(String location, Valid .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @param location The name of the Azure region. - * @param validationRequest The request body. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response validateInputsWithResponse(String location, ValidationRequest validationRequest, Context context) { @@ -409,16 +359,7 @@ public Response validateInputsWithResponse(String locat this.client.getSubscriptionId(), location, contentType, accept, validationRequest, context); } - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @param location The name of the Azure region. - * @param validationRequest The request body. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest) { return validateInputsWithResponse(location, validationRequest, Context.NONE).getValue(); @@ -482,12 +423,8 @@ private PagedFlux listAvailableSkusByResourceGroupAsync(Str @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAvailableSkusByResourceGroupSinglePage(String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest) { - final String accept = "application/json"; - Response res = service.listAvailableSkusByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, location, accept, - availableSkuRequest, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listAvailableSkusByResourceGroupSinglePage(resourceGroupName, location, availableSkuRequest, + Context.NONE); } /** @@ -513,37 +450,14 @@ private PagedResponse listAvailableSkusByResourceGroupSingl res.getValue().nextLink(), null); } - /** - * This method provides the list of available skus for the given subscription, resource group and location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param availableSkuRequest Filters for showing the available skus. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest) { - return new PagedIterable<>( - () -> listAvailableSkusByResourceGroupSinglePage(resourceGroupName, location, availableSkuRequest), - nextLink -> listAvailableSkusByResourceGroupNextSinglePage(nextLink)); + return listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest, Context.NONE); } - /** - * This method provides the list of available skus for the given subscription, resource group and location. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param availableSkuRequest Filters for showing the available skus. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response as paginated response with {@link PagedIterable}. - */ + @Override @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest, Context context) { @@ -594,18 +508,7 @@ private Mono regionConfigurationByResourceGrou regionConfigurationRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * This API provides configuration details specific to given region/location at Resource group level. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response regionConfigurationByResourceGroupWithResponse( String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest, @@ -617,17 +520,7 @@ public Response regionConfigurationByResourceG regionConfigurationRequest, context); } - /** - * This API provides configuration details specific to given region/location at Resource group level. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration response specific to a region. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { @@ -677,18 +570,7 @@ private Mono validateInputsByResourceGroupAsync(String .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * This method does all necessary pre-job creation validation under resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Inputs of the customer. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations along with {@link Response}. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public Response validateInputsByResourceGroupWithResponse(String resourceGroupName, String location, ValidationRequest validationRequest, Context context) { @@ -699,17 +581,7 @@ public Response validateInputsByResourceGroupWithRespon context); } - /** - * This method does all necessary pre-job creation validation under resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of the Azure region. - * @param validationRequest Inputs of the customer. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of pre job creation validations. - */ + @Override @ServiceMethod(returns = ReturnType.SINGLE) public ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location, ValidationRequest validationRequest) { @@ -750,11 +622,7 @@ public ValidationResponseInner validateInputsByResourceGroup(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listAvailableSkusByResourceGroupNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res = service.listAvailableSkusByResourceGroupNextSync(nextLink, - this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return listAvailableSkusByResourceGroupNextSinglePage(nextLink, Context.NONE); } /** diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java index d0f7dcfa3fe11..a7357405498e5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java @@ -91,9 +91,7 @@ public ValidationResponse validateInputs(String location, ValidationRequest vali public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest) { - PagedIterable inner - = this.serviceClient().listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager())); + return this.listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest, Context.NONE); } public PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location,