From 7363d76bb6de97d7b2e1a76143165cbbac7cea1e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 7 Dec 2021 14:46:58 +0000 Subject: [PATCH] CodeGen from PR 16989 in Azure/azure-rest-api-specs Merge 63aaa34faabe8b8da7fab997983aac5f100c749b into be8b6e1fc69e7c2700847d6a9c344c0e204294ce --- .../databox/DataBoxManager.java | 251 -- .../fluent/DataBoxManagementClient.java | 74 - .../databox/fluent/JobsClient.java | 424 --- .../databox/fluent/OperationsClient.java | 36 - .../fluent/ResourceProvidersClient.java | 45 - .../databox/fluent/ServicesClient.java | 205 -- .../models/AddressValidationOutputInner.java | 81 - .../fluent/models/JobResourceInner.java | 428 --- .../databox/fluent/models/OperationInner.java | 116 - .../RegionConfigurationResponseInner.java | 62 - .../models/ShipmentPickUpResponseInner.java | 57 - .../fluent/models/SkuInformationInner.java | 179 -- .../models/UnencryptedCredentialsInner.java | 58 - .../models/ValidationResponseInner.java | 64 - .../databox/fluent/models/package-info.java | 6 - .../databox/fluent/package-info.java | 6 - .../AddressValidationOutputImpl.java | 50 - .../DataBoxManagementClientBuilder.java | 146 -- .../DataBoxManagementClientImpl.java | 335 --- .../implementation/JobResourceImpl.java | 324 --- .../implementation/JobsClientImpl.java | 2321 ----------------- .../databox/implementation/JobsImpl.java | 227 -- .../databox/implementation/OperationImpl.java | 48 - .../implementation/OperationsClientImpl.java | 269 -- .../implementation/OperationsImpl.java | 46 - .../RegionConfigurationResponseImpl.java | 38 - .../ResourceProvidersClientImpl.java | 239 -- .../implementation/ResourceProvidersImpl.java | 44 - .../implementation/ServicesClientImpl.java | 1272 --------- .../databox/implementation/ServicesImpl.java | 199 -- .../ShipmentPickUpResponseImpl.java | 37 - .../implementation/SkuInformationImpl.java | 86 - .../UnencryptedCredentialsImpl.java | 37 - .../databox/implementation/Utils.java | 204 -- .../ValidationResponseImpl.java | 45 - .../databox/implementation/package-info.java | 6 - .../databox/models/AccessProtocol.java | 47 - .../models/AccountCredentialDetails.java | 90 - .../databox/models/AdditionalErrorInfo.java | 76 - .../databox/models/AddressType.java | 50 - .../models/AddressValidationOutput.java | 39 - .../models/AddressValidationProperties.java | 64 - .../models/AddressValidationStatus.java | 50 - .../models/ApplianceNetworkConfiguration.java | 54 - .../databox/models/AvailableSkuRequest.java | 151 -- .../databox/models/AvailableSkusResult.java | 70 - .../models/AzureFileFilterDetails.java | 103 - .../databox/models/BlobFilterDetails.java | 103 - .../databox/models/CancellationReason.java | 55 - .../databox/models/ClassDiscriminator.java | 50 - .../databox/models/CloudError.java | 139 - .../databox/models/ContactDetails.java | 199 -- .../databox/models/CopyLogDetails.java | 37 - .../databox/models/CopyProgress.java | 259 -- .../databox/models/CopyStatus.java | 74 - .../databox/models/CreateJobValidations.java | 37 - ...LimitForSubscriptionValidationRequest.java | 64 - ...scriptionValidationResponseProperties.java | 47 - .../models/CustomerResolutionCode.java | 50 - .../databox/models/DataAccountDetails.java | 80 - .../databox/models/DataAccountType.java | 47 - .../models/DataBoxAccountCopyLogDetails.java | 77 - .../models/DataBoxDiskCopyLogDetails.java | 75 - .../models/DataBoxDiskCopyProgress.java | 84 - .../databox/models/DataBoxDiskJobDetails.java | 174 -- .../databox/models/DataBoxDiskJobSecrets.java | 79 - .../DataBoxHeavyAccountCopyLogDetails.java | 78 - .../models/DataBoxHeavyJobDetails.java | 141 - .../models/DataBoxHeavyJobSecrets.java | 49 - .../databox/models/DataBoxHeavySecret.java | 106 - .../databox/models/DataBoxJobDetails.java | 141 - .../DataBoxScheduleAvailabilityRequest.java | 43 - .../databox/models/DataBoxSecret.java | 106 - .../databox/models/DataExportDetails.java | 118 - .../databox/models/DataImportDetails.java | 58 - .../DataLocationToServiceLocationMap.java | 54 - .../DataTransferDetailsValidationRequest.java | 153 -- ...erDetailsValidationResponseProperties.java | 46 - .../databox/models/DataboxJobSecrets.java | 60 - .../databox/models/DcAccessSecurityCode.java | 76 - .../DiskScheduleAvailabilityRequest.java | 73 - .../databox/models/DiskSecret.java | 55 - .../databox/models/DoubleEncryption.java | 47 - .../databox/models/EncryptionPreferences.java | 50 - .../databox/models/FilterFileDetails.java | 88 - .../databox/models/FilterFileType.java | 47 - .../HeavyScheduleAvailabilityRequest.java | 43 - .../databox/models/IdentityProperties.java | 79 - .../databox/models/JobDeliveryInfo.java | 51 - .../databox/models/JobDeliveryType.java | 47 - .../databox/models/JobDetails.java | 381 --- .../databox/models/JobResource.java | 477 ---- .../databox/models/JobResourceList.java | 81 - .../models/JobResourceUpdateParameter.java | 114 - .../databox/models/JobSecrets.java | 74 - .../databox/models/JobStages.java | 100 - .../resourcemanager/databox/models/Jobs.java | 251 -- .../databox/models/KekType.java | 47 - .../databox/models/KeyEncryptionKey.java | 137 - .../models/LastMitigationActionOnJob.java | 107 - .../databox/models/LogCollectionLevel.java | 47 - .../databox/models/ManagedDiskDetails.java | 104 - .../databox/models/MitigateJobRequest.java | 56 - .../models/NotificationPreference.java | 82 - .../databox/models/NotificationStageName.java | 59 - .../databox/models/Operation.java | 53 - .../databox/models/OperationDisplay.java | 128 - .../databox/models/OperationList.java | 70 - .../databox/models/Operations.java | 31 - .../models/OverallValidationStatus.java | 50 - .../models/PackageShippingDetails.java | 69 - .../databox/models/Preferences.java | 109 - .../models/PreferencesValidationRequest.java | 91 - ...eferencesValidationResponseProperties.java | 45 - .../models/RegionConfigurationRequest.java | 84 - .../models/RegionConfigurationResponse.java | 31 - .../databox/models/ResourceIdentity.java | 117 - .../databox/models/ResourceProviders.java | 40 - .../models/ScheduleAvailabilityRequest.java | 99 - .../models/ScheduleAvailabilityResponse.java | 41 - .../databox/models/Services.java | 183 -- .../models/ShareCredentialDetails.java | 100 - .../models/ShareDestinationFormatType.java | 59 - .../databox/models/ShipmentPickUpRequest.java | 125 - .../models/ShipmentPickUpResponse.java | 33 - .../databox/models/ShippingAddress.java | 294 --- .../resourcemanager/databox/models/Sku.java | 106 - .../SkuAvailabilityValidationRequest.java | 164 -- ...ilabilityValidationResponseProperties.java | 45 - .../databox/models/SkuCapacity.java | 54 - .../databox/models/SkuCost.java | 72 - .../databox/models/SkuDisabledReason.java | 59 - .../databox/models/SkuInformation.java | 81 - .../databox/models/SkuName.java | 50 - .../databox/models/StageName.java | 89 - .../databox/models/StageStatus.java | 68 - .../databox/models/StorageAccountDetails.java | 69 - ...IsAllowedToCreateJobValidationRequest.java | 30 - ...CreateJobValidationResponseProperties.java | 47 - .../databox/models/TransferAllDetails.java | 108 - .../databox/models/TransferConfiguration.java | 121 - ...ansferConfigurationTransferAllDetails.java | 56 - ...ferConfigurationTransferFilterDetails.java | 56 - .../models/TransferConfigurationType.java | 47 - .../databox/models/TransferFilterDetails.java | 144 - .../databox/models/TransferType.java | 47 - .../models/TransportAvailabilityDetails.java | 39 - .../models/TransportAvailabilityRequest.java | 50 - .../models/TransportAvailabilityResponse.java | 43 - .../databox/models/TransportPreferences.java | 56 - .../models/TransportShipmentTypes.java | 47 - .../models/UnencryptedCredentials.java | 31 - .../models/UnencryptedCredentialsList.java | 81 - .../databox/models/UpdateJobDetails.java | 111 - .../databox/models/UserAssignedIdentity.java | 54 - .../models/UserAssignedProperties.java | 51 - .../databox/models/ValidateAddress.java | 123 - .../models/ValidationInputDiscriminator.java | 59 - .../models/ValidationInputRequest.java | 44 - .../models/ValidationInputResponse.java | 65 - .../databox/models/ValidationRequest.java | 72 - .../databox/models/ValidationResponse.java | 33 - .../databox/models/ValidationStatus.java | 50 - .../databox/models/package-info.java | 6 - .../resourcemanager/databox/package-info.java | 6 - .../src/main/java/module-info.java | 19 - 166 files changed, 18920 deletions(-) delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ShipmentPickUpResponseImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/UnencryptedCredentialsImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/Utils.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ValidationResponseImpl.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/package-info.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccessProtocol.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccountCredentialDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationOutput.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationStatus.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ApplianceNetworkConfiguration.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkuRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkusResult.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AzureFileFilterDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/BlobFilterDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CancellationReason.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateJobValidations.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationResponseProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxAccountCopyLogDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyLogDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyProgress.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobSecrets.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyAccountCopyLogDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobSecrets.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavySecret.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxScheduleAvailabilityRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxSecret.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataExportDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataLocationToServiceLocationMap.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationResponseProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataboxJobSecrets.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DcAccessSecurityCode.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskScheduleAvailabilityRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskSecret.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DoubleEncryption.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/EncryptionPreferences.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HeavyScheduleAvailabilityRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/IdentityProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryInfo.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceList.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceUpdateParameter.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobStages.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KekType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KeyEncryptionKey.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LastMitigationActionOnJob.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LogCollectionLevel.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ManagedDiskDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationPreference.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operation.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationDisplay.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationList.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operations.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OverallValidationStatus.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationResponseProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceIdentity.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceProviders.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityResponse.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Services.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareCredentialDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareDestinationFormatType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpResponse.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShippingAddress.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Sku.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationResponseProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCapacity.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCost.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuDisabledReason.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StorageAccountDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferAllDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfiguration.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferAllDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferFilterDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferFilterDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferType.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityResponse.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportShipmentTypes.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentials.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentialsList.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedIdentity.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedProperties.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidateAddress.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputDiscriminator.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputResponse.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationRequest.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationResponse.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationStatus.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/package-info.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/package-info.java delete mode 100644 sdk/databox/azure-resourcemanager-databox/src/main/java/module-info.java 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 deleted file mode 100644 index dcc1eadb4a882..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.DataBoxManagementClient; -import com.azure.resourcemanager.databox.implementation.DataBoxManagementClientBuilder; -import com.azure.resourcemanager.databox.implementation.JobsImpl; -import com.azure.resourcemanager.databox.implementation.OperationsImpl; -import com.azure.resourcemanager.databox.implementation.ResourceProvidersImpl; -import com.azure.resourcemanager.databox.implementation.ServicesImpl; -import com.azure.resourcemanager.databox.models.Jobs; -import com.azure.resourcemanager.databox.models.Operations; -import com.azure.resourcemanager.databox.models.ResourceProviders; -import com.azure.resourcemanager.databox.models.Services; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Entry point to DataBoxManager. */ -public final class DataBoxManager { - private Operations operations; - - private Jobs jobs; - - private ResourceProviders resourceProviders; - - private Services services; - - private final DataBoxManagementClient clientObject; - - private DataBoxManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new DataBoxManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of DataBox service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the DataBox service API instance. - */ - public static DataBoxManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Gets a Configurable instance that can be used to create DataBoxManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new DataBoxManager.Configurable(); - } - - /** The Configurable allowing configurations to be set. */ - public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private RetryPolicy retryPolicy; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of DataBox service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the DataBox service API instance. - */ - public DataBoxManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.databox") - .append("/") - .append("1.0.0-beta.1"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new RequestIdPolicy()); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new DataBoxManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** @return Resource collection API of Jobs. */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); - } - return jobs; - } - - /** @return Resource collection API of ResourceProviders. */ - public ResourceProviders resourceProviders() { - if (this.resourceProviders == null) { - this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); - } - return resourceProviders; - } - - /** @return Resource collection API of Services. */ - public Services services() { - if (this.services == null) { - this.services = new ServicesImpl(clientObject.getServices(), this); - } - return services; - } - - /** - * @return Wrapped service client DataBoxManagementClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. - */ - public DataBoxManagementClient serviceClient() { - return this.clientObject; - } -} 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 deleted file mode 100644 index 73882a1bfcd2c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for DataBoxManagementClient class. */ -public interface DataBoxManagementClient { - /** - * Gets The Subscription Id. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * Gets the ResourceProvidersClient object to access its operations. - * - * @return the ResourceProvidersClient object. - */ - ResourceProvidersClient getResourceProviders(); - - /** - * Gets the ServicesClient object to access its operations. - * - * @return the ServicesClient object. - */ - ServicesClient getServices(); -} 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 deleted file mode 100644 index c7ea07334dc9f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -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.models.CancellationReason; -import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; -import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; - -/** An instance of this class provides access to all the operations defined in JobsClient. */ -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. - */ - @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skipToken, Context context); - - /** - * Lists all the jobs available under the given resource group. - * - * @param resourceGroupName The Resource Group Name. - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * 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. - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - 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. - * @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) - JobResourceInner getByResourceGroup(String resourceGroupName, String jobName); - - /** - * 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String jobName, String expand, 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. - * - * @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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, JobResourceInner> beginCreate( - String resourceGroupName, String jobName, JobResourceInner jobResource); - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, JobResourceInner> beginCreate( - 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. - * - * @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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource); - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, Context context); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String jobName, Context context); - - /** - * Updates the properties of an existing 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 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 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) - SyncPoller, JobResourceInner> beginUpdate( - String resourceGroupName, - String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, - String ifMatch); - - /** - * Updates the properties of an existing 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, JobResourceInner> beginUpdate( - String resourceGroupName, - String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, - String ifMatch, - Context context); - - /** - * Updates the properties of an existing 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 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 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 update( - String resourceGroupName, - String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, - String ifMatch); - - /** - * Updates the properties of an existing 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 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 update( - String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter); - - /** - * Updates the properties of an existing 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobResourceInner update( - String resourceGroupName, - String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, - String ifMatch, - Context context); - - /** - * Book shipment pick up. - * - * @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. - * @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 shipment pick up response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ShipmentPickUpResponseInner bookShipmentPickUp( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest); - - /** - * Book shipment pick up. - * - * @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 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 shipment pick up response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response bookShipmentPickUpWithResponse( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context); - - /** - * 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. - * @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 cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason); - - /** - * 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 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse( - String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context); - - /** - * This method gets the unencrypted secrets related to the 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 list of unencrypted credentials for accessing device. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCredentials(String resourceGroupName, String jobName); - - /** - * This method gets the unencrypted secrets related to the 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 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 list of unencrypted credentials for accessing device. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listCredentials( - String resourceGroupName, String jobName, Context context); -} 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 deleted file mode 100644 index 8c5ca0f8163eb..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.databox.fluent.models.OperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * This method gets all the operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * This method gets all the operations. - * - * @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. - */ - @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 deleted file mode 100644 index 7a3f79325b34e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.databox.models.MitigateJobRequest; - -/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ -public interface ResourceProvidersClient { - /** - * 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest); - - /** - * 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 mitigateJobRequest Mitigation 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response mitigateWithResponse( - String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context); -} 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 deleted file mode 100644 index c71af55f903a9..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner; -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.models.AvailableSkuRequest; -import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; -import com.azure.resourcemanager.databox.models.ValidateAddress; -import com.azure.resourcemanager.databox.models.ValidationRequest; - -/** An instance of this class provides access to all the operations defined in ServicesClient. */ -public interface ServicesClient { - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest); - - /** - * 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. - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest, Context 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. - * @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 output of the address validation api. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AddressValidationOutputInner validateAddress(String location, ValidateAddress validateAddress); - - /** - * [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 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 output of the address validation api. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response validateAddressWithResponse( - String location, ValidateAddress validateAddress, Context 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. - * @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); - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response validateInputsByResourceGroupWithResponse( - String resourceGroupName, String location, ValidationRequest validationRequest, Context context); - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @param location The location of the resource. - * @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 response of pre job creation validations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest); - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @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 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) - Response validateInputsWithResponse( - String location, ValidationRequest validationRequest, Context context); - - /** - * This API provides configuration details specific to given region/location at Subscription level. - * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. - * @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, RegionConfigurationRequest regionConfigurationRequest); - - /** - * This API provides configuration details specific to given region/location at Subscription 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. - * @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) - Response regionConfigurationWithResponse( - String location, RegionConfigurationRequest regionConfigurationRequest, Context context); - - /** - * 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. - * @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 regionConfigurationByResourceGroup( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest); - - /** - * 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 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) - Response regionConfigurationByResourceGroupWithResponse( - String resourceGroupName, - String location, - RegionConfigurationRequest regionConfigurationRequest, - Context context); -} 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 deleted file mode 100644 index 7271be0712851..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.models.AddressValidationStatus; -import com.azure.resourcemanager.databox.models.CloudError; -import com.azure.resourcemanager.databox.models.ShippingAddress; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Output of the address validation api. */ -@JsonFlatten -@Immutable -public class AddressValidationOutputInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressValidationOutputInner.class); - - /* - * Error code and message of validation response. - */ - @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY) - private CloudError error; - - /* - * The address validation status. - */ - @JsonProperty(value = "properties.validationStatus", access = JsonProperty.Access.WRITE_ONLY) - private AddressValidationStatus validationStatus; - - /* - * List of alternate addresses. - */ - @JsonProperty(value = "properties.alternateAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List alternateAddresses; - - /** - * Get the error property: Error code and message of validation response. - * - * @return the error value. - */ - public CloudError error() { - return this.error; - } - - /** - * Get the validationStatus property: The address validation status. - * - * @return the validationStatus value. - */ - public AddressValidationStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the alternateAddresses property: List of alternate addresses. - * - * @return the alternateAddresses value. - */ - public List alternateAddresses() { - return this.alternateAddresses; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - if (alternateAddresses() != null) { - alternateAddresses().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java deleted file mode 100644 index 483ef43dcc657..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.models.CloudError; -import com.azure.resourcemanager.databox.models.JobDeliveryInfo; -import com.azure.resourcemanager.databox.models.JobDeliveryType; -import com.azure.resourcemanager.databox.models.JobDetails; -import com.azure.resourcemanager.databox.models.ResourceIdentity; -import com.azure.resourcemanager.databox.models.Sku; -import com.azure.resourcemanager.databox.models.StageName; -import com.azure.resourcemanager.databox.models.TransferType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.Map; - -/** Job Resource. */ -@JsonFlatten -@Fluent -public class JobResourceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobResourceInner.class); - - /* - * Name of the object. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Id of the object. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Type of the object. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * Type of the data transfer. - */ - @JsonProperty(value = "properties.transferType", required = true) - private TransferType transferType; - - /* - * Describes whether the job is cancellable or not. - */ - @JsonProperty(value = "properties.isCancellable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCancellable; - - /* - * Describes whether the job is deletable or not. - */ - @JsonProperty(value = "properties.isDeletable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDeletable; - - /* - * Describes whether the shipping address is editable or not. - */ - @JsonProperty(value = "properties.isShippingAddressEditable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isShippingAddressEditable; - - /* - * Is Prepare To Ship Enabled on this job - */ - @JsonProperty(value = "properties.isPrepareToShipEnabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isPrepareToShipEnabled; - - /* - * Name of the stage which is in progress. - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private StageName status; - - /* - * Time at which the job was started in UTC ISO 8601 format. - */ - @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * Top level error for the job. - */ - @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY) - private CloudError error; - - /* - * Details of a job run. This field will only be sent for expand details - * filter. - */ - @JsonProperty(value = "properties.details") - private JobDetails details; - - /* - * Reason for cancellation. - */ - @JsonProperty(value = "properties.cancellationReason", access = JsonProperty.Access.WRITE_ONLY) - private String cancellationReason; - - /* - * Delivery type of Job. - */ - @JsonProperty(value = "properties.deliveryType") - private JobDeliveryType deliveryType; - - /* - * Delivery Info of Job. - */ - @JsonProperty(value = "properties.deliveryInfo") - private JobDeliveryInfo deliveryInfo; - - /* - * Flag to indicate cancellation of scheduled job. - */ - @JsonProperty(value = "properties.isCancellableWithoutFee", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCancellableWithoutFee; - - /* - * The sku type. - */ - @JsonProperty(value = "sku", required = true) - private Sku sku; - - /* - * Msi identity of the resource - */ - @JsonProperty(value = "identity") - private ResourceIdentity identity; - - /** - * Get the name property: Name of the object. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the id property: Id of the object. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the type property: Type of the object. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the transferType property: Type of the data transfer. - * - * @return the transferType value. - */ - public TransferType transferType() { - return this.transferType; - } - - /** - * Set the transferType property: Type of the data transfer. - * - * @param transferType the transferType value to set. - * @return the JobResourceInner object itself. - */ - public JobResourceInner withTransferType(TransferType transferType) { - this.transferType = transferType; - return this; - } - - /** - * Get the isCancellable property: Describes whether the job is cancellable or not. - * - * @return the isCancellable value. - */ - public Boolean isCancellable() { - return this.isCancellable; - } - - /** - * Get the isDeletable property: Describes whether the job is deletable or not. - * - * @return the isDeletable value. - */ - public Boolean isDeletable() { - return this.isDeletable; - } - - /** - * Get the isShippingAddressEditable property: Describes whether the shipping address is editable or not. - * - * @return the isShippingAddressEditable value. - */ - public Boolean isShippingAddressEditable() { - return this.isShippingAddressEditable; - } - - /** - * Get the isPrepareToShipEnabled property: Is Prepare To Ship Enabled on this job. - * - * @return the isPrepareToShipEnabled value. - */ - public Boolean isPrepareToShipEnabled() { - return this.isPrepareToShipEnabled; - } - - /** - * Get the status property: Name of the stage which is in progress. - * - * @return the status value. - */ - public StageName status() { - return this.status; - } - - /** - * Get the startTime property: Time at which the job was started in UTC ISO 8601 format. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the error property: Top level error for the job. - * - * @return the error value. - */ - public CloudError error() { - return this.error; - } - - /** - * Get the details property: Details of a job run. This field will only be sent for expand details filter. - * - * @return the details value. - */ - public JobDetails details() { - return this.details; - } - - /** - * Set the details property: Details of a job run. This field will only be sent for expand details filter. - * - * @param details the details value to set. - * @return the JobResourceInner object itself. - */ - public JobResourceInner withDetails(JobDetails details) { - this.details = details; - return this; - } - - /** - * Get the cancellationReason property: Reason for cancellation. - * - * @return the cancellationReason value. - */ - public String cancellationReason() { - return this.cancellationReason; - } - - /** - * Get the deliveryType property: Delivery type of Job. - * - * @return the deliveryType value. - */ - public JobDeliveryType deliveryType() { - return this.deliveryType; - } - - /** - * Set the deliveryType property: Delivery type of Job. - * - * @param deliveryType the deliveryType value to set. - * @return the JobResourceInner object itself. - */ - public JobResourceInner withDeliveryType(JobDeliveryType deliveryType) { - this.deliveryType = deliveryType; - return this; - } - - /** - * Get the deliveryInfo property: Delivery Info of Job. - * - * @return the deliveryInfo value. - */ - public JobDeliveryInfo deliveryInfo() { - return this.deliveryInfo; - } - - /** - * Set the deliveryInfo property: Delivery Info of Job. - * - * @param deliveryInfo the deliveryInfo value to set. - * @return the JobResourceInner object itself. - */ - public JobResourceInner withDeliveryInfo(JobDeliveryInfo deliveryInfo) { - this.deliveryInfo = deliveryInfo; - return this; - } - - /** - * Get the isCancellableWithoutFee property: Flag to indicate cancellation of scheduled job. - * - * @return the isCancellableWithoutFee value. - */ - public Boolean isCancellableWithoutFee() { - return this.isCancellableWithoutFee; - } - - /** - * Get the sku property: The sku type. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku type. - * - * @param sku the sku value to set. - * @return the JobResourceInner object itself. - */ - public JobResourceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: Msi identity of the resource. - * - * @return the identity value. - */ - public ResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Msi identity of the resource. - * - * @param identity the identity value to set. - * @return the JobResourceInner object itself. - */ - public JobResourceInner withIdentity(ResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** {@inheritDoc} */ - @Override - public JobResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transferType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property transferType in model JobResourceInner")); - } - if (error() != null) { - error().validate(); - } - if (details() != null) { - details().validate(); - } - if (deliveryInfo() != null) { - deliveryInfo().validate(); - } - if (sku() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model JobResourceInner")); - } else { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - } -} 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 deleted file mode 100644 index 278520c221ade..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Operation entity. */ -@Fluent -public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - - /* - * Name of the operation. Format: - * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Operation display values. - */ - @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) - private OperationDisplay display; - - /* - * Operation properties. - */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) - private Object properties; - - /* - * Origin of the operation. Can be : user|system|user,system - */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) - private String origin; - - /* - * Indicates whether the operation is a data action - */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; - - /** - * Get the name property: Name of the operation. Format: - * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the display property: Operation display values. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the properties property: Operation properties. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Get the origin property: Origin of the operation. Can be : user|system|user,system. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Get the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - 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(); - } - } -} 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 deleted file mode 100644 index f6142529fe456..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse; -import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration response specific to a region. */ -@Immutable -public final class RegionConfigurationResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegionConfigurationResponseInner.class); - - /* - * Schedule availability for given sku in a region. - */ - @JsonProperty(value = "scheduleAvailabilityResponse", access = JsonProperty.Access.WRITE_ONLY) - private ScheduleAvailabilityResponse scheduleAvailabilityResponse; - - /* - * Transport options available for given sku in a region. - */ - @JsonProperty(value = "transportAvailabilityResponse", access = JsonProperty.Access.WRITE_ONLY) - private TransportAvailabilityResponse transportAvailabilityResponse; - - /** - * Get the scheduleAvailabilityResponse property: Schedule availability for given sku in a region. - * - * @return the scheduleAvailabilityResponse value. - */ - public ScheduleAvailabilityResponse scheduleAvailabilityResponse() { - return this.scheduleAvailabilityResponse; - } - - /** - * Get the transportAvailabilityResponse property: Transport options available for given sku in a region. - * - * @return the transportAvailabilityResponse value. - */ - public TransportAvailabilityResponse transportAvailabilityResponse() { - return this.transportAvailabilityResponse; - } - - /** - * 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(); - } - } -} 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 deleted file mode 100644 index b20b834df6809..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Shipment pick up response. */ -@Immutable -public final class ShipmentPickUpResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShipmentPickUpResponseInner.class); - - /* - * Confirmation number for the pick up request. - */ - @JsonProperty(value = "confirmationNumber", access = JsonProperty.Access.WRITE_ONLY) - private String confirmationNumber; - - /* - * Time by which shipment should be ready for pick up, this is in local - * time of pick up area. - */ - @JsonProperty(value = "readyByTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime readyByTime; - - /** - * Get the confirmationNumber property: Confirmation number for the pick up request. - * - * @return the confirmationNumber value. - */ - public String confirmationNumber() { - return this.confirmationNumber; - } - - /** - * Get the readyByTime property: Time by which shipment should be ready for pick up, this is in local time of pick - * up area. - * - * @return the readyByTime value. - */ - public OffsetDateTime readyByTime() { - return this.readyByTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java deleted file mode 100644 index 96fcf59e7722e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap; -import com.azure.resourcemanager.databox.models.Sku; -import com.azure.resourcemanager.databox.models.SkuCapacity; -import com.azure.resourcemanager.databox.models.SkuCost; -import com.azure.resourcemanager.databox.models.SkuDisabledReason; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Information of the sku. */ -@JsonFlatten -@Immutable -public class SkuInformationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInformationInner.class); - - /* - * The Sku. - */ - @JsonProperty(value = "sku", access = JsonProperty.Access.WRITE_ONLY) - private Sku sku; - - /* - * The sku is enabled or not. - */ - @JsonProperty(value = "enabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean enabled; - - /* - * The map of data location to service location. - */ - @JsonProperty(value = "properties.dataLocationToServiceLocationMap", access = JsonProperty.Access.WRITE_ONLY) - private List dataLocationToServiceLocationMap; - - /* - * Capacity of the Sku. - */ - @JsonProperty(value = "properties.capacity", access = JsonProperty.Access.WRITE_ONLY) - private SkuCapacity capacity; - - /* - * Cost of the Sku. - */ - @JsonProperty(value = "properties.costs", access = JsonProperty.Access.WRITE_ONLY) - private List costs; - - /* - * Api versions that support this Sku. - */ - @JsonProperty(value = "properties.apiVersions", access = JsonProperty.Access.WRITE_ONLY) - private List apiVersions; - - /* - * Reason why the Sku is disabled. - */ - @JsonProperty(value = "properties.disabledReason", access = JsonProperty.Access.WRITE_ONLY) - private SkuDisabledReason disabledReason; - - /* - * Message for why the Sku is disabled. - */ - @JsonProperty(value = "properties.disabledReasonMessage", access = JsonProperty.Access.WRITE_ONLY) - private String disabledReasonMessage; - - /* - * Required feature to access the sku. - */ - @JsonProperty(value = "properties.requiredFeature", access = JsonProperty.Access.WRITE_ONLY) - private String requiredFeature; - - /** - * Get the sku property: The Sku. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Get the enabled property: The sku is enabled or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Get the dataLocationToServiceLocationMap property: The map of data location to service location. - * - * @return the dataLocationToServiceLocationMap value. - */ - public List dataLocationToServiceLocationMap() { - return this.dataLocationToServiceLocationMap; - } - - /** - * Get the capacity property: Capacity of the Sku. - * - * @return the capacity value. - */ - public SkuCapacity capacity() { - return this.capacity; - } - - /** - * Get the costs property: Cost of the Sku. - * - * @return the costs value. - */ - public List costs() { - return this.costs; - } - - /** - * Get the apiVersions property: Api versions that support this Sku. - * - * @return the apiVersions value. - */ - public List apiVersions() { - return this.apiVersions; - } - - /** - * Get the disabledReason property: Reason why the Sku is disabled. - * - * @return the disabledReason value. - */ - public SkuDisabledReason disabledReason() { - return this.disabledReason; - } - - /** - * Get the disabledReasonMessage property: Message for why the Sku is disabled. - * - * @return the disabledReasonMessage value. - */ - public String disabledReasonMessage() { - return this.disabledReasonMessage; - } - - /** - * Get the requiredFeature property: Required feature to access the sku. - * - * @return the requiredFeature value. - */ - public String requiredFeature() { - return this.requiredFeature; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (dataLocationToServiceLocationMap() != null) { - dataLocationToServiceLocationMap().forEach(e -> e.validate()); - } - if (capacity() != null) { - capacity().validate(); - } - if (costs() != null) { - costs().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index a03f62932fbff..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.models.JobSecrets; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Unencrypted credentials for accessing device. */ -@Immutable -public final class UnencryptedCredentialsInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UnencryptedCredentialsInner.class); - - /* - * Name of the job. - */ - @JsonProperty(value = "jobName", access = JsonProperty.Access.WRITE_ONLY) - private String jobName; - - /* - * Secrets related to this job. - */ - @JsonProperty(value = "jobSecrets", access = JsonProperty.Access.WRITE_ONLY) - private JobSecrets jobSecrets; - - /** - * Get the jobName property: Name of the job. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Get the jobSecrets property: Secrets related to this job. - * - * @return the jobSecrets value. - */ - public JobSecrets jobSecrets() { - return this.jobSecrets; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (jobSecrets() != null) { - jobSecrets().validate(); - } - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java deleted file mode 100644 index 8bb1ab9e27add..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.models.OverallValidationStatus; -import com.azure.resourcemanager.databox.models.ValidationInputResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Response of pre job creation validations. */ -@JsonFlatten -@Immutable -public class ValidationResponseInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationResponseInner.class); - - /* - * Overall validation status. - */ - @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) - private OverallValidationStatus status; - - /* - * List of response details contain validationType and its response as key - * and value respectively. - */ - @JsonProperty(value = "properties.individualResponseDetails", access = JsonProperty.Access.WRITE_ONLY) - private List individualResponseDetails; - - /** - * Get the status property: Overall validation status. - * - * @return the status value. - */ - public OverallValidationStatus status() { - return this.status; - } - - /** - * Get the individualResponseDetails property: List of response details contain validationType and its response as - * key and value respectively. - * - * @return the individualResponseDetails value. - */ - public List 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()); - } - } -} 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 deleted file mode 100644 index 34aea89c1032b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the inner data models for DataBoxManagementClient. null. */ -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 deleted file mode 100644 index eccf5e2a6e64f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the service clients for DataBoxManagementClient. null. */ -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 deleted file mode 100644 index fcfdd52da7332..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner; -import com.azure.resourcemanager.databox.models.AddressValidationOutput; -import com.azure.resourcemanager.databox.models.AddressValidationStatus; -import com.azure.resourcemanager.databox.models.CloudError; -import com.azure.resourcemanager.databox.models.ShippingAddress; -import java.util.Collections; -import java.util.List; - -public final class AddressValidationOutputImpl implements AddressValidationOutput { - private AddressValidationOutputInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - AddressValidationOutputImpl( - AddressValidationOutputInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public CloudError error() { - return this.innerModel().error(); - } - - public AddressValidationStatus validationStatus() { - return this.innerModel().validationStatus(); - } - - public List alternateAddresses() { - List inner = this.innerModel().alternateAddresses(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public AddressValidationOutputInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index bb86febc870b0..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** A builder for creating a new instance of the DataBoxManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {DataBoxManagementClientImpl.class}) -public final class DataBoxManagementClientBuilder { - /* - * The Subscription Id - */ - private String subscriptionId; - - /** - * Sets The Subscription Id. - * - * @param subscriptionId the subscriptionId value. - * @return the DataBoxManagementClientBuilder. - */ - public DataBoxManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the DataBoxManagementClientBuilder. - */ - public DataBoxManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the DataBoxManagementClientBuilder. - */ - public DataBoxManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the DataBoxManagementClientBuilder. - */ - public DataBoxManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the DataBoxManagementClientBuilder. - */ - public DataBoxManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the DataBoxManagementClientBuilder. - */ - public DataBoxManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of DataBoxManagementClientImpl with the provided parameters. - * - * @return an instance of DataBoxManagementClientImpl. - */ - public DataBoxManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - DataBoxManagementClientImpl client = - new DataBoxManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); - 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 deleted file mode 100644 index 906b858913c12..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.annotation.ServiceClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -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.util.Context; -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.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.databox.fluent.DataBoxManagementClient; -import com.azure.resourcemanager.databox.fluent.JobsClient; -import com.azure.resourcemanager.databox.fluent.OperationsClient; -import com.azure.resourcemanager.databox.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.databox.fluent.ServicesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the DataBoxManagementClientImpl type. */ -@ServiceClient(builder = DataBoxManagementClientBuilder.class) -public final class DataBoxManagementClientImpl implements DataBoxManagementClient { - private final ClientLogger logger = new ClientLogger(DataBoxManagementClientImpl.class); - - /** The Subscription Id. */ - private final String subscriptionId; - - /** - * Gets The Subscription Id. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The JobsClient object to access its operations. */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - 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. */ - private final ServicesClient services; - - /** - * Gets the ServicesClient object to access its operations. - * - * @return the ServicesClient object. - */ - public ServicesClient getServices() { - return this.services; - } - - /** - * Initializes an instance of DataBoxManagementClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @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. - */ - DataBoxManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2021-03-01"; - this.operations = new OperationsClientImpl(this); - this.jobs = new JobsClientImpl(this); - this.resourceProviders = new ResourceProvidersClientImpl(this); - this.services = new ServicesClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - 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(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(s); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } -} 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 deleted file mode 100644 index 0796988c89448..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.databox.fluent.models.JobResourceInner; -import com.azure.resourcemanager.databox.models.CancellationReason; -import com.azure.resourcemanager.databox.models.CloudError; -import com.azure.resourcemanager.databox.models.JobDeliveryInfo; -import com.azure.resourcemanager.databox.models.JobDeliveryType; -import com.azure.resourcemanager.databox.models.JobDetails; -import com.azure.resourcemanager.databox.models.JobResource; -import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; -import com.azure.resourcemanager.databox.models.ResourceIdentity; -import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; -import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse; -import com.azure.resourcemanager.databox.models.Sku; -import com.azure.resourcemanager.databox.models.StageName; -import com.azure.resourcemanager.databox.models.TransferType; -import com.azure.resourcemanager.databox.models.UnencryptedCredentials; -import com.azure.resourcemanager.databox.models.UpdateJobDetails; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class JobResourceImpl implements JobResource, JobResource.Definition, JobResource.Update { - private JobResourceInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - 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 TransferType transferType() { - return this.innerModel().transferType(); - } - - public Boolean isCancellable() { - return this.innerModel().isCancellable(); - } - - public Boolean isDeletable() { - return this.innerModel().isDeletable(); - } - - public Boolean isShippingAddressEditable() { - return this.innerModel().isShippingAddressEditable(); - } - - public Boolean isPrepareToShipEnabled() { - return this.innerModel().isPrepareToShipEnabled(); - } - - public StageName status() { - return this.innerModel().status(); - } - - public OffsetDateTime startTime() { - return this.innerModel().startTime(); - } - - public CloudError error() { - return this.innerModel().error(); - } - - public JobDetails details() { - return this.innerModel().details(); - } - - public String cancellationReason() { - return this.innerModel().cancellationReason(); - } - - public JobDeliveryType deliveryType() { - return this.innerModel().deliveryType(); - } - - public JobDeliveryInfo deliveryInfo() { - return this.innerModel().deliveryInfo(); - } - - public Boolean isCancellableWithoutFee() { - return this.innerModel().isCancellableWithoutFee(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public ResourceIdentity identity() { - return this.innerModel().identity(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public JobResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String jobName; - - private String updateIfMatch; - - private JobResourceUpdateParameter updateJobResourceUpdateParameter; - - public JobResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public JobResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .create(resourceGroupName, jobName, this.innerModel(), Context.NONE); - return this; - } - - public JobResource create(Context context) { - this.innerObject = - serviceManager.serviceClient().getJobs().create(resourceGroupName, jobName, this.innerModel(), context); - return this; - } - - JobResourceImpl(String name, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = new JobResourceInner(); - this.serviceManager = serviceManager; - this.jobName = name; - } - - public JobResourceImpl update() { - this.updateIfMatch = null; - this.updateJobResourceUpdateParameter = new JobResourceUpdateParameter(); - return this; - } - - public JobResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .update(resourceGroupName, jobName, updateJobResourceUpdateParameter, updateIfMatch, Context.NONE); - return this; - } - - public JobResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .update(resourceGroupName, jobName, updateJobResourceUpdateParameter, updateIfMatch, context); - return this; - } - - JobResourceImpl(JobResourceInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.jobName = Utils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public JobResource refresh() { - String localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, localExpand, Context.NONE) - .getValue(); - return this; - } - - public JobResource refresh(Context context) { - String localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, localExpand, context) - .getValue(); - return this; - } - - public ShipmentPickUpResponse bookShipmentPickUp(ShipmentPickUpRequest shipmentPickUpRequest) { - return serviceManager.jobs().bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest); - } - - public Response bookShipmentPickUpWithResponse( - ShipmentPickUpRequest shipmentPickUpRequest, Context context) { - return serviceManager - .jobs() - .bookShipmentPickUpWithResponse(resourceGroupName, jobName, shipmentPickUpRequest, context); - } - - public void cancel(CancellationReason cancellationReason) { - serviceManager.jobs().cancel(resourceGroupName, jobName, cancellationReason); - } - - public Response cancelWithResponse(CancellationReason cancellationReason, Context context) { - return serviceManager.jobs().cancelWithResponse(resourceGroupName, jobName, cancellationReason, context); - } - - public PagedIterable listCredentials() { - return serviceManager.jobs().listCredentials(resourceGroupName, jobName); - } - - public PagedIterable listCredentials(Context context) { - return serviceManager.jobs().listCredentials(resourceGroupName, jobName, context); - } - - public JobResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public JobResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public JobResourceImpl withTransferType(TransferType transferType) { - this.innerModel().withTransferType(transferType); - return this; - } - - public JobResourceImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public JobResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateJobResourceUpdateParameter.withTags(tags); - return this; - } - } - - public JobResourceImpl withDetails(JobDetails details) { - this.innerModel().withDetails(details); - return this; - } - - public JobResourceImpl withDeliveryType(JobDeliveryType deliveryType) { - this.innerModel().withDeliveryType(deliveryType); - return this; - } - - public JobResourceImpl withDeliveryInfo(JobDeliveryInfo deliveryInfo) { - this.innerModel().withDeliveryInfo(deliveryInfo); - return this; - } - - public JobResourceImpl withIdentity(ResourceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateJobResourceUpdateParameter.withIdentity(identity); - return this; - } - } - - public JobResourceImpl withDetails(UpdateJobDetails details) { - this.updateJobResourceUpdateParameter.withDetails(details); - return this; - } - - public JobResourceImpl withIfMatch(String ifMatch) { - this.updateIfMatch = ifMatch; - return this; - } - - private boolean isInCreateMode() { - return 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 deleted file mode 100644 index 8fa80fdd80936..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java +++ /dev/null @@ -1,2321 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.databox.fluent.JobsClient; -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.models.CancellationReason; -import com.azure.resourcemanager.databox.models.JobResourceList; -import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; -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; - -/** An instance of this class provides access to all the operations defined in JobsClient. */ -public final class JobsClientImpl implements JobsClient { - private final ClientLogger logger = new ClientLogger(JobsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final JobsService service; - - /** The service client containing this operation class. */ - private final DataBoxManagementClientImpl client; - - /** - * Initializes an instance of JobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsClientImpl(DataBoxManagementClientImpl client) { - this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataBoxManagementClientJobs to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") - private interface JobsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs") - @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"}) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs") - @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); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs" - + "/{jobName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @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); - - @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, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobResourceInner jobResource, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs" - + "/{jobName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - 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, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") JobResourceUpdateParameter jobResourceUpdateParameter, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs" - + "/{jobName}/bookShipmentPickUp") - @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, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs" - + "/{jobName}/cancel") - @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> cancel( - @HostParam("$host") String endpoint, - @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); - - @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, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @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, - @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. - */ - @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. - */ - @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * 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. - */ - @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. - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skipToken, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(skipToken, context), nextLink -> listNextSinglePageAsync(nextLink, 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skipToken = null; - return new PagedIterable<>(listAsync(skipToken)); - } - - /** - * 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skipToken, Context context) { - return new PagedIterable<>(listAsync(skipToken, context)); - } - - /** - * 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. - */ - @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.")); - } - 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())); - } - - /** - * 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. - * @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. - */ - @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)); - } - - /** - * 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the jobs available under the given resource group. - * - * @param resourceGroupName The Resource Group Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skipToken = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * 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. - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, String skipToken, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the jobs available under the given resource group. - * - * @param resourceGroupName The Resource Group Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skipToken = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken)); - } - - /** - * 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. - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, String skipToken, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken, 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - 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())); - } - - /** - * 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 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) - 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); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - private Mono getByResourceGroupAsync(String resourceGroupName, String jobName, String expand) { - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 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) - private Mono getByResourceGroupAsync(String resourceGroupName, String jobName) { - final String expand = null; - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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 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) - public JobResourceInner getByResourceGroup(String resourceGroupName, String jobName) { - final String expand = null; - return getByResourceGroupAsync(resourceGroupName, jobName, expand).block(); - } - - /** - * 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 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) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String jobName, String expand, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, expand, context).block(); - } - - /** - * 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 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. - */ - @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(); - } - 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())); - } - - /** - * 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 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. - */ - @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(); - } - 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); - } - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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, 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 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, JobResourceInner> beginCreateAsync( - String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, jobName, jobResource, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), 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. - * - * @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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, JobResourceInner> beginCreate( - String resourceGroupName, String jobName, JobResourceInner jobResource) { - return beginCreateAsync(resourceGroupName, jobName, jobResource).getSyncPoller(); - } - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, JobResourceInner> beginCreate( - String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) { - return beginCreateAsync(resourceGroupName, jobName, jobResource, context).getSyncPoller(); - } - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) { - return beginCreateAsync(resourceGroupName, jobName, jobResource) - .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. - * - * @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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) { - return beginCreateAsync(resourceGroupName, jobName, jobResource, context) - .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. - * - * @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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource) { - return createAsync(resourceGroupName, jobName, jobResource).block(); - } - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner create( - String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) { - return createAsync(resourceGroupName, jobName, jobResource, context).block(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 the completion. - */ - @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); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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.NONE); - } - - /** - * 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 the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String jobName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName) { - return beginDeleteAsync(resourceGroupName, jobName).getSyncPoller(); - } - - /** - * 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 the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context) { - return beginDeleteAsync(resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String jobName) { - return beginDeleteAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 the completion. - */ - @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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String jobName) { - deleteAsync(resourceGroupName, jobName).block(); - } - - /** - * 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String jobName, Context context) { - deleteAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Updates the properties of an existing 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 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. - */ - @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(); - } - 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the properties of an existing 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 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. - */ - @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); - } - - /** - * Updates the properties of an existing 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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, Context.NONE); - } - - /** - * Updates the properties of an existing 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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); - } - - /** - * Updates the properties of an existing 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, JobResourceInner> beginUpdate( - String resourceGroupName, - String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, - String ifMatch) { - return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).getSyncPoller(); - } - - /** - * Updates the properties of an existing 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, JobResourceInner> beginUpdate( - String resourceGroupName, - String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, - String ifMatch, - Context context) { - return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context) - .getSyncPoller(); - } - - /** - * Updates the properties of an existing 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 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. - */ - @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); - } - - /** - * Updates the properties of an existing 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 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) - private Mono updateAsync( - String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { - final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the properties of an existing 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 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. - */ - @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); - } - - /** - * Updates the properties of an existing 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobResourceInner update( - String resourceGroupName, - String jobName, - JobResourceUpdateParameter jobResourceUpdateParameter, - String ifMatch) { - return updateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).block(); - } - - /** - * Updates the properties of an existing 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 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 update( - String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { - final String ifMatch = null; - return updateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).block(); - } - - /** - * Updates the properties of an existing 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 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. - */ - @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(); - } - - /** - * Book shipment pick up. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @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())); - } - - /** - * Book shipment pick up. - * - * @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 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. - */ - @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(); - } - 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); - } - - /** - * Book shipment pick up. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono bookShipmentPickUpAsync( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { - return bookShipmentPickUpWithResponseAsync(resourceGroupName, jobName, shipmentPickUpRequest) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Book shipment pick up. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ShipmentPickUpResponseInner bookShipmentPickUp( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { - return bookShipmentPickUpAsync(resourceGroupName, jobName, shipmentPickUpRequest).block(); - } - - /** - * Book shipment pick up. - * - * @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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response bookShipmentPickUpWithResponse( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context) { - return bookShipmentPickUpWithResponseAsync(resourceGroupName, jobName, shipmentPickUpRequest, context).block(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @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"; - return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - cancellationReason, - accept, - 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 completion. - */ - @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 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. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String jobName, CancellationReason cancellationReason) { - return cancelWithResponseAsync(resourceGroupName, jobName, cancellationReason) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason) { - cancelAsync(resourceGroupName, jobName, cancellationReason).block(); - } - - /** - * 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context) { - return cancelWithResponseAsync(resourceGroupName, jobName, cancellationReason, context).block(); - } - - /** - * This method gets the unencrypted secrets related to the 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 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. - */ - @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)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, 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 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. - */ - @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)); - } - - /** - * This method gets the unencrypted secrets related to the 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 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listCredentialsAsync(String resourceGroupName, String jobName) { - return new PagedFlux<>(() -> listCredentialsSinglePageAsync(resourceGroupName, jobName)); - } - - /** - * This method gets the unencrypted secrets related to the 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 list of unencrypted credentials for accessing device. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listCredentialsAsync( - String resourceGroupName, String jobName, Context context) { - return new PagedFlux<>(() -> listCredentialsSinglePageAsync(resourceGroupName, jobName, context)); - } - - /** - * This method gets the unencrypted secrets related to the 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 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCredentials(String resourceGroupName, String jobName) { - return new PagedIterable<>(listCredentialsAsync(resourceGroupName, jobName)); - } - - /** - * This method gets the unencrypted secrets related to the 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 list of unencrypted credentials for accessing device. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCredentials( - String resourceGroupName, String jobName, Context context) { - return new PagedIterable<>(listCredentialsAsync(resourceGroupName, jobName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection. - */ - @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.")); - } - final String accept = "application/json"; - 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return job Resource Collection. - */ - @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.")); - } - 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)); - } -} 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 deleted file mode 100644 index a1b270e846c82..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.JobsClient; -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.models.CancellationReason; -import com.azure.resourcemanager.databox.models.JobResource; -import com.azure.resourcemanager.databox.models.Jobs; -import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; -import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse; -import com.azure.resourcemanager.databox.models.UnencryptedCredentials; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class JobsImpl implements Jobs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobsImpl.class); - - private final JobsClient innerClient; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - public JobsImpl(JobsClient innerClient, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(skipToken, context); - return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.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 Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); - } - - public JobResource getByResourceGroup(String resourceGroupName, String jobName) { - JobResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, jobName); - if (inner != null) { - return new JobResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - 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; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String jobName) { - this.serviceClient().delete(resourceGroupName, jobName); - } - - public void delete(String resourceGroupName, String jobName, Context context) { - this.serviceClient().delete(resourceGroupName, jobName, context); - } - - public ShipmentPickUpResponse bookShipmentPickUp( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { - ShipmentPickUpResponseInner inner = - this.serviceClient().bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest); - if (inner != null) { - return new ShipmentPickUpResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - 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; - } - } - - public void cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason) { - this.serviceClient().cancel(resourceGroupName, jobName, cancellationReason); - } - - public Response cancelWithResponse( - String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context) { - return this.serviceClient().cancelWithResponse(resourceGroupName, jobName, cancellationReason, context); - } - - public PagedIterable listCredentials(String resourceGroupName, String jobName) { - PagedIterable inner = - this.serviceClient().listCredentials(resourceGroupName, jobName); - return Utils.mapPage(inner, inner1 -> new UnencryptedCredentialsImpl(inner1, this.manager())); - } - - public PagedIterable listCredentials( - String resourceGroupName, String jobName, Context context) { - PagedIterable inner = - this.serviceClient().listCredentials(resourceGroupName, jobName, context); - return Utils.mapPage(inner, inner1 -> new UnencryptedCredentialsImpl(inner1, this.manager())); - } - - public JobResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - 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(); - } - - public Response getByIdWithResponse(String id, String expand, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, jobName, expand, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - 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); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String jobName = Utils.getValueFromIdByName(id, "jobs"); - 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); - } - - private JobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } - - public JobResourceImpl define(String name) { - return new JobResourceImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 7a313e9b89f7d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.resourcemanager.databox.fluent.models.OperationInner; -import com.azure.resourcemanager.databox.models.Operation; -import com.azure.resourcemanager.databox.models.OperationDisplay; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - OperationImpl(OperationInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index dfcdbfb4e3233..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.OperationsClient; -import com.azure.resourcemanager.databox.fluent.models.OperationInner; -import com.azure.resourcemanager.databox.models.OperationList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final DataBoxManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(DataBoxManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataBoxManagementClientOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.DataBox/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * This method gets all the operations. - * - * @throws 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. - */ - @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( - context -> 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * This method gets all the operations. - * - * @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. - */ - @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)); - } - - /** - * This method gets all the operations. - * - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * This method gets all the operations. - * - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * This method gets all the operations. - * - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * This method gets all the operations. - * - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/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 deleted file mode 100644 index 86f6c14ed9240..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.OperationsClient; -import com.azure.resourcemanager.databox.fluent.models.OperationInner; -import com.azure.resourcemanager.databox.models.Operation; -import com.azure.resourcemanager.databox.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index c353222533c18..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner; -import com.azure.resourcemanager.databox.models.RegionConfigurationResponse; -import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse; -import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse; - -public final class RegionConfigurationResponseImpl implements RegionConfigurationResponse { - private RegionConfigurationResponseInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - RegionConfigurationResponseImpl( - RegionConfigurationResponseInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ScheduleAvailabilityResponse scheduleAvailabilityResponse() { - return this.innerModel().scheduleAvailabilityResponse(); - } - - public TransportAvailabilityResponse transportAvailabilityResponse() { - return this.innerModel().transportAvailabilityResponse(); - } - - public RegionConfigurationResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index 216f5fc70d430..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.databox.models.MitigateJobRequest; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ -public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - private final ClientLogger logger = new ClientLogger(ResourceProvidersClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ResourceProvidersService service; - - /** The service client containing this operation class. */ - private final DataBoxManagementClientImpl client; - - /** - * Initializes an instance of ResourceProvidersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ResourceProvidersClientImpl(DataBoxManagementClientImpl client) { - this.service = - RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataBoxManagementClientResourceProviders to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") - private interface ResourceProvidersService { - @Headers({"Content-Type: application/json"}) - @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); - } - - /** - * 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 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. - * @return the completion. - */ - @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"; - return FluxUtil - .withContext( - context -> - service - .mitigate( - this.client.getEndpoint(), - jobName, - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - mitigateJobRequest, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 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 completion. - */ - @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 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. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono mitigateAsync(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) { - return mitigateWithResponseAsync(jobName, resourceGroupName, mitigateJobRequest) - .flatMap((Response res) -> 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 Resource Group Name. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) { - mitigateAsync(jobName, resourceGroupName, mitigateJobRequest).block(); - } - - /** - * 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 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response mitigateWithResponse( - String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context) { - return mitigateWithResponseAsync(jobName, resourceGroupName, mitigateJobRequest, context).block(); - } -} 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 deleted file mode 100644 index ef10b19e9cc3d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.databox.models.MitigateJobRequest; -import com.azure.resourcemanager.databox.models.ResourceProviders; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ResourceProvidersImpl implements ResourceProviders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class); - - private final ResourceProvidersClient innerClient; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - public ResourceProvidersImpl( - ResourceProvidersClient innerClient, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) { - this.serviceClient().mitigate(jobName, resourceGroupName, mitigateJobRequest); - } - - public Response mitigateWithResponse( - String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context) { - return this.serviceClient().mitigateWithResponse(jobName, resourceGroupName, mitigateJobRequest, context); - } - - private ResourceProvidersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index 3eda4a3f3ebad..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java +++ /dev/null @@ -1,1272 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.ServicesClient; -import com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner; -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.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; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ServicesClient. */ -public final class ServicesClientImpl implements ServicesClient { - private final ClientLogger logger = new ClientLogger(ServicesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ServicesService service; - - /** The service client containing this operation class. */ - private final DataBoxManagementClientImpl client; - - /** - * Initializes an instance of ServicesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ServicesClientImpl(DataBoxManagementClientImpl client) { - this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DataBoxManagementClientServices to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DataBoxManagementCli") - private interface ServicesService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations" - + "/{location}/availableSkus") - @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); - - @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, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations" - + "/{location}/validateInputs") - @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, - 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, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") - @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); - - @Headers({"Content-Type: application/json"}) - @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, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegionConfigurationRequest regionConfigurationRequest, - @HeaderParam("Accept") String accept, - 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, - @HeaderParam("Accept") String accept, - Context 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. - */ - @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(); - } - 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)) - .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. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - */ - @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. - */ - @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 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. - * @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. - */ - @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest) { - return new PagedIterable<>( - listAvailableSkusByResourceGroupAsync(resourceGroupName, location, availableSkuRequest)); - } - - /** - * 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. - * @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. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest, Context context) { - return new PagedIterable<>( - listAvailableSkusByResourceGroupAsync(resourceGroupName, location, availableSkuRequest, 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @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 accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .validateAddress( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - validateAddress, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * [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. - */ - @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAddressAsync(String location, ValidateAddress validateAddress) { - return validateAddressWithResponseAsync(location, validateAddress) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * [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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AddressValidationOutputInner validateAddress(String location, ValidateAddress validateAddress) { - return validateAddressAsync(location, validateAddress).block(); - } - - /** - * [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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateAddressWithResponse( - String location, ValidateAddress validateAddress, Context context) { - return validateAddressWithResponseAsync(location, validateAddress, context).block(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - 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(); - } - 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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 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. - */ - @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - private Mono validateInputsByResourceGroupAsync( - String resourceGroupName, String location, ValidationRequest validationRequest) { - return validateInputsByResourceGroupWithResponseAsync(resourceGroupName, location, validationRequest) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 validateInputsByResourceGroupAsync(resourceGroupName, location, validationRequest).block(); - } - - /** - * 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 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateInputsByResourceGroupWithResponse( - String resourceGroupName, String location, ValidationRequest validationRequest, Context context) { - return validateInputsByResourceGroupWithResponseAsync(resourceGroupName, location, validationRequest, context) - .block(); - } - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @param location The location of the resource. - * @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. - */ - @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(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .validateInputs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - validationRequest, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @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. - */ - @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); - } - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @param location The location of the resource. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateInputsAsync(String location, ValidationRequest validationRequest) { - return validateInputsWithResponseAsync(location, validationRequest) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @param location The location of the resource. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest) { - return validateInputsAsync(location, validationRequest).block(); - } - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateInputsWithResponse( - String location, ValidationRequest validationRequest, Context context) { - return validateInputsWithResponseAsync(location, validationRequest, context).block(); - } - - /** - * This API provides configuration details specific to given region/location at Subscription level. - * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - 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())); - } - - /** - * This API provides configuration details specific to given region/location at Subscription 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - 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(); - } - 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); - } - - /** - * This API provides configuration details specific to given region/location at Subscription level. - * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - private Mono regionConfigurationAsync( - String location, RegionConfigurationRequest regionConfigurationRequest) { - return regionConfigurationWithResponseAsync(location, regionConfigurationRequest) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * This API provides configuration details specific to given region/location at Subscription level. - * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 regionConfigurationAsync(location, regionConfigurationRequest).block(); - } - - /** - * This API provides configuration details specific to given region/location at Subscription 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Response regionConfigurationWithResponse( - String location, RegionConfigurationRequest regionConfigurationRequest, Context context) { - return regionConfigurationWithResponseAsync(location, regionConfigurationRequest, context).block(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - 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(); - } - 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)) - .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. - */ - @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. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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) - private Mono regionConfigurationByResourceGroupAsync( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { - return regionConfigurationByResourceGroupWithResponseAsync( - resourceGroupName, location, regionConfigurationRequest) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 regionConfigurationByResourceGroup( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { - return regionConfigurationByResourceGroupAsync(resourceGroupName, location, regionConfigurationRequest).block(); - } - - /** - * 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response regionConfigurationByResourceGroupWithResponse( - String resourceGroupName, - String location, - RegionConfigurationRequest regionConfigurationRequest, - Context context) { - return regionConfigurationByResourceGroupWithResponseAsync( - resourceGroupName, location, regionConfigurationRequest, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response. - */ - @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(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available skus operation response. - */ - @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.")); - } - 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)); - } -} 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 deleted file mode 100644 index c6185b32fc3a0..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesImpl.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.ServicesClient; -import com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner; -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.models.AddressValidationOutput; -import com.azure.resourcemanager.databox.models.AvailableSkuRequest; -import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; -import com.azure.resourcemanager.databox.models.RegionConfigurationResponse; -import com.azure.resourcemanager.databox.models.Services; -import com.azure.resourcemanager.databox.models.SkuInformation; -import com.azure.resourcemanager.databox.models.ValidateAddress; -import com.azure.resourcemanager.databox.models.ValidationRequest; -import com.azure.resourcemanager.databox.models.ValidationResponse; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ServicesImpl implements Services { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesImpl.class); - - private final ServicesClient innerClient; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - public ServicesImpl(ServicesClient innerClient, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest) { - PagedIterable inner = - this.serviceClient().listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest); - return Utils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager())); - } - - public PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest, Context context) { - PagedIterable inner = - this - .serviceClient() - .listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest, context); - return Utils.mapPage(inner, inner1 -> new SkuInformationImpl(inner1, this.manager())); - } - - public AddressValidationOutput validateAddress(String location, ValidateAddress validateAddress) { - AddressValidationOutputInner inner = this.serviceClient().validateAddress(location, validateAddress); - if (inner != null) { - return new AddressValidationOutputImpl(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; - } - } - - 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 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 validateInputs(String location, ValidationRequest validationRequest) { - ValidationResponseInner inner = this.serviceClient().validateInputs(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; - } - } - - 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 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 RegionConfigurationResponse regionConfigurationByResourceGroup( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { - RegionConfigurationResponseInner inner = - this - .serviceClient() - .regionConfigurationByResourceGroup(resourceGroupName, location, regionConfigurationRequest); - if (inner != null) { - return new RegionConfigurationResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response regionConfigurationByResourceGroupWithResponse( - String resourceGroupName, - String location, - RegionConfigurationRequest regionConfigurationRequest, - Context context) { - 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; - } - } - - private ServicesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index a9fff50dd126f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ShipmentPickUpResponseImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.resourcemanager.databox.fluent.models.ShipmentPickUpResponseInner; -import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse; -import java.time.OffsetDateTime; - -public final class ShipmentPickUpResponseImpl implements ShipmentPickUpResponse { - private ShipmentPickUpResponseInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - ShipmentPickUpResponseImpl( - ShipmentPickUpResponseInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String confirmationNumber() { - return this.innerModel().confirmationNumber(); - } - - public OffsetDateTime readyByTime() { - return this.innerModel().readyByTime(); - } - - public ShipmentPickUpResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index deced71a9bc19..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.resourcemanager.databox.fluent.models.SkuInformationInner; -import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap; -import com.azure.resourcemanager.databox.models.Sku; -import com.azure.resourcemanager.databox.models.SkuCapacity; -import com.azure.resourcemanager.databox.models.SkuCost; -import com.azure.resourcemanager.databox.models.SkuDisabledReason; -import com.azure.resourcemanager.databox.models.SkuInformation; -import java.util.Collections; -import java.util.List; - -public final class SkuInformationImpl implements SkuInformation { - private SkuInformationInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - SkuInformationImpl( - SkuInformationInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public Boolean enabled() { - return this.innerModel().enabled(); - } - - public List dataLocationToServiceLocationMap() { - List inner = this.innerModel().dataLocationToServiceLocationMap(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public SkuCapacity capacity() { - return this.innerModel().capacity(); - } - - public List costs() { - List inner = this.innerModel().costs(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List apiVersions() { - List inner = this.innerModel().apiVersions(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public SkuDisabledReason disabledReason() { - return this.innerModel().disabledReason(); - } - - public String disabledReasonMessage() { - return this.innerModel().disabledReasonMessage(); - } - - public String requiredFeature() { - return this.innerModel().requiredFeature(); - } - - public SkuInformationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index cbf6751efd3a1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/UnencryptedCredentialsImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner; -import com.azure.resourcemanager.databox.models.JobSecrets; -import com.azure.resourcemanager.databox.models.UnencryptedCredentials; - -public final class UnencryptedCredentialsImpl implements UnencryptedCredentials { - private UnencryptedCredentialsInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - UnencryptedCredentialsImpl( - UnencryptedCredentialsInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String jobName() { - return this.innerModel().jobName(); - } - - public JobSecrets jobSecrets() { - return this.innerModel().jobSecrets(); - } - - public UnencryptedCredentialsInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/Utils.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/Utils.java deleted file mode 100644 index bab9488bfdfa8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/Utils.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class Utils { - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); - } - } -} 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 deleted file mode 100644 index 7408528406ec3..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ValidationResponseImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.implementation; - -import com.azure.resourcemanager.databox.fluent.models.ValidationResponseInner; -import com.azure.resourcemanager.databox.models.OverallValidationStatus; -import com.azure.resourcemanager.databox.models.ValidationInputResponse; -import com.azure.resourcemanager.databox.models.ValidationResponse; -import java.util.Collections; -import java.util.List; - -public final class ValidationResponseImpl implements ValidationResponse { - private ValidationResponseInner innerObject; - - private final com.azure.resourcemanager.databox.DataBoxManager serviceManager; - - ValidationResponseImpl( - ValidationResponseInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public OverallValidationStatus status() { - return this.innerModel().status(); - } - - public List individualResponseDetails() { - List inner = this.innerModel().individualResponseDetails(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ValidationResponseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.databox.DataBoxManager manager() { - return this.serviceManager; - } -} 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 deleted file mode 100644 index 5058c5b929b4c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the implementations for DataBoxManagementClient. null. */ -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 deleted file mode 100644 index 428280949772c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccessProtocol.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for AccessProtocol. */ -public enum AccessProtocol { - /** Enum value SMB. */ - SMB("SMB"), - - /** Enum value NFS. */ - NFS("NFS"); - - /** The actual serialized value for a AccessProtocol instance. */ - private final String value; - - AccessProtocol(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AccessProtocol instance. - * - * @param value the serialized value to parse. - * @return the parsed AccessProtocol object, or null if unable to parse. - */ - @JsonCreator - public static AccessProtocol fromString(String value) { - AccessProtocol[] items = AccessProtocol.values(); - for (AccessProtocol item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 19b8eae7ae312..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AccountCredentialDetails.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Credential details of the account. */ -@Immutable -public final class AccountCredentialDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountCredentialDetails.class); - - /* - * Name of the account. - */ - @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY) - private String accountName; - - /* - * Type of the account. - */ - @JsonProperty(value = "dataAccountType", access = JsonProperty.Access.WRITE_ONLY) - private DataAccountType dataAccountType; - - /* - * Connection string of the account endpoint to use the account as a - * storage endpoint on the device. - */ - @JsonProperty(value = "accountConnectionString", access = JsonProperty.Access.WRITE_ONLY) - private String accountConnectionString; - - /* - * Per share level unencrypted access credentials. - */ - @JsonProperty(value = "shareCredentialDetails", access = JsonProperty.Access.WRITE_ONLY) - private List shareCredentialDetails; - - /** - * Get the accountName property: Name of the account. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Get the dataAccountType property: Type of the account. - * - * @return the dataAccountType value. - */ - public DataAccountType dataAccountType() { - return this.dataAccountType; - } - - /** - * Get the accountConnectionString property: Connection string of the account endpoint to use the account as a - * storage endpoint on the device. - * - * @return the accountConnectionString value. - */ - public String accountConnectionString() { - return this.accountConnectionString; - } - - /** - * Get the shareCredentialDetails property: Per share level unencrypted access credentials. - * - * @return the shareCredentialDetails value. - */ - public List 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()); - } - } -} 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 deleted file mode 100644 index 0cb7fbafdea62..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Additional error info. */ -@Fluent -public final class AdditionalErrorInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdditionalErrorInfo.class); - - /* - * Additional error type. - */ - @JsonProperty(value = "type") - private String type; - - /* - * Additional error info. - */ - @JsonProperty(value = "info") - private Object info; - - /** - * Get the type property: Additional error type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Additional error type. - * - * @param type the type value to set. - * @return the AdditionalErrorInfo object itself. - */ - public AdditionalErrorInfo withType(String type) { - this.type = type; - return this; - } - - /** - * Get the info property: Additional error info. - * - * @return the info value. - */ - public Object info() { - return this.info; - } - - /** - * Set the info property: Additional error info. - * - * @param info the info value to set. - * @return the AdditionalErrorInfo object itself. - */ - public AdditionalErrorInfo withInfo(Object info) { - this.info = info; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressType.java deleted file mode 100644 index a9d21bf78be4e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressType.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for AddressType. */ -public enum AddressType { - /** Enum value None. */ - NONE("None"), - - /** Enum value Residential. */ - RESIDENTIAL("Residential"), - - /** Enum value Commercial. */ - COMMERCIAL("Commercial"); - - /** The actual serialized value for a AddressType instance. */ - private final String value; - - AddressType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AddressType instance. - * - * @param value the serialized value to parse. - * @return the parsed AddressType object, or null if unable to parse. - */ - @JsonCreator - public static AddressType fromString(String value) { - AddressType[] items = AddressType.values(); - for (AddressType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationOutput.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationOutput.java deleted file mode 100644 index 002bfb8d23742..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationOutput.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner; -import java.util.List; - -/** An immutable client-side representation of AddressValidationOutput. */ -public interface AddressValidationOutput { - /** - * Gets the error property: Error code and message of validation response. - * - * @return the error value. - */ - CloudError error(); - - /** - * Gets the validationStatus property: The address validation status. - * - * @return the validationStatus value. - */ - AddressValidationStatus validationStatus(); - - /** - * Gets the alternateAddresses property: List of alternate addresses. - * - * @return the alternateAddresses value. - */ - List alternateAddresses(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner object. - * - * @return the inner object. - */ - AddressValidationOutputInner innerModel(); -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java deleted file mode 100644 index a1af669a02f61..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The address validation output. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateAddress") -@Immutable -public final class AddressValidationProperties extends ValidationInputResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressValidationProperties.class); - - /* - * The address validation status. - */ - @JsonProperty(value = "validationStatus", access = JsonProperty.Access.WRITE_ONLY) - private AddressValidationStatus validationStatus; - - /* - * List of alternate addresses. - */ - @JsonProperty(value = "alternateAddresses", access = JsonProperty.Access.WRITE_ONLY) - private List alternateAddresses; - - /** - * Get the validationStatus property: The address validation status. - * - * @return the validationStatus value. - */ - public AddressValidationStatus validationStatus() { - return this.validationStatus; - } - - /** - * Get the alternateAddresses property: List of alternate addresses. - * - * @return the alternateAddresses value. - */ - public List alternateAddresses() { - return this.alternateAddresses; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (alternateAddresses() != null) { - alternateAddresses().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index f3732ad14a7f1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationStatus.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for AddressValidationStatus. */ -public enum AddressValidationStatus { - /** Enum value Valid. */ - VALID("Valid"), - - /** Enum value Invalid. */ - INVALID("Invalid"), - - /** Enum value Ambiguous. */ - AMBIGUOUS("Ambiguous"); - - /** The actual serialized value for a AddressValidationStatus instance. */ - private final String value; - - AddressValidationStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a AddressValidationStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed AddressValidationStatus object, or null if unable to parse. - */ - @JsonCreator - public static AddressValidationStatus fromString(String value) { - AddressValidationStatus[] items = AddressValidationStatus.values(); - for (AddressValidationStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index da077c46e0751..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ApplianceNetworkConfiguration.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Network Adapter configuration of a DataBox. */ -@Immutable -public final class ApplianceNetworkConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplianceNetworkConfiguration.class); - - /* - * Name of the network. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Mac Address. - */ - @JsonProperty(value = "macAddress", access = JsonProperty.Access.WRITE_ONLY) - private String macAddress; - - /** - * Get the name property: Name of the network. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the macAddress property: Mac Address. - * - * @return the macAddress value. - */ - public String macAddress() { - return this.macAddress; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkuRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkuRequest.java deleted file mode 100644 index dcf63c9e1a20d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkuRequest.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The filters for showing the available skus. */ -@Fluent -public final class AvailableSkuRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableSkuRequest.class); - - /* - * Type of the transfer. - */ - @JsonProperty(value = "transferType", required = true) - private TransferType transferType; - - /* - * ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - */ - @JsonProperty(value = "country", required = true) - private String country; - - /* - * Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ - @JsonProperty(value = "location", required = true) - private String location; - - /* - * Sku Names to filter for available skus - */ - @JsonProperty(value = "skuNames") - private List skuNames; - - /** - * Get the transferType property: Type of the transfer. - * - * @return the transferType value. - */ - public TransferType transferType() { - return this.transferType; - } - - /** - * Set the transferType property: Type of the transfer. - * - * @param transferType the transferType value to set. - * @return the AvailableSkuRequest object itself. - */ - public AvailableSkuRequest withTransferType(TransferType transferType) { - this.transferType = transferType; - return this; - } - - /** - * Get the country property: ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. - * - * @param country the country value to set. - * @return the AvailableSkuRequest object itself. - */ - public AvailableSkuRequest withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the location property: Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. - * - * @param location the location value to set. - * @return the AvailableSkuRequest object itself. - */ - public AvailableSkuRequest withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the skuNames property: Sku Names to filter for available skus. - * - * @return the skuNames value. - */ - public List skuNames() { - return this.skuNames; - } - - /** - * Set the skuNames property: Sku Names to filter for available skus. - * - * @param skuNames the skuNames value to set. - * @return the AvailableSkuRequest object itself. - */ - public AvailableSkuRequest withSkuNames(List skuNames) { - this.skuNames = skuNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transferType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property transferType in model AvailableSkuRequest")); - } - if (country() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property country in model AvailableSkuRequest")); - } - if (location() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property location in model AvailableSkuRequest")); - } - } -} 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/models/AvailableSkusResult.java deleted file mode 100644 index c259babeabc06..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AvailableSkusResult.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.models.SkuInformationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The available skus operation response. */ -@Fluent -public final class AvailableSkusResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableSkusResult.class); - - /* - * List of available skus. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * Link for the next set of skus. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of available skus. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: Link for the next set of skus. - * - * @return the nextLink value. - */ - 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()); - } - } -} 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 deleted file mode 100644 index 85113e4270861..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AzureFileFilterDetails.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Filter details to transfer Azure files. */ -@Fluent -public final class AzureFileFilterDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureFileFilterDetails.class); - - /* - * Prefix list of the Azure files to be transferred. - */ - @JsonProperty(value = "filePrefixList") - private List filePrefixList; - - /* - * List of full path of the files to be transferred. - */ - @JsonProperty(value = "filePathList") - private List filePathList; - - /* - * List of file shares to be transferred. - */ - @JsonProperty(value = "fileShareList") - private List fileShareList; - - /** - * Get the filePrefixList property: Prefix list of the Azure files to be transferred. - * - * @return the filePrefixList value. - */ - public List filePrefixList() { - return this.filePrefixList; - } - - /** - * Set the filePrefixList property: Prefix list of the Azure files to be transferred. - * - * @param filePrefixList the filePrefixList value to set. - * @return the AzureFileFilterDetails object itself. - */ - public AzureFileFilterDetails withFilePrefixList(List filePrefixList) { - this.filePrefixList = filePrefixList; - return this; - } - - /** - * Get the filePathList property: List of full path of the files to be transferred. - * - * @return the filePathList value. - */ - public List filePathList() { - return this.filePathList; - } - - /** - * Set the filePathList property: List of full path of the files to be transferred. - * - * @param filePathList the filePathList value to set. - * @return the AzureFileFilterDetails object itself. - */ - public AzureFileFilterDetails withFilePathList(List filePathList) { - this.filePathList = filePathList; - return this; - } - - /** - * Get the fileShareList property: List of file shares to be transferred. - * - * @return the fileShareList value. - */ - public List fileShareList() { - return this.fileShareList; - } - - /** - * Set the fileShareList property: List of file shares to be transferred. - * - * @param fileShareList the fileShareList value to set. - * @return the AzureFileFilterDetails object itself. - */ - public AzureFileFilterDetails withFileShareList(List fileShareList) { - this.fileShareList = fileShareList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index e3758ddafad20..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/BlobFilterDetails.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Filter details to transfer Azure Blobs. */ -@Fluent -public final class BlobFilterDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BlobFilterDetails.class); - - /* - * Prefix list of the Azure blobs to be transferred. - */ - @JsonProperty(value = "blobPrefixList") - private List blobPrefixList; - - /* - * List of full path of the blobs to be transferred. - */ - @JsonProperty(value = "blobPathList") - private List blobPathList; - - /* - * List of blob containers to be transferred. - */ - @JsonProperty(value = "containerList") - private List containerList; - - /** - * Get the blobPrefixList property: Prefix list of the Azure blobs to be transferred. - * - * @return the blobPrefixList value. - */ - public List blobPrefixList() { - return this.blobPrefixList; - } - - /** - * Set the blobPrefixList property: Prefix list of the Azure blobs to be transferred. - * - * @param blobPrefixList the blobPrefixList value to set. - * @return the BlobFilterDetails object itself. - */ - public BlobFilterDetails withBlobPrefixList(List blobPrefixList) { - this.blobPrefixList = blobPrefixList; - return this; - } - - /** - * Get the blobPathList property: List of full path of the blobs to be transferred. - * - * @return the blobPathList value. - */ - public List blobPathList() { - return this.blobPathList; - } - - /** - * Set the blobPathList property: List of full path of the blobs to be transferred. - * - * @param blobPathList the blobPathList value to set. - * @return the BlobFilterDetails object itself. - */ - public BlobFilterDetails withBlobPathList(List blobPathList) { - this.blobPathList = blobPathList; - return this; - } - - /** - * Get the containerList property: List of blob containers to be transferred. - * - * @return the containerList value. - */ - public List containerList() { - return this.containerList; - } - - /** - * Set the containerList property: List of blob containers to be transferred. - * - * @param containerList the containerList value to set. - * @return the BlobFilterDetails object itself. - */ - public BlobFilterDetails withContainerList(List containerList) { - this.containerList = containerList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 5f35b17664029..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CancellationReason.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Reason for cancellation. */ -@Fluent -public final class CancellationReason { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CancellationReason.class); - - /* - * Reason for cancellation. - */ - @JsonProperty(value = "reason", required = true) - private String reason; - - /** - * Get the reason property: Reason for cancellation. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Set the reason property: Reason for cancellation. - * - * @param reason the reason value to set. - * @return the CancellationReason object itself. - */ - public CancellationReason withReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (reason() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property reason in model CancellationReason")); - } - } -} 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 deleted file mode 100644 index ed8c15ed4f9b8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ClassDiscriminator. */ -public enum ClassDiscriminator { - /** Enum value DataBox. */ - DATA_BOX("DataBox"), - - /** Enum value DataBoxDisk. */ - DATA_BOX_DISK("DataBoxDisk"), - - /** Enum value DataBoxHeavy. */ - DATA_BOX_HEAVY("DataBoxHeavy"); - - /** The actual serialized value for a ClassDiscriminator instance. */ - private final String value; - - ClassDiscriminator(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ClassDiscriminator instance. - * - * @param value the serialized value to parse. - * @return the parsed ClassDiscriminator object, or null if unable to parse. - */ - @JsonCreator - public static ClassDiscriminator fromString(String value) { - ClassDiscriminator[] items = ClassDiscriminator.values(); - for (ClassDiscriminator item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index e5dadd1f540ee..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Cloud error. */ -@Fluent -public final class CloudError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudError.class); - - /* - * Cloud error code. - */ - @JsonProperty(value = "code") - private String code; - - /* - * Cloud error message. - */ - @JsonProperty(value = "message") - private String message; - - /* - * Cloud error target. - */ - @JsonProperty(value = "target") - private String target; - - /* - * Cloud error details. - */ - @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) - private List details; - - /* - * Cloud error additional info. - */ - @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY) - private List additionalInfo; - - /** - * Get the code property: Cloud error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: Cloud 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 message property: Cloud error message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Cloud error message. - * - * @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: Cloud error target. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Cloud error target. - * - * @param target the target value to set. - * @return the CloudError object itself. - */ - public CloudError withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the details property: Cloud error details. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Get the additionalInfo property: Cloud error additional info. - * - * @return the additionalInfo value. - */ - public List additionalInfo() { - return this.additionalInfo; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (details() != null) { - details().forEach(e -> e.validate()); - } - if (additionalInfo() != null) { - additionalInfo().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index f0c33ee0a3eab..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactDetails.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Contact Details. */ -@Fluent -public final class ContactDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContactDetails.class); - - /* - * Contact name of the person. - */ - @JsonProperty(value = "contactName", required = true) - private String contactName; - - /* - * Phone number of the contact person. - */ - @JsonProperty(value = "phone", required = true) - private String phone; - - /* - * Phone extension number of the contact person. - */ - @JsonProperty(value = "phoneExtension") - private String phoneExtension; - - /* - * Mobile number of the contact person. - */ - @JsonProperty(value = "mobile") - private String mobile; - - /* - * List of Email-ids to be notified about job progress. - */ - @JsonProperty(value = "emailList", required = true) - private List emailList; - - /* - * Notification preference for a job stage. - */ - @JsonProperty(value = "notificationPreference") - private List notificationPreference; - - /** - * Get the contactName property: Contact name of the person. - * - * @return the contactName value. - */ - public String contactName() { - return this.contactName; - } - - /** - * Set the contactName property: Contact name of the person. - * - * @param contactName the contactName value to set. - * @return the ContactDetails object itself. - */ - public ContactDetails withContactName(String contactName) { - this.contactName = contactName; - return this; - } - - /** - * Get the phone property: Phone number of the contact person. - * - * @return the phone value. - */ - public String phone() { - return this.phone; - } - - /** - * Set the phone property: Phone number of the contact person. - * - * @param phone the phone value to set. - * @return the ContactDetails object itself. - */ - public ContactDetails withPhone(String phone) { - this.phone = phone; - return this; - } - - /** - * Get the phoneExtension property: Phone extension number of the contact person. - * - * @return the phoneExtension value. - */ - public String phoneExtension() { - return this.phoneExtension; - } - - /** - * Set the phoneExtension property: Phone extension number of the contact person. - * - * @param phoneExtension the phoneExtension value to set. - * @return the ContactDetails object itself. - */ - public ContactDetails withPhoneExtension(String phoneExtension) { - this.phoneExtension = phoneExtension; - return this; - } - - /** - * Get the mobile property: Mobile number of the contact person. - * - * @return the mobile value. - */ - public String mobile() { - return this.mobile; - } - - /** - * Set the mobile property: Mobile number of the contact person. - * - * @param mobile the mobile value to set. - * @return the ContactDetails object itself. - */ - public ContactDetails withMobile(String mobile) { - this.mobile = mobile; - return this; - } - - /** - * Get the emailList property: List of Email-ids to be notified about job progress. - * - * @return the emailList value. - */ - public List emailList() { - return this.emailList; - } - - /** - * Set the emailList property: List of Email-ids to be notified about job progress. - * - * @param emailList the emailList value to set. - * @return the ContactDetails object itself. - */ - public ContactDetails withEmailList(List emailList) { - this.emailList = emailList; - return this; - } - - /** - * Get the notificationPreference property: Notification preference for a job stage. - * - * @return the notificationPreference value. - */ - public List notificationPreference() { - return this.notificationPreference; - } - - /** - * Set the notificationPreference property: Notification preference for a job stage. - * - * @param notificationPreference the notificationPreference value to set. - * @return the ContactDetails object itself. - */ - public ContactDetails withNotificationPreference(List notificationPreference) { - this.notificationPreference = notificationPreference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contactName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property contactName in model ContactDetails")); - } - if (phone() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property phone in model ContactDetails")); - } - if (emailList() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property emailList in model ContactDetails")); - } - if (notificationPreference() != null) { - notificationPreference().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index a0993099f9119..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Details for log generated during copy. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "copyLogDetailsType", - defaultImpl = CopyLogDetails.class) -@JsonTypeName("CopyLogDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "DataBox", value = DataBoxAccountCopyLogDetails.class), - @JsonSubTypes.Type(name = "DataBoxDisk", value = DataBoxDiskCopyLogDetails.class), - @JsonSubTypes.Type(name = "DataBoxHeavy", value = DataBoxHeavyAccountCopyLogDetails.class) -}) -@Immutable -public class CopyLogDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyLogDetails.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 3a2ed73779757..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Copy progress. */ -@Immutable -public final class CopyProgress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CopyProgress.class); - - /* - * Name of the storage account. This will be empty for data account types - * other than storage account. - */ - @JsonProperty(value = "storageAccountName", access = JsonProperty.Access.WRITE_ONLY) - private String storageAccountName; - - /* - * Transfer type of data - */ - @JsonProperty(value = "transferType", access = JsonProperty.Access.WRITE_ONLY) - private TransferType transferType; - - /* - * Data Account Type. - */ - @JsonProperty(value = "dataAccountType", access = JsonProperty.Access.WRITE_ONLY) - private DataAccountType dataAccountType; - - /* - * Id of the account where the data needs to be uploaded. - */ - @JsonProperty(value = "accountId", access = JsonProperty.Access.WRITE_ONLY) - private String accountId; - - /* - * To indicate bytes transferred. - */ - @JsonProperty(value = "bytesProcessed", access = JsonProperty.Access.WRITE_ONLY) - private Long bytesProcessed; - - /* - * Total amount of data to be processed by the job. - */ - @JsonProperty(value = "totalBytesToProcess", access = JsonProperty.Access.WRITE_ONLY) - private Long totalBytesToProcess; - - /* - * Number of files processed - */ - @JsonProperty(value = "filesProcessed", access = JsonProperty.Access.WRITE_ONLY) - private Long filesProcessed; - - /* - * Total files to process - */ - @JsonProperty(value = "totalFilesToProcess", access = JsonProperty.Access.WRITE_ONLY) - private Long totalFilesToProcess; - - /* - * Number of files not adhering to azure naming conventions which were - * processed by automatic renaming - */ - @JsonProperty(value = "invalidFilesProcessed", access = JsonProperty.Access.WRITE_ONLY) - private Long invalidFilesProcessed; - - /* - * Total amount of data not adhering to azure naming conventions which were - * processed by automatic renaming - */ - @JsonProperty(value = "invalidFileBytesUploaded", access = JsonProperty.Access.WRITE_ONLY) - private Long invalidFileBytesUploaded; - - /* - * Number of folders not adhering to azure naming conventions which were - * processed by automatic renaming - */ - @JsonProperty(value = "renamedContainerCount", access = JsonProperty.Access.WRITE_ONLY) - private Long renamedContainerCount; - - /* - * Number of files which could not be copied - */ - @JsonProperty(value = "filesErroredOut", access = JsonProperty.Access.WRITE_ONLY) - private Long filesErroredOut; - - /* - * To indicate directories errored out in the job. - */ - @JsonProperty(value = "directoriesErroredOut", access = JsonProperty.Access.WRITE_ONLY) - private Long directoriesErroredOut; - - /* - * To indicate directories renamed - */ - @JsonProperty(value = "invalidDirectoriesProcessed", access = JsonProperty.Access.WRITE_ONLY) - private Long invalidDirectoriesProcessed; - - /* - * To indicate if enumeration of data is in progress. - * Until this is true, the TotalBytesToProcess may not be valid. - */ - @JsonProperty(value = "isEnumerationInProgress", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isEnumerationInProgress; - - /** - * Get the storageAccountName property: Name of the storage account. This will be empty for data account types other - * than storage account. - * - * @return the storageAccountName value. - */ - public String storageAccountName() { - return this.storageAccountName; - } - - /** - * Get the transferType property: Transfer type of data. - * - * @return the transferType value. - */ - public TransferType transferType() { - return this.transferType; - } - - /** - * Get the dataAccountType property: Data Account Type. - * - * @return the dataAccountType value. - */ - public DataAccountType dataAccountType() { - return this.dataAccountType; - } - - /** - * Get the accountId property: Id of the account where the data needs to be uploaded. - * - * @return the accountId value. - */ - public String accountId() { - return this.accountId; - } - - /** - * Get the bytesProcessed property: To indicate bytes transferred. - * - * @return the bytesProcessed value. - */ - public Long bytesProcessed() { - return this.bytesProcessed; - } - - /** - * Get the totalBytesToProcess property: Total amount of data to be processed by the job. - * - * @return the totalBytesToProcess value. - */ - public Long totalBytesToProcess() { - return this.totalBytesToProcess; - } - - /** - * Get the filesProcessed property: Number of files processed. - * - * @return the filesProcessed value. - */ - public Long filesProcessed() { - return this.filesProcessed; - } - - /** - * Get the totalFilesToProcess property: Total files to process. - * - * @return the totalFilesToProcess value. - */ - public Long totalFilesToProcess() { - return this.totalFilesToProcess; - } - - /** - * Get the invalidFilesProcessed property: Number of files not adhering to azure naming conventions which were - * processed by automatic renaming. - * - * @return the invalidFilesProcessed value. - */ - public Long invalidFilesProcessed() { - return this.invalidFilesProcessed; - } - - /** - * Get the invalidFileBytesUploaded property: Total amount of data not adhering to azure naming conventions which - * were processed by automatic renaming. - * - * @return the invalidFileBytesUploaded value. - */ - public Long invalidFileBytesUploaded() { - return this.invalidFileBytesUploaded; - } - - /** - * Get the renamedContainerCount property: Number of folders not adhering to azure naming conventions which were - * processed by automatic renaming. - * - * @return the renamedContainerCount value. - */ - public Long renamedContainerCount() { - return this.renamedContainerCount; - } - - /** - * Get the filesErroredOut property: Number of files which could not be copied. - * - * @return the filesErroredOut value. - */ - public Long filesErroredOut() { - return this.filesErroredOut; - } - - /** - * Get the directoriesErroredOut property: To indicate directories errored out in the job. - * - * @return the directoriesErroredOut value. - */ - public Long directoriesErroredOut() { - return this.directoriesErroredOut; - } - - /** - * Get the invalidDirectoriesProcessed property: To indicate directories renamed. - * - * @return the invalidDirectoriesProcessed value. - */ - public Long invalidDirectoriesProcessed() { - return this.invalidDirectoriesProcessed; - } - - /** - * Get the isEnumerationInProgress property: To indicate if enumeration of data is in progress. Until this is true, - * the TotalBytesToProcess may not be valid. - * - * @return the isEnumerationInProgress value. - */ - public Boolean isEnumerationInProgress() { - return this.isEnumerationInProgress; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 0cd8c193a3c1e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for CopyStatus. */ -public enum CopyStatus { - /** Enum value NotStarted. */ - NOT_STARTED("NotStarted"), - - /** Enum value InProgress. */ - IN_PROGRESS("InProgress"), - - /** Enum value Completed. */ - COMPLETED("Completed"), - - /** Enum value CompletedWithErrors. */ - COMPLETED_WITH_ERRORS("CompletedWithErrors"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value NotReturned. */ - NOT_RETURNED("NotReturned"), - - /** Enum value HardwareError. */ - HARDWARE_ERROR("HardwareError"), - - /** Enum value DeviceFormatted. */ - DEVICE_FORMATTED("DeviceFormatted"), - - /** Enum value DeviceMetadataModified. */ - DEVICE_METADATA_MODIFIED("DeviceMetadataModified"), - - /** Enum value StorageAccountNotAccessible. */ - STORAGE_ACCOUNT_NOT_ACCESSIBLE("StorageAccountNotAccessible"), - - /** Enum value UnsupportedData. */ - UNSUPPORTED_DATA("UnsupportedData"); - - /** The actual serialized value for a CopyStatus instance. */ - private final String value; - - CopyStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CopyStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed CopyStatus object, or null if unable to parse. - */ - @JsonCreator - public static CopyStatus fromString(String value) { - CopyStatus[] items = CopyStatus.values(); - for (CopyStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 9f38df9a6765a..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateJobValidations.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** It does all pre-job creation validations. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationCategory") -@JsonTypeName("JobCreationValidation") -@Immutable -public final class CreateJobValidations extends ValidationRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateJobValidations.class); - - /** {@inheritDoc} */ - @Override - public CreateJobValidations withIndividualRequestDetails(List individualRequestDetails) { - super.withIndividualRequestDetails(individualRequestDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index 7fdd71254fe06..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationRequest.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request to validate create order limit for current subscription. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateCreateOrderLimit") -@Fluent -public final class CreateOrderLimitForSubscriptionValidationRequest extends ValidationInputRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(CreateOrderLimitForSubscriptionValidationRequest.class); - - /* - * Device type to be used for the job. - */ - @JsonProperty(value = "deviceType", required = true) - private SkuName deviceType; - - /** - * Get the deviceType property: Device type to be used for the job. - * - * @return the deviceType value. - */ - public SkuName deviceType() { - return this.deviceType; - } - - /** - * Set the deviceType property: Device type to be used for the job. - * - * @param deviceType the deviceType value to set. - * @return the CreateOrderLimitForSubscriptionValidationRequest object itself. - */ - public CreateOrderLimitForSubscriptionValidationRequest withDeviceType(SkuName deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (deviceType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property deviceType in model" - + " CreateOrderLimitForSubscriptionValidationRequest")); - } - } -} 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 deleted file mode 100644 index fcd923a843b9e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CreateOrderLimitForSubscriptionValidationResponseProperties.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties of create order limit for subscription validation response. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateCreateOrderLimit") -@Immutable -public final class CreateOrderLimitForSubscriptionValidationResponseProperties extends ValidationInputResponse { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(CreateOrderLimitForSubscriptionValidationResponseProperties.class); - - /* - * Create order limit validation status. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the status property: Create order limit validation status. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index fa43d83764ef7..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for CustomerResolutionCode. */ -public enum CustomerResolutionCode { - /** Enum value None. */ - NONE("None"), - - /** Enum value MoveToCleanUpDevice. */ - MOVE_TO_CLEAN_UP_DEVICE("MoveToCleanUpDevice"), - - /** Enum value Resume. */ - RESUME("Resume"); - - /** The actual serialized value for a CustomerResolutionCode instance. */ - private final String value; - - CustomerResolutionCode(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CustomerResolutionCode instance. - * - * @param value the serialized value to parse. - * @return the parsed CustomerResolutionCode object, or null if unable to parse. - */ - @JsonCreator - public static CustomerResolutionCode fromString(String value) { - CustomerResolutionCode[] items = CustomerResolutionCode.values(); - for (CustomerResolutionCode item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 049c81468c7fc..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountDetails.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Account details of the data to be transferred. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "dataAccountType", - defaultImpl = DataAccountDetails.class) -@JsonTypeName("DataAccountDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ManagedDisk", value = ManagedDiskDetails.class), - @JsonSubTypes.Type(name = "StorageAccount", value = StorageAccountDetails.class) -}) -@Fluent -public class DataAccountDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataAccountDetails.class); - - /* - * Password for all the shares to be created on the device. Should not be - * passed for TransferType:ExportFromAzure jobs. If this is not passed, the - * service will generate password itself. This will not be returned in Get - * Call. Password Requirements : Password must be minimum of 12 and - * maximum of 64 characters. Password must have at least one uppercase - * alphabet, one number and one special character. Password cannot have the - * following characters : IilLoO0 Password can have only alphabets, numbers - * and these characters : @#\-$%^!+=;:_()]+ - */ - @JsonProperty(value = "sharePassword") - private String sharePassword; - - /** - * Get the sharePassword property: Password for all the shares to be created on the device. Should not be passed for - * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will - * not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. - * Password must have at least one uppercase alphabet, one number and one special character. Password cannot have - * the following characters : IilLoO0 Password can have only alphabets, numbers and these characters - * : @#\-$%^!+=;:_()]+. - * - * @return the sharePassword value. - */ - public String sharePassword() { - return this.sharePassword; - } - - /** - * Set the sharePassword property: Password for all the shares to be created on the device. Should not be passed for - * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will - * not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. - * Password must have at least one uppercase alphabet, one number and one special character. Password cannot have - * the following characters : IilLoO0 Password can have only alphabets, numbers and these characters - * : @#\-$%^!+=;:_()]+. - * - * @param sharePassword the sharePassword value to set. - * @return the DataAccountDetails object itself. - */ - public DataAccountDetails withSharePassword(String sharePassword) { - this.sharePassword = sharePassword; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 5353affea236e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataAccountType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for DataAccountType. */ -public enum DataAccountType { - /** Enum value StorageAccount. */ - STORAGE_ACCOUNT("StorageAccount"), - - /** Enum value ManagedDisk. */ - MANAGED_DISK("ManagedDisk"); - - /** The actual serialized value for a DataAccountType instance. */ - private final String value; - - DataAccountType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DataAccountType instance. - * - * @param value the serialized value to parse. - * @return the parsed DataAccountType object, or null if unable to parse. - */ - @JsonCreator - public static DataAccountType fromString(String value) { - DataAccountType[] items = DataAccountType.values(); - for (DataAccountType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 953c14c5aa6cc..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxAccountCopyLogDetails.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Copy log details for a storage account of a DataBox job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "copyLogDetailsType") -@JsonTypeName("DataBox") -@Immutable -public final class DataBoxAccountCopyLogDetails extends CopyLogDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxAccountCopyLogDetails.class); - - /* - * Account name. - */ - @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY) - private String accountName; - - /* - * Link for copy logs. - */ - @JsonProperty(value = "copyLogLink", access = JsonProperty.Access.WRITE_ONLY) - private String copyLogLink; - - /* - * Link for copy verbose logs. This will be set only when - * LogCollectionLevel is set to Verbose. - */ - @JsonProperty(value = "copyVerboseLogLink", access = JsonProperty.Access.WRITE_ONLY) - private String copyVerboseLogLink; - - /** - * Get the accountName property: Account name. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Get the copyLogLink property: Link for copy logs. - * - * @return the copyLogLink value. - */ - public String copyLogLink() { - return this.copyLogLink; - } - - /** - * Get the copyVerboseLogLink property: Link for copy verbose logs. This will be set only when LogCollectionLevel is - * set to Verbose. - * - * @return the copyVerboseLogLink value. - */ - public String copyVerboseLogLink() { - return this.copyVerboseLogLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index cb49c32f85d26..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyLogDetails.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Copy Log Details for a disk. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "copyLogDetailsType") -@JsonTypeName("DataBoxDisk") -@Immutable -public final class DataBoxDiskCopyLogDetails extends CopyLogDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxDiskCopyLogDetails.class); - - /* - * Disk Serial Number. - */ - @JsonProperty(value = "diskSerialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String diskSerialNumber; - - /* - * Link for copy error logs. - */ - @JsonProperty(value = "errorLogLink", access = JsonProperty.Access.WRITE_ONLY) - private String errorLogLink; - - /* - * Link for copy verbose logs. - */ - @JsonProperty(value = "verboseLogLink", access = JsonProperty.Access.WRITE_ONLY) - private String verboseLogLink; - - /** - * Get the diskSerialNumber property: Disk Serial Number. - * - * @return the diskSerialNumber value. - */ - public String diskSerialNumber() { - return this.diskSerialNumber; - } - - /** - * Get the errorLogLink property: Link for copy error logs. - * - * @return the errorLogLink value. - */ - public String errorLogLink() { - return this.errorLogLink; - } - - /** - * Get the verboseLogLink property: Link for copy verbose logs. - * - * @return the verboseLogLink value. - */ - public String verboseLogLink() { - return this.verboseLogLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index cdfce7ef8bb4b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskCopyProgress.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** DataBox Disk Copy Progress. */ -@Immutable -public final class DataBoxDiskCopyProgress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxDiskCopyProgress.class); - - /* - * The serial number of the disk - */ - @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String serialNumber; - - /* - * Bytes copied during the copy of disk. - */ - @JsonProperty(value = "bytesCopied", access = JsonProperty.Access.WRITE_ONLY) - private Long bytesCopied; - - /* - * Indicates the percentage completed for the copy of the disk. - */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) - private Integer percentComplete; - - /* - * The Status of the copy - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private CopyStatus status; - - /** - * Get the serialNumber property: The serial number of the disk. - * - * @return the serialNumber value. - */ - public String serialNumber() { - return this.serialNumber; - } - - /** - * Get the bytesCopied property: Bytes copied during the copy of disk. - * - * @return the bytesCopied value. - */ - public Long bytesCopied() { - return this.bytesCopied; - } - - /** - * Get the percentComplete property: Indicates the percentage completed for the copy of the disk. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the status property: The Status of the copy. - * - * @return the status value. - */ - public CopyStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 1d1cfb6fd582b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** DataBox Disk Job Details. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobDetailsType") -@JsonTypeName("DataBoxDisk") -@Fluent -public final class DataBoxDiskJobDetails extends JobDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxDiskJobDetails.class); - - /* - * User preference on what size disks are needed for the job. The map is - * from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB - * size. Key is string but will be checked against an int. - */ - @JsonProperty(value = "preferredDisks") - private Map preferredDisks; - - /* - * Copy progress per disk. - */ - @JsonProperty(value = "copyProgress", access = JsonProperty.Access.WRITE_ONLY) - private List copyProgress; - - /* - * Contains the map of disk serial number to the disk size being used for - * the job. Is returned only after the disks are shipped to the customer. - */ - @JsonProperty(value = "disksAndSizeDetails", access = JsonProperty.Access.WRITE_ONLY) - private Map disksAndSizeDetails; - - /* - * User entered passkey for DataBox Disk job. - */ - @JsonProperty(value = "passkey") - private String passkey; - - /** - * Get the preferredDisks property: User preference on what size disks are needed for the job. The map is from the - * disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an - * int. - * - * @return the preferredDisks value. - */ - public Map preferredDisks() { - return this.preferredDisks; - } - - /** - * Set the preferredDisks property: User preference on what size disks are needed for the job. The map is from the - * disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an - * int. - * - * @param preferredDisks the preferredDisks value to set. - * @return the DataBoxDiskJobDetails object itself. - */ - public DataBoxDiskJobDetails withPreferredDisks(Map preferredDisks) { - this.preferredDisks = preferredDisks; - return this; - } - - /** - * Get the copyProgress property: Copy progress per disk. - * - * @return the copyProgress value. - */ - public List copyProgress() { - return this.copyProgress; - } - - /** - * Get the disksAndSizeDetails property: Contains the map of disk serial number to the disk size being used for the - * job. Is returned only after the disks are shipped to the customer. - * - * @return the disksAndSizeDetails value. - */ - public Map disksAndSizeDetails() { - return this.disksAndSizeDetails; - } - - /** - * Get the passkey property: User entered passkey for DataBox Disk job. - * - * @return the passkey value. - */ - public String passkey() { - return this.passkey; - } - - /** - * Set the passkey property: User entered passkey for DataBox Disk job. - * - * @param passkey the passkey value to set. - * @return the DataBoxDiskJobDetails object itself. - */ - public DataBoxDiskJobDetails withPasskey(String passkey) { - this.passkey = passkey; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxDiskJobDetails withContactDetails(ContactDetails contactDetails) { - super.withContactDetails(contactDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxDiskJobDetails withShippingAddress(ShippingAddress shippingAddress) { - super.withShippingAddress(shippingAddress); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxDiskJobDetails withDataImportDetails(List dataImportDetails) { - super.withDataImportDetails(dataImportDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxDiskJobDetails withDataExportDetails(List dataExportDetails) { - super.withDataExportDetails(dataExportDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxDiskJobDetails withPreferences(Preferences preferences) { - super.withPreferences(preferences); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxDiskJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { - super.withKeyEncryptionKey(keyEncryptionKey); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxDiskJobDetails withExpectedDataSizeInTeraBytes(Integer expectedDataSizeInTeraBytes) { - super.withExpectedDataSizeInTeraBytes(expectedDataSizeInTeraBytes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (copyProgress() != null) { - copyProgress().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index c103d295e9c8c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobSecrets.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The secrets related to disk job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobSecretsType") -@JsonTypeName("DataBoxDisk") -@Immutable -public final class DataBoxDiskJobSecrets extends JobSecrets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxDiskJobSecrets.class); - - /* - * Contains the list of secrets object for that device. - */ - @JsonProperty(value = "diskSecrets", access = JsonProperty.Access.WRITE_ONLY) - private List diskSecrets; - - /* - * PassKey for the disk Job. - */ - @JsonProperty(value = "passKey", access = JsonProperty.Access.WRITE_ONLY) - private String passKey; - - /* - * Whether passkey was provided by user. - */ - @JsonProperty(value = "isPasskeyUserDefined", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isPasskeyUserDefined; - - /** - * Get the diskSecrets property: Contains the list of secrets object for that device. - * - * @return the diskSecrets value. - */ - public List diskSecrets() { - return this.diskSecrets; - } - - /** - * Get the passKey property: PassKey for the disk Job. - * - * @return the passKey value. - */ - public String passKey() { - return this.passKey; - } - - /** - * Get the isPasskeyUserDefined property: Whether passkey was provided by user. - * - * @return the isPasskeyUserDefined value. - */ - public Boolean isPasskeyUserDefined() { - return this.isPasskeyUserDefined; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (diskSecrets() != null) { - diskSecrets().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index 3f5ddca12cde9..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyAccountCopyLogDetails.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Copy log details for a storage account for Databox heavy. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "copyLogDetailsType") -@JsonTypeName("DataBoxHeavy") -@Immutable -public final class DataBoxHeavyAccountCopyLogDetails extends CopyLogDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxHeavyAccountCopyLogDetails.class); - - /* - * Account name. - */ - @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY) - private String accountName; - - /* - * Link for copy logs. - */ - @JsonProperty(value = "copyLogLink", access = JsonProperty.Access.WRITE_ONLY) - private List copyLogLink; - - /* - * Link for copy verbose logs. This will be set only when the - * LogCollectionLevel is set to verbose. - */ - @JsonProperty(value = "copyVerboseLogLink", access = JsonProperty.Access.WRITE_ONLY) - private List copyVerboseLogLink; - - /** - * Get the accountName property: Account name. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Get the copyLogLink property: Link for copy logs. - * - * @return the copyLogLink value. - */ - public List copyLogLink() { - return this.copyLogLink; - } - - /** - * Get the copyVerboseLogLink property: Link for copy verbose logs. This will be set only when the - * LogCollectionLevel is set to verbose. - * - * @return the copyVerboseLogLink value. - */ - public List copyVerboseLogLink() { - return this.copyVerboseLogLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index 3880949671fac..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Databox Heavy Device Job Details. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobDetailsType") -@JsonTypeName("DataBoxHeavy") -@Fluent -public final class DataBoxHeavyJobDetails extends JobDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxHeavyJobDetails.class); - - /* - * Copy progress per account. - */ - @JsonProperty(value = "copyProgress", access = JsonProperty.Access.WRITE_ONLY) - private List copyProgress; - - /* - * Set Device password for unlocking Databox Heavy. Should not be passed - * for TransferType:ExportFromAzure jobs. If this is not passed, the - * service will generate password itself. This will not be returned in Get - * Call. Password Requirements : Password must be minimum of 12 and - * maximum of 64 characters. Password must have at least one uppercase - * alphabet, one number and one special character. Password cannot have the - * following characters : IilLoO0 Password can have only alphabets, numbers - * and these characters : @#\-$%^!+=;:_()]+ - */ - @JsonProperty(value = "devicePassword") - private String devicePassword; - - /** - * Get the copyProgress property: Copy progress per account. - * - * @return the copyProgress value. - */ - public List copyProgress() { - return this.copyProgress; - } - - /** - * Get the devicePassword property: Set Device password for unlocking Databox Heavy. Should not be passed for - * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will - * not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. - * Password must have at least one uppercase alphabet, one number and one special character. Password cannot have - * the following characters : IilLoO0 Password can have only alphabets, numbers and these characters - * : @#\-$%^!+=;:_()]+. - * - * @return the devicePassword value. - */ - public String devicePassword() { - return this.devicePassword; - } - - /** - * Set the devicePassword property: Set Device password for unlocking Databox Heavy. Should not be passed for - * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will - * not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. - * Password must have at least one uppercase alphabet, one number and one special character. Password cannot have - * the following characters : IilLoO0 Password can have only alphabets, numbers and these characters - * : @#\-$%^!+=;:_()]+. - * - * @param devicePassword the devicePassword value to set. - * @return the DataBoxHeavyJobDetails object itself. - */ - public DataBoxHeavyJobDetails withDevicePassword(String devicePassword) { - this.devicePassword = devicePassword; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxHeavyJobDetails withContactDetails(ContactDetails contactDetails) { - super.withContactDetails(contactDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxHeavyJobDetails withShippingAddress(ShippingAddress shippingAddress) { - super.withShippingAddress(shippingAddress); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxHeavyJobDetails withDataImportDetails(List dataImportDetails) { - super.withDataImportDetails(dataImportDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxHeavyJobDetails withDataExportDetails(List dataExportDetails) { - super.withDataExportDetails(dataExportDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxHeavyJobDetails withPreferences(Preferences preferences) { - super.withPreferences(preferences); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxHeavyJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { - super.withKeyEncryptionKey(keyEncryptionKey); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxHeavyJobDetails withExpectedDataSizeInTeraBytes(Integer expectedDataSizeInTeraBytes) { - super.withExpectedDataSizeInTeraBytes(expectedDataSizeInTeraBytes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (copyProgress() != null) { - copyProgress().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index 3e757614ac665..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobSecrets.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The secrets related to a databox heavy job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobSecretsType") -@JsonTypeName("DataBoxHeavy") -@Immutable -public final class DataBoxHeavyJobSecrets extends JobSecrets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxHeavyJobSecrets.class); - - /* - * Contains the list of secret objects for a databox heavy job. - */ - @JsonProperty(value = "cabinetPodSecrets", access = JsonProperty.Access.WRITE_ONLY) - private List cabinetPodSecrets; - - /** - * Get the cabinetPodSecrets property: Contains the list of secret objects for a databox heavy job. - * - * @return the cabinetPodSecrets value. - */ - public List cabinetPodSecrets() { - return this.cabinetPodSecrets; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (cabinetPodSecrets() != null) { - cabinetPodSecrets().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index 38ffcf1046bbd..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavySecret.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The secrets related to a databox heavy. */ -@Immutable -public final class DataBoxHeavySecret { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxHeavySecret.class); - - /* - * Serial number of the assigned device. - */ - @JsonProperty(value = "deviceSerialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String deviceSerialNumber; - - /* - * Password for out of the box experience on device. - */ - @JsonProperty(value = "devicePassword", access = JsonProperty.Access.WRITE_ONLY) - private String devicePassword; - - /* - * Network configuration of the appliance. - */ - @JsonProperty(value = "networkConfigurations", access = JsonProperty.Access.WRITE_ONLY) - private List networkConfigurations; - - /* - * The base 64 encoded public key to authenticate with the device - */ - @JsonProperty(value = "encodedValidationCertPubKey", access = JsonProperty.Access.WRITE_ONLY) - private String encodedValidationCertPubKey; - - /* - * Per account level access credentials. - */ - @JsonProperty(value = "accountCredentialDetails", access = JsonProperty.Access.WRITE_ONLY) - private List accountCredentialDetails; - - /** - * Get the deviceSerialNumber property: Serial number of the assigned device. - * - * @return the deviceSerialNumber value. - */ - public String deviceSerialNumber() { - return this.deviceSerialNumber; - } - - /** - * Get the devicePassword property: Password for out of the box experience on device. - * - * @return the devicePassword value. - */ - public String devicePassword() { - return this.devicePassword; - } - - /** - * Get the networkConfigurations property: Network configuration of the appliance. - * - * @return the networkConfigurations value. - */ - public List networkConfigurations() { - return this.networkConfigurations; - } - - /** - * Get the encodedValidationCertPubKey property: The base 64 encoded public key to authenticate with the device. - * - * @return the encodedValidationCertPubKey value. - */ - public String encodedValidationCertPubKey() { - return this.encodedValidationCertPubKey; - } - - /** - * Get the accountCredentialDetails property: Per account level access credentials. - * - * @return the accountCredentialDetails value. - */ - 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()); - } - } -} 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 deleted file mode 100644 index 390eb0d174e46..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Databox Job Details. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobDetailsType") -@JsonTypeName("DataBox") -@Fluent -public final class DataBoxJobDetails extends JobDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxJobDetails.class); - - /* - * Copy progress per storage account. - */ - @JsonProperty(value = "copyProgress", access = JsonProperty.Access.WRITE_ONLY) - private List copyProgress; - - /* - * Set Device password for unlocking Databox. Should not be passed for - * TransferType:ExportFromAzure jobs. If this is not passed, the service - * will generate password itself. This will not be returned in Get Call. - * Password Requirements : Password must be minimum of 12 and maximum of - * 64 characters. Password must have at least one uppercase alphabet, one - * number and one special character. Password cannot have the following - * characters : IilLoO0 Password can have only alphabets, numbers and these - * characters : @#\-$%^!+=;:_()]+ - */ - @JsonProperty(value = "devicePassword") - private String devicePassword; - - /** - * Get the copyProgress property: Copy progress per storage account. - * - * @return the copyProgress value. - */ - public List copyProgress() { - return this.copyProgress; - } - - /** - * Get the devicePassword property: Set Device password for unlocking Databox. Should not be passed for - * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will - * not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. - * Password must have at least one uppercase alphabet, one number and one special character. Password cannot have - * the following characters : IilLoO0 Password can have only alphabets, numbers and these characters - * : @#\-$%^!+=;:_()]+. - * - * @return the devicePassword value. - */ - public String devicePassword() { - return this.devicePassword; - } - - /** - * Set the devicePassword property: Set Device password for unlocking Databox. Should not be passed for - * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will - * not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. - * Password must have at least one uppercase alphabet, one number and one special character. Password cannot have - * the following characters : IilLoO0 Password can have only alphabets, numbers and these characters - * : @#\-$%^!+=;:_()]+. - * - * @param devicePassword the devicePassword value to set. - * @return the DataBoxJobDetails object itself. - */ - public DataBoxJobDetails withDevicePassword(String devicePassword) { - this.devicePassword = devicePassword; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxJobDetails withContactDetails(ContactDetails contactDetails) { - super.withContactDetails(contactDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxJobDetails withShippingAddress(ShippingAddress shippingAddress) { - super.withShippingAddress(shippingAddress); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxJobDetails withDataImportDetails(List dataImportDetails) { - super.withDataImportDetails(dataImportDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxJobDetails withDataExportDetails(List dataExportDetails) { - super.withDataExportDetails(dataExportDetails); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxJobDetails withPreferences(Preferences preferences) { - super.withPreferences(preferences); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { - super.withKeyEncryptionKey(keyEncryptionKey); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxJobDetails withExpectedDataSizeInTeraBytes(Integer expectedDataSizeInTeraBytes) { - super.withExpectedDataSizeInTeraBytes(expectedDataSizeInTeraBytes); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (copyProgress() != null) { - copyProgress().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index fa4bae81f8aca..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxScheduleAvailabilityRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request body to get the availability for scheduling data box orders orders. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "skuName") -@JsonTypeName("DataBox") -@Immutable -public final class DataBoxScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxScheduleAvailabilityRequest.class); - - /** {@inheritDoc} */ - @Override - public DataBoxScheduleAvailabilityRequest withStorageLocation(String storageLocation) { - super.withStorageLocation(storageLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataBoxScheduleAvailabilityRequest withCountry(String country) { - super.withCountry(country); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index f167a14cf3a2d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxSecret.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The secrets related to a DataBox. */ -@Immutable -public final class DataBoxSecret { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataBoxSecret.class); - - /* - * Serial number of the assigned device. - */ - @JsonProperty(value = "deviceSerialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String deviceSerialNumber; - - /* - * Password for out of the box experience on device. - */ - @JsonProperty(value = "devicePassword", access = JsonProperty.Access.WRITE_ONLY) - private String devicePassword; - - /* - * Network configuration of the appliance. - */ - @JsonProperty(value = "networkConfigurations", access = JsonProperty.Access.WRITE_ONLY) - private List networkConfigurations; - - /* - * The base 64 encoded public key to authenticate with the device - */ - @JsonProperty(value = "encodedValidationCertPubKey", access = JsonProperty.Access.WRITE_ONLY) - private String encodedValidationCertPubKey; - - /* - * Per account level access credentials. - */ - @JsonProperty(value = "accountCredentialDetails", access = JsonProperty.Access.WRITE_ONLY) - private List accountCredentialDetails; - - /** - * Get the deviceSerialNumber property: Serial number of the assigned device. - * - * @return the deviceSerialNumber value. - */ - public String deviceSerialNumber() { - return this.deviceSerialNumber; - } - - /** - * Get the devicePassword property: Password for out of the box experience on device. - * - * @return the devicePassword value. - */ - public String devicePassword() { - return this.devicePassword; - } - - /** - * Get the networkConfigurations property: Network configuration of the appliance. - * - * @return the networkConfigurations value. - */ - public List networkConfigurations() { - return this.networkConfigurations; - } - - /** - * Get the encodedValidationCertPubKey property: The base 64 encoded public key to authenticate with the device. - * - * @return the encodedValidationCertPubKey value. - */ - public String encodedValidationCertPubKey() { - return this.encodedValidationCertPubKey; - } - - /** - * Get the accountCredentialDetails property: Per account level access credentials. - * - * @return the accountCredentialDetails value. - */ - 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()); - } - } -} 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 deleted file mode 100644 index 8ee7b3516f05d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataExportDetails.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Details of the data to be used for exporting data from azure. */ -@Fluent -public final class DataExportDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataExportDetails.class); - - /* - * Configuration for the data transfer. - */ - @JsonProperty(value = "transferConfiguration", required = true) - private TransferConfiguration transferConfiguration; - - /* - * Level of the logs to be collected. - */ - @JsonProperty(value = "logCollectionLevel") - private LogCollectionLevel logCollectionLevel; - - /* - * Account details of the data to be transferred - */ - @JsonProperty(value = "accountDetails", required = true) - private DataAccountDetails accountDetails; - - /** - * Get the transferConfiguration property: Configuration for the data transfer. - * - * @return the transferConfiguration value. - */ - public TransferConfiguration transferConfiguration() { - return this.transferConfiguration; - } - - /** - * Set the transferConfiguration property: Configuration for the data transfer. - * - * @param transferConfiguration the transferConfiguration value to set. - * @return the DataExportDetails object itself. - */ - public DataExportDetails withTransferConfiguration(TransferConfiguration transferConfiguration) { - this.transferConfiguration = transferConfiguration; - return this; - } - - /** - * Get the logCollectionLevel property: Level of the logs to be collected. - * - * @return the logCollectionLevel value. - */ - public LogCollectionLevel logCollectionLevel() { - return this.logCollectionLevel; - } - - /** - * Set the logCollectionLevel property: Level of the logs to be collected. - * - * @param logCollectionLevel the logCollectionLevel value to set. - * @return the DataExportDetails object itself. - */ - public DataExportDetails withLogCollectionLevel(LogCollectionLevel logCollectionLevel) { - this.logCollectionLevel = logCollectionLevel; - return this; - } - - /** - * Get the accountDetails property: Account details of the data to be transferred. - * - * @return the accountDetails value. - */ - public DataAccountDetails accountDetails() { - return this.accountDetails; - } - - /** - * Set the accountDetails property: Account details of the data to be transferred. - * - * @param accountDetails the accountDetails value to set. - * @return the DataExportDetails object itself. - */ - public DataExportDetails withAccountDetails(DataAccountDetails accountDetails) { - this.accountDetails = accountDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transferConfiguration() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property transferConfiguration in model DataExportDetails")); - } else { - transferConfiguration().validate(); - } - if (accountDetails() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property accountDetails in model DataExportDetails")); - } else { - accountDetails().validate(); - } - } -} 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 deleted file mode 100644 index f86b61b6df674..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Details of the data to be used for importing data to azure. */ -@Fluent -public final class DataImportDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataImportDetails.class); - - /* - * Account details of the data to be transferred - */ - @JsonProperty(value = "accountDetails", required = true) - private DataAccountDetails accountDetails; - - /** - * Get the accountDetails property: Account details of the data to be transferred. - * - * @return the accountDetails value. - */ - public DataAccountDetails accountDetails() { - return this.accountDetails; - } - - /** - * Set the accountDetails property: Account details of the data to be transferred. - * - * @param accountDetails the accountDetails value to set. - * @return the DataImportDetails object itself. - */ - public DataImportDetails withAccountDetails(DataAccountDetails accountDetails) { - this.accountDetails = accountDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accountDetails() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property accountDetails in model DataImportDetails")); - } else { - accountDetails().validate(); - } - } -} 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 deleted file mode 100644 index 3e94788c4e4f2..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataLocationToServiceLocationMap.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Map of data location to service location. */ -@Immutable -public final class DataLocationToServiceLocationMap { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataLocationToServiceLocationMap.class); - - /* - * Location of the data. - */ - @JsonProperty(value = "dataLocation", access = JsonProperty.Access.WRITE_ONLY) - private String dataLocation; - - /* - * Location of the service. - */ - @JsonProperty(value = "serviceLocation", access = JsonProperty.Access.WRITE_ONLY) - private String serviceLocation; - - /** - * Get the dataLocation property: Location of the data. - * - * @return the dataLocation value. - */ - public String dataLocation() { - return this.dataLocation; - } - - /** - * Get the serviceLocation property: Location of the service. - * - * @return the serviceLocation value. - */ - public String serviceLocation() { - return this.serviceLocation; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 07ec1a9e45b76..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationRequest.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Request to validate export and import data details. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateDataTransferDetails") -@Fluent -public final class DataTransferDetailsValidationRequest extends ValidationInputRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataTransferDetailsValidationRequest.class); - - /* - * List of DataTransfer details to be used to export data from azure. - */ - @JsonProperty(value = "dataExportDetails") - private List dataExportDetails; - - /* - * List of DataTransfer details to be used to import data to azure. - */ - @JsonProperty(value = "dataImportDetails") - private List dataImportDetails; - - /* - * Device type. - */ - @JsonProperty(value = "deviceType", required = true) - private SkuName deviceType; - - /* - * Type of the transfer. - */ - @JsonProperty(value = "transferType", required = true) - private TransferType transferType; - - /** - * Get the dataExportDetails property: List of DataTransfer details to be used to export data from azure. - * - * @return the dataExportDetails value. - */ - public List dataExportDetails() { - return this.dataExportDetails; - } - - /** - * Set the dataExportDetails property: List of DataTransfer details to be used to export data from azure. - * - * @param dataExportDetails the dataExportDetails value to set. - * @return the DataTransferDetailsValidationRequest object itself. - */ - public DataTransferDetailsValidationRequest withDataExportDetails(List dataExportDetails) { - this.dataExportDetails = dataExportDetails; - return this; - } - - /** - * Get the dataImportDetails property: List of DataTransfer details to be used to import data to azure. - * - * @return the dataImportDetails value. - */ - public List dataImportDetails() { - return this.dataImportDetails; - } - - /** - * Set the dataImportDetails property: List of DataTransfer details to be used to import data to azure. - * - * @param dataImportDetails the dataImportDetails value to set. - * @return the DataTransferDetailsValidationRequest object itself. - */ - public DataTransferDetailsValidationRequest withDataImportDetails(List dataImportDetails) { - this.dataImportDetails = dataImportDetails; - return this; - } - - /** - * Get the deviceType property: Device type. - * - * @return the deviceType value. - */ - public SkuName deviceType() { - return this.deviceType; - } - - /** - * Set the deviceType property: Device type. - * - * @param deviceType the deviceType value to set. - * @return the DataTransferDetailsValidationRequest object itself. - */ - public DataTransferDetailsValidationRequest withDeviceType(SkuName deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * Get the transferType property: Type of the transfer. - * - * @return the transferType value. - */ - public TransferType transferType() { - return this.transferType; - } - - /** - * Set the transferType property: Type of the transfer. - * - * @param transferType the transferType value to set. - * @return the DataTransferDetailsValidationRequest object itself. - */ - public DataTransferDetailsValidationRequest withTransferType(TransferType transferType) { - this.transferType = transferType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataExportDetails() != null) { - dataExportDetails().forEach(e -> e.validate()); - } - if (dataImportDetails() != null) { - dataImportDetails().forEach(e -> e.validate()); - } - if (deviceType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property deviceType in model DataTransferDetailsValidationRequest")); - } - if (transferType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property transferType in model DataTransferDetailsValidationRequest")); - } - } -} 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 deleted file mode 100644 index a4e30bfdc46b6..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataTransferDetailsValidationResponseProperties.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties of data transfer details validation response. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateDataTransferDetails") -@Immutable -public final class DataTransferDetailsValidationResponseProperties extends ValidationInputResponse { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(DataTransferDetailsValidationResponseProperties.class); - - /* - * Data transfer details validation status. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the status property: Data transfer details validation status. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index e7043682d8247..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataboxJobSecrets.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The secrets related to a databox job. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobSecretsType") -@JsonTypeName("DataBox") -@Fluent -public final class DataboxJobSecrets extends JobSecrets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataboxJobSecrets.class); - - /* - * Contains the list of secret objects for a job. - */ - @JsonProperty(value = "podSecrets") - private List podSecrets; - - /** - * Get the podSecrets property: Contains the list of secret objects for a job. - * - * @return the podSecrets value. - */ - 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() { - super.validate(); - if (podSecrets() != null) { - podSecrets().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DcAccessSecurityCode.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DcAccessSecurityCode.java deleted file mode 100644 index 3073553bde823..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DcAccessSecurityCode.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Dc access security code. */ -@Fluent -public final class DcAccessSecurityCode { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DcAccessSecurityCode.class); - - /* - * Reverse Dc access security code. - */ - @JsonProperty(value = "reverseDCAccessCode") - private String reverseDCAccessCode; - - /* - * Forward Dc access security code. - */ - @JsonProperty(value = "forwardDCAccessCode") - private String forwardDCAccessCode; - - /** - * Get the reverseDCAccessCode property: Reverse Dc access security code. - * - * @return the reverseDCAccessCode value. - */ - public String reverseDCAccessCode() { - return this.reverseDCAccessCode; - } - - /** - * Set the reverseDCAccessCode property: Reverse Dc access security code. - * - * @param reverseDCAccessCode the reverseDCAccessCode value to set. - * @return the DcAccessSecurityCode object itself. - */ - public DcAccessSecurityCode withReverseDCAccessCode(String reverseDCAccessCode) { - this.reverseDCAccessCode = reverseDCAccessCode; - return this; - } - - /** - * Get the forwardDCAccessCode property: Forward Dc access security code. - * - * @return the forwardDCAccessCode value. - */ - public String forwardDCAccessCode() { - return this.forwardDCAccessCode; - } - - /** - * Set the forwardDCAccessCode property: Forward Dc access security code. - * - * @param forwardDCAccessCode the forwardDCAccessCode value to set. - * @return the DcAccessSecurityCode object itself. - */ - public DcAccessSecurityCode withForwardDCAccessCode(String forwardDCAccessCode) { - this.forwardDCAccessCode = forwardDCAccessCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskScheduleAvailabilityRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskScheduleAvailabilityRequest.java deleted file mode 100644 index 2678990ec206c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskScheduleAvailabilityRequest.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request body to get the availability for scheduling disk orders. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "skuName") -@JsonTypeName("DataBoxDisk") -@Fluent -public final class DiskScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskScheduleAvailabilityRequest.class); - - /* - * The expected size of the data, which needs to be transferred in this - * job, in terabytes. - */ - @JsonProperty(value = "expectedDataSizeInTeraBytes", required = true) - private int expectedDataSizeInTeraBytes; - - /** - * Get the expectedDataSizeInTeraBytes property: The expected size of the data, which needs to be transferred in - * this job, in terabytes. - * - * @return the expectedDataSizeInTeraBytes value. - */ - public int expectedDataSizeInTeraBytes() { - return this.expectedDataSizeInTeraBytes; - } - - /** - * Set the expectedDataSizeInTeraBytes property: The expected size of the data, which needs to be transferred in - * this job, in terabytes. - * - * @param expectedDataSizeInTeraBytes the expectedDataSizeInTeraBytes value to set. - * @return the DiskScheduleAvailabilityRequest object itself. - */ - public DiskScheduleAvailabilityRequest withExpectedDataSizeInTeraBytes(int expectedDataSizeInTeraBytes) { - this.expectedDataSizeInTeraBytes = expectedDataSizeInTeraBytes; - return this; - } - - /** {@inheritDoc} */ - @Override - public DiskScheduleAvailabilityRequest withStorageLocation(String storageLocation) { - super.withStorageLocation(storageLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public DiskScheduleAvailabilityRequest withCountry(String country) { - super.withCountry(country); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskSecret.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskSecret.java deleted file mode 100644 index 928790986a51f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DiskSecret.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Contains all the secrets of a Disk. */ -@Immutable -public final class DiskSecret { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiskSecret.class); - - /* - * Serial number of the assigned disk. - */ - @JsonProperty(value = "diskSerialNumber", access = JsonProperty.Access.WRITE_ONLY) - private String diskSerialNumber; - - /* - * Bit Locker key of the disk which can be used to unlock the disk to copy - * data. - */ - @JsonProperty(value = "bitLockerKey", access = JsonProperty.Access.WRITE_ONLY) - private String bitLockerKey; - - /** - * Get the diskSerialNumber property: Serial number of the assigned disk. - * - * @return the diskSerialNumber value. - */ - public String diskSerialNumber() { - return this.diskSerialNumber; - } - - /** - * Get the bitLockerKey property: Bit Locker key of the disk which can be used to unlock the disk to copy data. - * - * @return the bitLockerKey value. - */ - public String bitLockerKey() { - return this.bitLockerKey; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index b8d076aeb6350..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DoubleEncryption.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for DoubleEncryption. */ -public enum DoubleEncryption { - /** Enum value Enabled. */ - ENABLED("Enabled"), - - /** Enum value Disabled. */ - DISABLED("Disabled"); - - /** The actual serialized value for a DoubleEncryption instance. */ - private final String value; - - DoubleEncryption(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DoubleEncryption instance. - * - * @param value the serialized value to parse. - * @return the parsed DoubleEncryption object, or null if unable to parse. - */ - @JsonCreator - public static DoubleEncryption fromString(String value) { - DoubleEncryption[] items = DoubleEncryption.values(); - for (DoubleEncryption item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index bae7ba7579829..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/EncryptionPreferences.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Preferences related to the Encryption. */ -@Fluent -public final class EncryptionPreferences { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionPreferences.class); - - /* - * Defines secondary layer of software-based encryption enablement. - */ - @JsonProperty(value = "doubleEncryption") - private DoubleEncryption doubleEncryption; - - /** - * Get the doubleEncryption property: Defines secondary layer of software-based encryption enablement. - * - * @return the doubleEncryption value. - */ - public DoubleEncryption doubleEncryption() { - return this.doubleEncryption; - } - - /** - * Set the doubleEncryption property: Defines secondary layer of software-based encryption enablement. - * - * @param doubleEncryption the doubleEncryption value to set. - * @return the EncryptionPreferences object itself. - */ - public EncryptionPreferences withDoubleEncryption(DoubleEncryption doubleEncryption) { - this.doubleEncryption = doubleEncryption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileDetails.java deleted file mode 100644 index 00fce152ea340..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileDetails.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Details of the filter files to be used for data transfer. */ -@Fluent -public final class FilterFileDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FilterFileDetails.class); - - /* - * Type of the filter file. - */ - @JsonProperty(value = "filterFileType", required = true) - private FilterFileType filterFileType; - - /* - * Path of the file that contains the details of all items to transfer. - */ - @JsonProperty(value = "filterFilePath", required = true) - private String filterFilePath; - - /** - * Get the filterFileType property: Type of the filter file. - * - * @return the filterFileType value. - */ - public FilterFileType filterFileType() { - return this.filterFileType; - } - - /** - * Set the filterFileType property: Type of the filter file. - * - * @param filterFileType the filterFileType value to set. - * @return the FilterFileDetails object itself. - */ - public FilterFileDetails withFilterFileType(FilterFileType filterFileType) { - this.filterFileType = filterFileType; - return this; - } - - /** - * Get the filterFilePath property: Path of the file that contains the details of all items to transfer. - * - * @return the filterFilePath value. - */ - public String filterFilePath() { - return this.filterFilePath; - } - - /** - * Set the filterFilePath property: Path of the file that contains the details of all items to transfer. - * - * @param filterFilePath the filterFilePath value to set. - * @return the FilterFileDetails object itself. - */ - public FilterFileDetails withFilterFilePath(String filterFilePath) { - this.filterFilePath = filterFilePath; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (filterFileType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property filterFileType in model FilterFileDetails")); - } - if (filterFilePath() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property filterFilePath in model FilterFileDetails")); - } - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileType.java deleted file mode 100644 index 8af235aebeb14..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/FilterFileType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for FilterFileType. */ -public enum FilterFileType { - /** Enum value AzureBlob. */ - AZURE_BLOB("AzureBlob"), - - /** Enum value AzureFile. */ - AZURE_FILE("AzureFile"); - - /** The actual serialized value for a FilterFileType instance. */ - private final String value; - - FilterFileType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a FilterFileType instance. - * - * @param value the serialized value to parse. - * @return the parsed FilterFileType object, or null if unable to parse. - */ - @JsonCreator - public static FilterFileType fromString(String value) { - FilterFileType[] items = FilterFileType.values(); - for (FilterFileType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 18a1a3222c300..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/HeavyScheduleAvailabilityRequest.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request body to get the availability for scheduling heavy orders. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "skuName") -@JsonTypeName("DataBoxHeavy") -@Immutable -public final class HeavyScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(HeavyScheduleAvailabilityRequest.class); - - /** {@inheritDoc} */ - @Override - public HeavyScheduleAvailabilityRequest withStorageLocation(String storageLocation) { - super.withStorageLocation(storageLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public HeavyScheduleAvailabilityRequest withCountry(String country) { - super.withCountry(country); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index b873a3500fbf7..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/IdentityProperties.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Managed identity properties. */ -@Fluent -public final class IdentityProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentityProperties.class); - - /* - * Managed service identity type. - */ - @JsonProperty(value = "type") - private String type; - - /* - * User assigned identity properties. - */ - @JsonProperty(value = "userAssigned") - private UserAssignedProperties userAssigned; - - /** - * Get the type property: Managed service identity type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Managed service identity type. - * - * @param type the type value to set. - * @return the IdentityProperties object itself. - */ - public IdentityProperties withType(String type) { - this.type = type; - return this; - } - - /** - * Get the userAssigned property: User assigned identity properties. - * - * @return the userAssigned value. - */ - public UserAssignedProperties userAssigned() { - return this.userAssigned; - } - - /** - * Set the userAssigned property: User assigned identity properties. - * - * @param userAssigned the userAssigned value to set. - * @return the IdentityProperties object itself. - */ - public IdentityProperties withUserAssigned(UserAssignedProperties userAssigned) { - this.userAssigned = userAssigned; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssigned() != null) { - userAssigned().validate(); - } - } -} 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 deleted file mode 100644 index 4142e5d455d7a..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryInfo.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Additional delivery info. */ -@Fluent -public final class JobDeliveryInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobDeliveryInfo.class); - - /* - * Scheduled date time. - */ - @JsonProperty(value = "scheduledDateTime") - private OffsetDateTime scheduledDateTime; - - /** - * Get the scheduledDateTime property: Scheduled date time. - * - * @return the scheduledDateTime value. - */ - public OffsetDateTime scheduledDateTime() { - return this.scheduledDateTime; - } - - /** - * Set the scheduledDateTime property: Scheduled date time. - * - * @param scheduledDateTime the scheduledDateTime value to set. - * @return the JobDeliveryInfo object itself. - */ - public JobDeliveryInfo withScheduledDateTime(OffsetDateTime scheduledDateTime) { - this.scheduledDateTime = scheduledDateTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index f6e89ba0258e8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDeliveryType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for JobDeliveryType. */ -public enum JobDeliveryType { - /** Enum value NonScheduled. */ - NON_SCHEDULED("NonScheduled"), - - /** Enum value Scheduled. */ - SCHEDULED("Scheduled"); - - /** The actual serialized value for a JobDeliveryType instance. */ - private final String value; - - JobDeliveryType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a JobDeliveryType instance. - * - * @param value the serialized value to parse. - * @return the parsed JobDeliveryType object, or null if unable to parse. - */ - @JsonCreator - public static JobDeliveryType fromString(String value) { - JobDeliveryType[] items = JobDeliveryType.values(); - for (JobDeliveryType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index ffd7b72d547e3..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java +++ /dev/null @@ -1,381 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Job details. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "jobDetailsType", - defaultImpl = JobDetails.class) -@JsonTypeName("JobDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "DataBoxDisk", value = DataBoxDiskJobDetails.class), - @JsonSubTypes.Type(name = "DataBoxHeavy", value = DataBoxHeavyJobDetails.class), - @JsonSubTypes.Type(name = "DataBox", value = DataBoxJobDetails.class) -}) -@Fluent -public class JobDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobDetails.class); - - /* - * List of stages that run in the job. - */ - @JsonProperty(value = "jobStages", access = JsonProperty.Access.WRITE_ONLY) - private List jobStages; - - /* - * Contact details for notification and shipping. - */ - @JsonProperty(value = "contactDetails", required = true) - private ContactDetails contactDetails; - - /* - * Shipping address of the customer. - */ - @JsonProperty(value = "shippingAddress") - private ShippingAddress shippingAddress; - - /* - * Delivery package shipping details. - */ - @JsonProperty(value = "deliveryPackage", access = JsonProperty.Access.WRITE_ONLY) - private PackageShippingDetails deliveryPackage; - - /* - * Return package shipping details. - */ - @JsonProperty(value = "returnPackage", access = JsonProperty.Access.WRITE_ONLY) - private PackageShippingDetails returnPackage; - - /* - * Details of the data to be imported into azure. - */ - @JsonProperty(value = "dataImportDetails") - private List dataImportDetails; - - /* - * Details of the data to be exported from azure. - */ - @JsonProperty(value = "dataExportDetails") - private List dataExportDetails; - - /* - * Preferences for the order. - */ - @JsonProperty(value = "preferences") - private Preferences preferences; - - /* - * List of copy log details. - */ - @JsonProperty(value = "copyLogDetails", access = JsonProperty.Access.WRITE_ONLY) - private List copyLogDetails; - - /* - * Shared access key to download the return shipment label - */ - @JsonProperty(value = "reverseShipmentLabelSasKey", access = JsonProperty.Access.WRITE_ONLY) - private String reverseShipmentLabelSasKey; - - /* - * Shared access key to download the chain of custody logs - */ - @JsonProperty(value = "chainOfCustodySasKey", access = JsonProperty.Access.WRITE_ONLY) - private String chainOfCustodySasKey; - - /* - * Details about which key encryption type is being used. - */ - @JsonProperty(value = "keyEncryptionKey") - private KeyEncryptionKey keyEncryptionKey; - - /* - * The expected size of the data, which needs to be transferred in this - * job, in terabytes. - */ - @JsonProperty(value = "expectedDataSizeInTeraBytes") - private Integer expectedDataSizeInTeraBytes; - - /* - * Available actions on the job. - */ - @JsonProperty(value = "actions", access = JsonProperty.Access.WRITE_ONLY) - private List actions; - - /* - * Last mitigation action performed on the job. - */ - @JsonProperty(value = "lastMitigationActionOnJob", access = JsonProperty.Access.WRITE_ONLY) - private LastMitigationActionOnJob lastMitigationActionOnJob; - - /** - * Get the jobStages property: List of stages that run in the job. - * - * @return the jobStages value. - */ - public List jobStages() { - return this.jobStages; - } - - /** - * Get the contactDetails property: Contact details for notification and shipping. - * - * @return the contactDetails value. - */ - public ContactDetails contactDetails() { - return this.contactDetails; - } - - /** - * Set the contactDetails property: Contact details for notification and shipping. - * - * @param contactDetails the contactDetails value to set. - * @return the JobDetails object itself. - */ - public JobDetails withContactDetails(ContactDetails contactDetails) { - this.contactDetails = contactDetails; - return this; - } - - /** - * Get the shippingAddress property: Shipping address of the customer. - * - * @return the shippingAddress value. - */ - public ShippingAddress shippingAddress() { - return this.shippingAddress; - } - - /** - * Set the shippingAddress property: Shipping address of the customer. - * - * @param shippingAddress the shippingAddress value to set. - * @return the JobDetails object itself. - */ - public JobDetails withShippingAddress(ShippingAddress shippingAddress) { - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get the deliveryPackage property: Delivery package shipping details. - * - * @return the deliveryPackage value. - */ - public PackageShippingDetails deliveryPackage() { - return this.deliveryPackage; - } - - /** - * Get the returnPackage property: Return package shipping details. - * - * @return the returnPackage value. - */ - public PackageShippingDetails returnPackage() { - return this.returnPackage; - } - - /** - * Get the dataImportDetails property: Details of the data to be imported into azure. - * - * @return the dataImportDetails value. - */ - public List dataImportDetails() { - return this.dataImportDetails; - } - - /** - * Set the dataImportDetails property: Details of the data to be imported into azure. - * - * @param dataImportDetails the dataImportDetails value to set. - * @return the JobDetails object itself. - */ - public JobDetails withDataImportDetails(List dataImportDetails) { - this.dataImportDetails = dataImportDetails; - return this; - } - - /** - * Get the dataExportDetails property: Details of the data to be exported from azure. - * - * @return the dataExportDetails value. - */ - public List dataExportDetails() { - return this.dataExportDetails; - } - - /** - * Set the dataExportDetails property: Details of the data to be exported from azure. - * - * @param dataExportDetails the dataExportDetails value to set. - * @return the JobDetails object itself. - */ - public JobDetails withDataExportDetails(List dataExportDetails) { - this.dataExportDetails = dataExportDetails; - return this; - } - - /** - * Get the preferences property: Preferences for the order. - * - * @return the preferences value. - */ - public Preferences preferences() { - return this.preferences; - } - - /** - * Set the preferences property: Preferences for the order. - * - * @param preferences the preferences value to set. - * @return the JobDetails object itself. - */ - public JobDetails withPreferences(Preferences preferences) { - this.preferences = preferences; - return this; - } - - /** - * Get the copyLogDetails property: List of copy log details. - * - * @return the copyLogDetails value. - */ - public List copyLogDetails() { - return this.copyLogDetails; - } - - /** - * Get the reverseShipmentLabelSasKey property: Shared access key to download the return shipment label. - * - * @return the reverseShipmentLabelSasKey value. - */ - public String reverseShipmentLabelSasKey() { - return this.reverseShipmentLabelSasKey; - } - - /** - * Get the chainOfCustodySasKey property: Shared access key to download the chain of custody logs. - * - * @return the chainOfCustodySasKey value. - */ - public String chainOfCustodySasKey() { - return this.chainOfCustodySasKey; - } - - /** - * Get the keyEncryptionKey property: Details about which key encryption type is being used. - * - * @return the keyEncryptionKey value. - */ - public KeyEncryptionKey keyEncryptionKey() { - return this.keyEncryptionKey; - } - - /** - * Set the keyEncryptionKey property: Details about which key encryption type is being used. - * - * @param keyEncryptionKey the keyEncryptionKey value to set. - * @return the JobDetails object itself. - */ - public JobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { - this.keyEncryptionKey = keyEncryptionKey; - return this; - } - - /** - * Get the expectedDataSizeInTeraBytes property: The expected size of the data, which needs to be transferred in - * this job, in terabytes. - * - * @return the expectedDataSizeInTeraBytes value. - */ - public Integer expectedDataSizeInTeraBytes() { - return this.expectedDataSizeInTeraBytes; - } - - /** - * Set the expectedDataSizeInTeraBytes property: The expected size of the data, which needs to be transferred in - * this job, in terabytes. - * - * @param expectedDataSizeInTeraBytes the expectedDataSizeInTeraBytes value to set. - * @return the JobDetails object itself. - */ - public JobDetails withExpectedDataSizeInTeraBytes(Integer expectedDataSizeInTeraBytes) { - this.expectedDataSizeInTeraBytes = expectedDataSizeInTeraBytes; - return this; - } - - /** - * Get the actions property: Available actions on the job. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Get the lastMitigationActionOnJob property: Last mitigation action performed on the job. - * - * @return the lastMitigationActionOnJob value. - */ - public LastMitigationActionOnJob lastMitigationActionOnJob() { - return this.lastMitigationActionOnJob; - } - - /** - * 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 - .logExceptionAsError( - 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 (copyLogDetails() != null) { - copyLogDetails().forEach(e -> e.validate()); - } - if (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - if (lastMitigationActionOnJob() != null) { - lastMitigationActionOnJob().validate(); - } - } -} 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 deleted file mode 100644 index a4909f3bbccea..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java +++ /dev/null @@ -1,477 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.databox.fluent.models.JobResourceInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** An immutable client-side representation of JobResource. */ -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. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the name property: Name of the object. - * - * @return the name value. - */ - String name(); - - /** - * Gets the id property: Id of the object. - * - * @return the id value. - */ - String id(); - - /** - * Gets the type property: Type of the object. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the transferType property: Type of the data transfer. - * - * @return the transferType value. - */ - TransferType transferType(); - - /** - * Gets the isCancellable property: Describes whether the job is cancellable or not. - * - * @return the isCancellable value. - */ - Boolean isCancellable(); - - /** - * Gets the isDeletable property: Describes whether the job is deletable or not. - * - * @return the isDeletable value. - */ - Boolean isDeletable(); - - /** - * Gets the isShippingAddressEditable property: Describes whether the shipping address is editable or not. - * - * @return the isShippingAddressEditable value. - */ - Boolean isShippingAddressEditable(); - - /** - * Gets the isPrepareToShipEnabled property: Is Prepare To Ship Enabled on this job. - * - * @return the isPrepareToShipEnabled value. - */ - Boolean isPrepareToShipEnabled(); - - /** - * Gets the status property: Name of the stage which is in progress. - * - * @return the status value. - */ - StageName status(); - - /** - * Gets the startTime property: Time at which the job was started in UTC ISO 8601 format. - * - * @return the startTime value. - */ - OffsetDateTime startTime(); - - /** - * Gets the error property: Top level error for the job. - * - * @return the error value. - */ - CloudError error(); - - /** - * Gets the details property: Details of a job run. This field will only be sent for expand details filter. - * - * @return the details value. - */ - JobDetails details(); - - /** - * Gets the cancellationReason property: Reason for cancellation. - * - * @return the cancellationReason value. - */ - String cancellationReason(); - - /** - * Gets the deliveryType property: Delivery type of Job. - * - * @return the deliveryType value. - */ - JobDeliveryType deliveryType(); - - /** - * Gets the deliveryInfo property: Delivery Info of Job. - * - * @return the deliveryInfo value. - */ - JobDeliveryInfo deliveryInfo(); - - /** - * Gets the isCancellableWithoutFee property: Flag to indicate cancellation of scheduled job. - * - * @return the isCancellableWithoutFee value. - */ - Boolean isCancellableWithoutFee(); - - /** - * Gets the sku property: The sku type. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the identity property: Msi identity of the resource. - * - * @return the identity value. - */ - ResourceIdentity identity(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.JobResourceInner object. - * - * @return the inner object. - */ - JobResourceInner innerModel(); - - /** The entirety of the JobResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithTransferType, - DefinitionStages.WithSku, - DefinitionStages.WithCreate { - } - /** The JobResource definition stages. */ - interface DefinitionStages { - /** The first stage of the JobResource definition. */ - interface Blank extends WithLocation { - } - /** The stage of the JobResource definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the JobResource definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The Resource Group Name. - * @return the next definition stage. - */ - WithTransferType withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the JobResource definition allowing to specify transferType. */ - interface WithTransferType { - /** - * Specifies the transferType property: Type of the data transfer.. - * - * @param transferType Type of the data transfer. - * @return the next definition stage. - */ - WithSku withTransferType(TransferType transferType); - } - /** The stage of the JobResource definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku type.. - * - * @param sku The sku type. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - /** - * The stage of the JobResource definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithDetails, - DefinitionStages.WithDeliveryType, - DefinitionStages.WithDeliveryInfo, - DefinitionStages.WithIdentity { - /** - * Executes the create request. - * - * @return the created resource. - */ - JobResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - JobResource create(Context context); - } - /** The stage of the JobResource definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the JobResource definition allowing to specify details. */ - interface WithDetails { - /** - * Specifies the details property: Details of a job run. This field will only be sent for expand details - * filter.. - * - * @param details Details of a job run. This field will only be sent for expand details filter. - * @return the next definition stage. - */ - WithCreate withDetails(JobDetails details); - } - /** The stage of the JobResource definition allowing to specify deliveryType. */ - interface WithDeliveryType { - /** - * Specifies the deliveryType property: Delivery type of Job.. - * - * @param deliveryType Delivery type of Job. - * @return the next definition stage. - */ - WithCreate withDeliveryType(JobDeliveryType deliveryType); - } - /** The stage of the JobResource definition allowing to specify deliveryInfo. */ - interface WithDeliveryInfo { - /** - * Specifies the deliveryInfo property: Delivery Info of Job.. - * - * @param deliveryInfo Delivery Info of Job. - * @return the next definition stage. - */ - WithCreate withDeliveryInfo(JobDeliveryInfo deliveryInfo); - } - /** The stage of the JobResource definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Msi identity of the resource. - * - * @param identity Msi identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ResourceIdentity identity); - } - } - /** - * Begins update for the JobResource resource. - * - * @return the stage of resource update. - */ - JobResource.Update update(); - - /** The template for JobResource update. */ - interface Update - extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithDetails, UpdateStages.WithIfMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - JobResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - JobResource apply(Context context); - } - /** The JobResource update stages. */ - interface UpdateStages { - /** The stage of the JobResource update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: The list of key value pairs that describe the resource. These tags can be - * used in viewing and grouping this resource (across resource groups).. - * - * @param tags The list of key value pairs that describe the resource. These tags can be used in viewing and - * grouping this resource (across resource groups). - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the JobResource update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Msi identity of the resource. - * - * @param identity Msi identity of the resource. - * @return the next definition stage. - */ - Update withIdentity(ResourceIdentity identity); - } - /** The stage of the JobResource update allowing to specify details. */ - interface WithDetails { - /** - * Specifies the details property: Details of a job to be updated.. - * - * @param details Details of a job to be updated. - * @return the next definition stage. - */ - Update withDetails(UpdateJobDetails details); - } - /** The stage of the JobResource update allowing to specify ifMatch. */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: Defines the If-Match condition. The patch will be performed only if the - * ETag of the job on the server matches this value.. - * - * @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. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - JobResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - JobResource refresh(Context context); - - /** - * Book shipment pick up. - * - * @param shipmentPickUpRequest Details of shipment pick up 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 shipment pick up response. - */ - ShipmentPickUpResponse bookShipmentPickUp(ShipmentPickUpRequest shipmentPickUpRequest); - - /** - * Book shipment pick up. - * - * @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 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 shipment pick up response. - */ - Response bookShipmentPickUpWithResponse( - ShipmentPickUpRequest shipmentPickUpRequest, Context context); - - /** - * CancelJob. - * - * @param cancellationReason Reason for cancellation. - * @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 cancel(CancellationReason cancellationReason); - - /** - * CancelJob. - * - * @param cancellationReason Reason for cancellation. - * @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 response. - */ - Response cancelWithResponse(CancellationReason cancellationReason, Context context); - - /** - * This method gets the unencrypted secrets related to the job. - * - * @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 list of unencrypted credentials for accessing device. - */ - PagedIterable listCredentials(); - - /** - * This method gets the unencrypted secrets related to the job. - * - * @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 list of unencrypted credentials for accessing device. - */ - PagedIterable listCredentials(Context context); -} 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/models/JobResourceList.java deleted file mode 100644 index 710e166a4f7d7..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.models.JobResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Job Resource Collection. */ -@Fluent -public final class JobResourceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobResourceList.class); - - /* - * List of job resources. - */ - @JsonProperty(value = "value") - private List value; - - /* - * Link for the next set of job resources. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of job resources. - * - * @return the value value. - */ - public List value() { - return this.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. - * - * @return the nextLink value. - */ - 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()); - } - } -} 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 deleted file mode 100644 index 15b225e52f565..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResourceUpdateParameter.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The JobResourceUpdateParameter. */ -@JsonFlatten -@Fluent -public class JobResourceUpdateParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobResourceUpdateParameter.class); - - /* - * The list of key value pairs that describe the resource. These tags can - * be used in viewing and grouping this resource (across resource groups). - */ - @JsonProperty(value = "tags") - private Map tags; - - /* - * Msi identity of the resource - */ - @JsonProperty(value = "identity") - private ResourceIdentity identity; - - /* - * Details of a job to be updated. - */ - @JsonProperty(value = "properties.details") - private UpdateJobDetails details; - - /** - * Get the tags property: The list of key value pairs that describe the resource. These tags can be used in viewing - * and grouping this resource (across resource groups). - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The list of key value pairs that describe the resource. These tags can be used in viewing - * and grouping this resource (across resource groups). - * - * @param tags the tags value to set. - * @return the JobResourceUpdateParameter object itself. - */ - public JobResourceUpdateParameter withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the identity property: Msi identity of the resource. - * - * @return the identity value. - */ - public ResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Msi identity of the resource. - * - * @param identity the identity value to set. - * @return the JobResourceUpdateParameter object itself. - */ - public JobResourceUpdateParameter withIdentity(ResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the details property: Details of a job to be updated. - * - * @return the details value. - */ - public UpdateJobDetails details() { - return this.details; - } - - /** - * Set the details property: Details of a job to be updated. - * - * @param details the details value to set. - * @return the JobResourceUpdateParameter object itself. - */ - public JobResourceUpdateParameter withDetails(UpdateJobDetails details) { - this.details = details; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (details() != null) { - details().validate(); - } - } -} 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 deleted file mode 100644 index 35a61793e93b6..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The base class for the secrets. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "jobSecretsType", - defaultImpl = JobSecrets.class) -@JsonTypeName("JobSecrets") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "DataBoxDisk", value = DataBoxDiskJobSecrets.class), - @JsonSubTypes.Type(name = "DataBoxHeavy", value = DataBoxHeavyJobSecrets.class), - @JsonSubTypes.Type(name = "DataBox", value = DataboxJobSecrets.class) -}) -@Immutable -public class JobSecrets { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobSecrets.class); - - /* - * Dc Access Security Code for Customer Managed Shipping - */ - @JsonProperty(value = "dcAccessSecurityCode", access = JsonProperty.Access.WRITE_ONLY) - private DcAccessSecurityCode dcAccessSecurityCode; - - /* - * Error while fetching the secrets. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private CloudError error; - - /** - * Get the dcAccessSecurityCode property: Dc Access Security Code for Customer Managed Shipping. - * - * @return the dcAccessSecurityCode value. - */ - public DcAccessSecurityCode dcAccessSecurityCode() { - return this.dcAccessSecurityCode; - } - - /** - * Get the error property: Error while fetching the secrets. - * - * @return the error value. - */ - public CloudError error() { - return this.error; - } - - /** - * 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(); - } - } -} 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 deleted file mode 100644 index d2d1cb69e7743..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobStages.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Job stages. */ -@Immutable -public final class JobStages { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobStages.class); - - /* - * Name of the job stage. - */ - @JsonProperty(value = "stageName", access = JsonProperty.Access.WRITE_ONLY) - private StageName stageName; - - /* - * Display name of the job stage. - */ - @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) - private String displayName; - - /* - * Status of the job stage. - */ - @JsonProperty(value = "stageStatus", access = JsonProperty.Access.WRITE_ONLY) - private StageStatus stageStatus; - - /* - * Time for the job stage in UTC ISO 8601 format. - */ - @JsonProperty(value = "stageTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime stageTime; - - /* - * Job Stage Details - */ - @JsonProperty(value = "jobStageDetails", access = JsonProperty.Access.WRITE_ONLY) - private Object jobStageDetails; - - /** - * Get the stageName property: Name of the job stage. - * - * @return the stageName value. - */ - public StageName stageName() { - return this.stageName; - } - - /** - * Get the displayName property: Display name of the job stage. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Get the stageStatus property: Status of the job stage. - * - * @return the stageStatus value. - */ - public StageStatus stageStatus() { - return this.stageStatus; - } - - /** - * Get the stageTime property: Time for the job stage in UTC ISO 8601 format. - * - * @return the stageTime value. - */ - public OffsetDateTime stageTime() { - return this.stageTime; - } - - /** - * Get the jobStageDetails property: Job Stage Details. - * - * @return the jobStageDetails value. - */ - public Object jobStageDetails() { - return this.jobStageDetails; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 0983bba6aa1a3..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Jobs. */ -public interface Jobs { - /** - * 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. - */ - 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. - */ - PagedIterable list(String skipToken, Context context); - - /** - * Lists all the jobs available under the given resource group. - * - * @param resourceGroupName The Resource Group Name. - * @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. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * 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. - * @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. - */ - 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. - * @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); - - /** - * 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. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String jobName, String expand, Context context); - - /** - * 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. - * @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 deleteByResourceGroup(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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String jobName, Context context); - - /** - * Book shipment pick up. - * - * @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. - * @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 shipment pick up response. - */ - ShipmentPickUpResponse bookShipmentPickUp( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest); - - /** - * Book shipment pick up. - * - * @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 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 shipment pick up response. - */ - Response bookShipmentPickUpWithResponse( - String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context); - - /** - * 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. - * @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 cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason); - - /** - * 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 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 response. - */ - Response cancelWithResponse( - String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context); - - /** - * This method gets the unencrypted secrets related to the 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 list of unencrypted credentials for accessing device. - */ - PagedIterable listCredentials(String resourceGroupName, String jobName); - - /** - * This method gets the unencrypted secrets related to the 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 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 list of unencrypted credentials for accessing device. - */ - PagedIterable listCredentials(String resourceGroupName, String jobName, Context context); - - /** - * Gets information about the specified job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified job. - */ - JobResource getById(String id); - - /** - * Gets information about the specified job. - * - * @param id the resource ID. - * @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. - */ - Response getByIdWithResponse(String id, String expand, Context context); - - /** - * Deletes a job. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a job. - * - * @param id the resource ID. - * @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 deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new JobResource resource. - * - * @param name resource name. - * @return the first stage of the new JobResource definition. - */ - JobResource.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index ebe1fbd53561b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KekType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for KekType. */ -public enum KekType { - /** Enum value MicrosoftManaged. */ - MICROSOFT_MANAGED("MicrosoftManaged"), - - /** Enum value CustomerManaged. */ - CUSTOMER_MANAGED("CustomerManaged"); - - /** The actual serialized value for a KekType instance. */ - private final String value; - - KekType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a KekType instance. - * - * @param value the serialized value to parse. - * @return the parsed KekType object, or null if unable to parse. - */ - @JsonCreator - public static KekType fromString(String value) { - KekType[] items = KekType.values(); - for (KekType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 037ed6b542152..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/KeyEncryptionKey.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Encryption key containing details about key to encrypt different keys. */ -@Fluent -public final class KeyEncryptionKey { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyEncryptionKey.class); - - /* - * Type of encryption key used for key encryption. - */ - @JsonProperty(value = "kekType", required = true) - private KekType kekType; - - /* - * Managed identity properties used for key encryption. - */ - @JsonProperty(value = "identityProperties") - private IdentityProperties identityProperties; - - /* - * Key encryption key. It is required in case of Customer managed KekType. - */ - @JsonProperty(value = "kekUrl") - private String kekUrl; - - /* - * Kek vault resource id. It is required in case of Customer managed - * KekType. - */ - @JsonProperty(value = "kekVaultResourceID") - private String kekVaultResourceId; - - /** - * Get the kekType property: Type of encryption key used for key encryption. - * - * @return the kekType value. - */ - public KekType kekType() { - return this.kekType; - } - - /** - * Set the kekType property: Type of encryption key used for key encryption. - * - * @param kekType the kekType value to set. - * @return the KeyEncryptionKey object itself. - */ - public KeyEncryptionKey withKekType(KekType kekType) { - this.kekType = kekType; - return this; - } - - /** - * Get the identityProperties property: Managed identity properties used for key encryption. - * - * @return the identityProperties value. - */ - public IdentityProperties identityProperties() { - return this.identityProperties; - } - - /** - * Set the identityProperties property: Managed identity properties used for key encryption. - * - * @param identityProperties the identityProperties value to set. - * @return the KeyEncryptionKey object itself. - */ - public KeyEncryptionKey withIdentityProperties(IdentityProperties identityProperties) { - this.identityProperties = identityProperties; - return this; - } - - /** - * Get the kekUrl property: Key encryption key. It is required in case of Customer managed KekType. - * - * @return the kekUrl value. - */ - public String kekUrl() { - return this.kekUrl; - } - - /** - * Set the kekUrl property: Key encryption key. It is required in case of Customer managed KekType. - * - * @param kekUrl the kekUrl value to set. - * @return the KeyEncryptionKey object itself. - */ - public KeyEncryptionKey withKekUrl(String kekUrl) { - this.kekUrl = kekUrl; - return this; - } - - /** - * Get the kekVaultResourceId property: Kek vault resource id. It is required in case of Customer managed KekType. - * - * @return the kekVaultResourceId value. - */ - public String kekVaultResourceId() { - return this.kekVaultResourceId; - } - - /** - * Set the kekVaultResourceId property: Kek vault resource id. It is required in case of Customer managed KekType. - * - * @param kekVaultResourceId the kekVaultResourceId value to set. - * @return the KeyEncryptionKey object itself. - */ - public KeyEncryptionKey withKekVaultResourceId(String kekVaultResourceId) { - this.kekVaultResourceId = kekVaultResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kekType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property kekType in model KeyEncryptionKey")); - } - if (identityProperties() != null) { - identityProperties().validate(); - } - } -} 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 deleted file mode 100644 index 9543ef6b853c6..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LastMitigationActionOnJob.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Last Mitigation Action Performed On Job. */ -@Fluent -public final class LastMitigationActionOnJob { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LastMitigationActionOnJob.class); - - /* - * Action performed date time - */ - @JsonProperty(value = "actionDateTimeInUtc") - private OffsetDateTime actionDateTimeInUtc; - - /* - * Action performed by customer, - * possibility is that mitigation might happen by customer or service or by - * ops - */ - @JsonProperty(value = "isPerformedByCustomer") - private Boolean isPerformedByCustomer; - - /* - * Resolution code provided by customer - */ - @JsonProperty(value = "customerResolution") - private CustomerResolutionCode customerResolution; - - /** - * Get the actionDateTimeInUtc property: Action performed date time. - * - * @return the actionDateTimeInUtc value. - */ - public OffsetDateTime actionDateTimeInUtc() { - return this.actionDateTimeInUtc; - } - - /** - * Set the actionDateTimeInUtc property: Action performed date time. - * - * @param actionDateTimeInUtc the actionDateTimeInUtc value to set. - * @return the LastMitigationActionOnJob object itself. - */ - public LastMitigationActionOnJob withActionDateTimeInUtc(OffsetDateTime actionDateTimeInUtc) { - this.actionDateTimeInUtc = actionDateTimeInUtc; - return this; - } - - /** - * Get the isPerformedByCustomer property: Action performed by customer, possibility is that mitigation might happen - * by customer or service or by ops. - * - * @return the isPerformedByCustomer value. - */ - public Boolean isPerformedByCustomer() { - return this.isPerformedByCustomer; - } - - /** - * Set the isPerformedByCustomer property: Action performed by customer, possibility is that mitigation might happen - * by customer or service or by ops. - * - * @param isPerformedByCustomer the isPerformedByCustomer value to set. - * @return the LastMitigationActionOnJob object itself. - */ - public LastMitigationActionOnJob withIsPerformedByCustomer(Boolean isPerformedByCustomer) { - this.isPerformedByCustomer = isPerformedByCustomer; - return this; - } - - /** - * Get the customerResolution property: Resolution code provided by customer. - * - * @return the customerResolution value. - */ - public CustomerResolutionCode customerResolution() { - return this.customerResolution; - } - - /** - * Set the customerResolution property: Resolution code provided by customer. - * - * @param customerResolution the customerResolution value to set. - * @return the LastMitigationActionOnJob object itself. - */ - public LastMitigationActionOnJob withCustomerResolution(CustomerResolutionCode customerResolution) { - this.customerResolution = customerResolution; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LogCollectionLevel.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LogCollectionLevel.java deleted file mode 100644 index 429dab198c1cb..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/LogCollectionLevel.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for LogCollectionLevel. */ -public enum LogCollectionLevel { - /** Enum value Error. */ - ERROR("Error"), - - /** Enum value Verbose. */ - VERBOSE("Verbose"); - - /** The actual serialized value for a LogCollectionLevel instance. */ - private final String value; - - LogCollectionLevel(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a LogCollectionLevel instance. - * - * @param value the serialized value to parse. - * @return the parsed LogCollectionLevel object, or null if unable to parse. - */ - @JsonCreator - public static LogCollectionLevel fromString(String value) { - LogCollectionLevel[] items = LogCollectionLevel.values(); - for (LogCollectionLevel item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ManagedDiskDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ManagedDiskDetails.java deleted file mode 100644 index 302ccab31ee1f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ManagedDiskDetails.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Details of the managed disks. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataAccountType") -@JsonTypeName("ManagedDisk") -@Fluent -public final class ManagedDiskDetails extends DataAccountDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedDiskDetails.class); - - /* - * Resource Group Id of the compute disks. - */ - @JsonProperty(value = "resourceGroupId", required = true) - private String resourceGroupId; - - /* - * Resource Id of the storage account that can be used to copy the vhd for - * staging. - */ - @JsonProperty(value = "stagingStorageAccountId", required = true) - private String stagingStorageAccountId; - - /** - * Get the resourceGroupId property: Resource Group Id of the compute disks. - * - * @return the resourceGroupId value. - */ - public String resourceGroupId() { - return this.resourceGroupId; - } - - /** - * Set the resourceGroupId property: Resource Group Id of the compute disks. - * - * @param resourceGroupId the resourceGroupId value to set. - * @return the ManagedDiskDetails object itself. - */ - public ManagedDiskDetails withResourceGroupId(String resourceGroupId) { - this.resourceGroupId = resourceGroupId; - return this; - } - - /** - * Get the stagingStorageAccountId property: Resource Id of the storage account that can be used to copy the vhd for - * staging. - * - * @return the stagingStorageAccountId value. - */ - public String stagingStorageAccountId() { - return this.stagingStorageAccountId; - } - - /** - * Set the stagingStorageAccountId property: Resource Id of the storage account that can be used to copy the vhd for - * staging. - * - * @param stagingStorageAccountId the stagingStorageAccountId value to set. - * @return the ManagedDiskDetails object itself. - */ - public ManagedDiskDetails withStagingStorageAccountId(String stagingStorageAccountId) { - this.stagingStorageAccountId = stagingStorageAccountId; - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedDiskDetails withSharePassword(String sharePassword) { - super.withSharePassword(sharePassword); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (resourceGroupId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property resourceGroupId in model ManagedDiskDetails")); - } - if (stagingStorageAccountId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property stagingStorageAccountId in model ManagedDiskDetails")); - } - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java deleted file mode 100644 index 3e96db855d73a..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Mitigate Job captured from request body for Mitigate API. */ -@Fluent -public final class MitigateJobRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MitigateJobRequest.class); - - /* - * Resolution code for the job - */ - @JsonProperty(value = "customerResolutionCode", required = true) - private CustomerResolutionCode customerResolutionCode; - - /** - * Get the customerResolutionCode property: Resolution code for the job. - * - * @return the customerResolutionCode value. - */ - public CustomerResolutionCode customerResolutionCode() { - return this.customerResolutionCode; - } - - /** - * Set the customerResolutionCode property: Resolution code for the job. - * - * @param customerResolutionCode the customerResolutionCode value to set. - * @return the MitigateJobRequest object itself. - */ - public MitigateJobRequest withCustomerResolutionCode(CustomerResolutionCode customerResolutionCode) { - this.customerResolutionCode = customerResolutionCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customerResolutionCode() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property customerResolutionCode in model MitigateJobRequest")); - } - } -} 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 deleted file mode 100644 index 37f1122ba5afa..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationPreference.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Notification preference for a job stage. */ -@Fluent -public final class NotificationPreference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationPreference.class); - - /* - * Name of the stage. - */ - @JsonProperty(value = "stageName", required = true) - private NotificationStageName stageName; - - /* - * Notification is required or not. - */ - @JsonProperty(value = "sendNotification", required = true) - private boolean sendNotification; - - /** - * Get the stageName property: Name of the stage. - * - * @return the stageName value. - */ - public NotificationStageName stageName() { - return this.stageName; - } - - /** - * Set the stageName property: Name of the stage. - * - * @param stageName the stageName value to set. - * @return the NotificationPreference object itself. - */ - public NotificationPreference withStageName(NotificationStageName stageName) { - this.stageName = stageName; - return this; - } - - /** - * Get the sendNotification property: Notification is required or not. - * - * @return the sendNotification value. - */ - public boolean sendNotification() { - return this.sendNotification; - } - - /** - * Set the sendNotification property: Notification is required or not. - * - * @param sendNotification the sendNotification value to set. - * @return the NotificationPreference object itself. - */ - public NotificationPreference withSendNotification(boolean sendNotification) { - this.sendNotification = sendNotification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (stageName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property stageName in model NotificationPreference")); - } - } -} 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 deleted file mode 100644 index b99a092b5bdea..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for NotificationStageName. */ -public enum NotificationStageName { - /** Enum value DevicePrepared. */ - DEVICE_PREPARED("DevicePrepared"), - - /** Enum value Dispatched. */ - DISPATCHED("Dispatched"), - - /** Enum value Delivered. */ - DELIVERED("Delivered"), - - /** Enum value PickedUp. */ - PICKED_UP("PickedUp"), - - /** Enum value AtAzureDC. */ - AT_AZURE_DC("AtAzureDC"), - - /** Enum value DataCopy. */ - DATA_COPY("DataCopy"); - - /** The actual serialized value for a NotificationStageName instance. */ - private final String value; - - NotificationStageName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a NotificationStageName instance. - * - * @param value the serialized value to parse. - * @return the parsed NotificationStageName object, or null if unable to parse. - */ - @JsonCreator - public static NotificationStageName fromString(String value) { - NotificationStageName[] items = NotificationStageName.values(); - for (NotificationStageName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 0b4c468c92792..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operation.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.resourcemanager.databox.fluent.models.OperationInner; - -/** An immutable client-side representation of Operation. */ -public interface Operation { - /** - * Gets the name property: Name of the operation. Format: - * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: Operation display values. - * - * @return the display value. - */ - 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. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} 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 deleted file mode 100644 index 8977531b7bfab..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Operation display. */ -@Fluent -public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - - /* - * Provider name. - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * Resource name. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * Localized name of the operation for display purpose. - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * Localized description of the operation for display purpose. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider property: Provider name. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: Provider name. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource name. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Resource name. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Localized name of the operation for display purpose. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: Localized name of the operation for display purpose. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Localized description of the operation for display purpose. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Localized description of the operation for display purpose. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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/models/OperationList.java deleted file mode 100644 index bd089672c751c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OperationList.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Operation Collection. */ -@Fluent -public final class OperationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationList.class); - - /* - * List of operations. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * Link for the next set of operations. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of operations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: Link for the next set of operations. - * - * @return the nextLink value. - */ - 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()); - } - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operations.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operations.java deleted file mode 100644 index 4607f0dfe8467..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Operations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * This method gets all the operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operation Collection. - */ - PagedIterable list(); - - /** - * This method gets all the operations. - * - * @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. - */ - 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 deleted file mode 100644 index 3a4c21bdcd83e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/OverallValidationStatus.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for OverallValidationStatus. */ -public enum OverallValidationStatus { - /** Enum value AllValidToProceed. */ - ALL_VALID_TO_PROCEED("AllValidToProceed"), - - /** Enum value InputsRevisitRequired. */ - INPUTS_REVISIT_REQUIRED("InputsRevisitRequired"), - - /** Enum value CertainInputValidationsSkipped. */ - CERTAIN_INPUT_VALIDATIONS_SKIPPED("CertainInputValidationsSkipped"); - - /** The actual serialized value for a OverallValidationStatus instance. */ - private final String value; - - OverallValidationStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a OverallValidationStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed OverallValidationStatus object, or null if unable to parse. - */ - @JsonCreator - public static OverallValidationStatus fromString(String value) { - OverallValidationStatus[] items = OverallValidationStatus.values(); - for (OverallValidationStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 035994f5048ff..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Shipping details. */ -@Immutable -public final class PackageShippingDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PackageShippingDetails.class); - - /* - * Name of the carrier. - */ - @JsonProperty(value = "carrierName", access = JsonProperty.Access.WRITE_ONLY) - private String carrierName; - - /* - * Tracking Id of shipment. - */ - @JsonProperty(value = "trackingId", access = JsonProperty.Access.WRITE_ONLY) - private String trackingId; - - /* - * Url where shipment can be tracked. - */ - @JsonProperty(value = "trackingUrl", access = JsonProperty.Access.WRITE_ONLY) - private String trackingUrl; - - /** - * Get the carrierName property: Name of the carrier. - * - * @return the carrierName value. - */ - public String carrierName() { - return this.carrierName; - } - - /** - * Get the trackingId property: Tracking Id of shipment. - * - * @return the trackingId value. - */ - public String trackingId() { - return this.trackingId; - } - - /** - * Get the trackingUrl property: Url where shipment can be tracked. - * - * @return the trackingUrl value. - */ - public String trackingUrl() { - return this.trackingUrl; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index c00104dd2fe71..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Preferences related to the order. */ -@Fluent -public final class Preferences { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Preferences.class); - - /* - * Preferred data center region. - */ - @JsonProperty(value = "preferredDataCenterRegion") - private List preferredDataCenterRegion; - - /* - * Preferences related to the shipment logistics of the sku. - */ - @JsonProperty(value = "transportPreferences") - private TransportPreferences transportPreferences; - - /* - * Preferences related to the Encryption. - */ - @JsonProperty(value = "encryptionPreferences") - private EncryptionPreferences encryptionPreferences; - - /** - * Get the preferredDataCenterRegion property: Preferred data center region. - * - * @return the preferredDataCenterRegion value. - */ - public List preferredDataCenterRegion() { - return this.preferredDataCenterRegion; - } - - /** - * Set the preferredDataCenterRegion property: Preferred data center region. - * - * @param preferredDataCenterRegion the preferredDataCenterRegion value to set. - * @return the Preferences object itself. - */ - public Preferences withPreferredDataCenterRegion(List preferredDataCenterRegion) { - this.preferredDataCenterRegion = preferredDataCenterRegion; - return this; - } - - /** - * Get the transportPreferences property: Preferences related to the shipment logistics of the sku. - * - * @return the transportPreferences value. - */ - public TransportPreferences transportPreferences() { - return this.transportPreferences; - } - - /** - * Set the transportPreferences property: Preferences related to the shipment logistics of the sku. - * - * @param transportPreferences the transportPreferences value to set. - * @return the Preferences object itself. - */ - public Preferences withTransportPreferences(TransportPreferences transportPreferences) { - this.transportPreferences = transportPreferences; - return this; - } - - /** - * Get the encryptionPreferences property: Preferences related to the Encryption. - * - * @return the encryptionPreferences value. - */ - public EncryptionPreferences encryptionPreferences() { - return this.encryptionPreferences; - } - - /** - * Set the encryptionPreferences property: Preferences related to the Encryption. - * - * @param encryptionPreferences the encryptionPreferences value to set. - * @return the Preferences object itself. - */ - public Preferences withEncryptionPreferences(EncryptionPreferences encryptionPreferences) { - this.encryptionPreferences = encryptionPreferences; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transportPreferences() != null) { - transportPreferences().validate(); - } - if (encryptionPreferences() != null) { - encryptionPreferences().validate(); - } - } -} 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 deleted file mode 100644 index b4212c809d2f1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationRequest.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request to validate preference of transport and data center. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidatePreferences") -@Fluent -public final class PreferencesValidationRequest extends ValidationInputRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PreferencesValidationRequest.class); - - /* - * Preference of transport and data center. - */ - @JsonProperty(value = "preference") - private Preferences preference; - - /* - * Device type to be used for the job. - */ - @JsonProperty(value = "deviceType", required = true) - private SkuName deviceType; - - /** - * Get the preference property: Preference of transport and data center. - * - * @return the preference value. - */ - public Preferences preference() { - return this.preference; - } - - /** - * Set the preference property: Preference of transport and data center. - * - * @param preference the preference value to set. - * @return the PreferencesValidationRequest object itself. - */ - public PreferencesValidationRequest withPreference(Preferences preference) { - this.preference = preference; - return this; - } - - /** - * Get the deviceType property: Device type to be used for the job. - * - * @return the deviceType value. - */ - public SkuName deviceType() { - return this.deviceType; - } - - /** - * Set the deviceType property: Device type to be used for the job. - * - * @param deviceType the deviceType value to set. - * @return the PreferencesValidationRequest object itself. - */ - public PreferencesValidationRequest withDeviceType(SkuName deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (preference() != null) { - preference().validate(); - } - if (deviceType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property deviceType in model PreferencesValidationRequest")); - } - } -} 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 deleted file mode 100644 index ef01957a75df1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PreferencesValidationResponseProperties.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties of data center and transport preference validation response. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidatePreferences") -@Immutable -public final class PreferencesValidationResponseProperties extends ValidationInputResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PreferencesValidationResponseProperties.class); - - /* - * Validation status of requested data center and transport. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the status property: Validation status of requested data center and transport. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index 322c418ccb6d2..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Request body to get the configuration for the region. */ -@Fluent -public final class RegionConfigurationRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegionConfigurationRequest.class); - - /* - * Request body to get the availability for scheduling orders. - */ - @JsonProperty(value = "scheduleAvailabilityRequest") - private ScheduleAvailabilityRequest scheduleAvailabilityRequest; - - /* - * Request body to get the transport availability for given sku. - */ - @JsonProperty(value = "transportAvailabilityRequest") - private TransportAvailabilityRequest transportAvailabilityRequest; - - /** - * Get the scheduleAvailabilityRequest property: Request body to get the availability for scheduling orders. - * - * @return the scheduleAvailabilityRequest value. - */ - public ScheduleAvailabilityRequest scheduleAvailabilityRequest() { - return this.scheduleAvailabilityRequest; - } - - /** - * Set the scheduleAvailabilityRequest property: Request body to get the availability for scheduling orders. - * - * @param scheduleAvailabilityRequest the scheduleAvailabilityRequest value to set. - * @return the RegionConfigurationRequest object itself. - */ - public RegionConfigurationRequest withScheduleAvailabilityRequest( - ScheduleAvailabilityRequest scheduleAvailabilityRequest) { - this.scheduleAvailabilityRequest = scheduleAvailabilityRequest; - return this; - } - - /** - * Get the transportAvailabilityRequest property: Request body to get the transport availability for given sku. - * - * @return the transportAvailabilityRequest value. - */ - public TransportAvailabilityRequest transportAvailabilityRequest() { - return this.transportAvailabilityRequest; - } - - /** - * Set the transportAvailabilityRequest property: Request body to get the transport availability for given sku. - * - * @param transportAvailabilityRequest the transportAvailabilityRequest value to set. - * @return the RegionConfigurationRequest object itself. - */ - public RegionConfigurationRequest withTransportAvailabilityRequest( - TransportAvailabilityRequest transportAvailabilityRequest) { - this.transportAvailabilityRequest = transportAvailabilityRequest; - 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(); - } - } -} 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 deleted file mode 100644 index 7e2e17b769387..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner; - -/** An immutable client-side representation of RegionConfigurationResponse. */ -public interface RegionConfigurationResponse { - /** - * Gets the scheduleAvailabilityResponse property: Schedule availability for given sku in a region. - * - * @return the scheduleAvailabilityResponse value. - */ - ScheduleAvailabilityResponse scheduleAvailabilityResponse(); - - /** - * Gets the transportAvailabilityResponse property: Transport options available for given sku in a region. - * - * @return the transportAvailabilityResponse value. - */ - TransportAvailabilityResponse transportAvailabilityResponse(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner object. - * - * @return the inner object. - */ - RegionConfigurationResponseInner innerModel(); -} 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 deleted file mode 100644 index 63b28374a643e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceIdentity.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Msi identity details of the resource. */ -@Fluent -public class ResourceIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceIdentity.class); - - /* - * Identity type - */ - @JsonProperty(value = "type") - private String type; - - /* - * Service Principal Id backing the Msi - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * Home Tenant Id - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * User Assigned Identities - */ - @JsonProperty(value = "userAssignedIdentities") - private Map userAssignedIdentities; - - /** - * Get the type property: Identity type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Identity type. - * - * @param type the type value to set. - * @return the ResourceIdentity object itself. - */ - public ResourceIdentity withType(String type) { - this.type = type; - return this; - } - - /** - * Get the principalId property: Service Principal Id backing the Msi. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: Home Tenant Id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the userAssignedIdentities property: User Assigned Identities. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: User Assigned Identities. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ResourceIdentity object itself. - */ - public ResourceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userAssignedIdentities() != null) { - userAssignedIdentities() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} 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 deleted file mode 100644 index b37529c6d66fe..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ResourceProviders.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of ResourceProviders. */ -public interface ResourceProviders { - /** - * 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 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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest); - - /** - * 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 mitigateJobRequest Mitigation 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 response. - */ - Response mitigateWithResponse( - String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context); -} 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 deleted file mode 100644 index 07e5fbd11cfcf..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityRequest.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request body to get the availability for scheduling orders. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "skuName", - defaultImpl = ScheduleAvailabilityRequest.class) -@JsonTypeName("ScheduleAvailabilityRequest") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "DataBox", value = DataBoxScheduleAvailabilityRequest.class), - @JsonSubTypes.Type(name = "DataBoxDisk", value = DiskScheduleAvailabilityRequest.class), - @JsonSubTypes.Type(name = "DataBoxHeavy", value = HeavyScheduleAvailabilityRequest.class) -}) -@Fluent -public class ScheduleAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleAvailabilityRequest.class); - - /* - * Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ - @JsonProperty(value = "storageLocation", required = true) - private String storageLocation; - - /* - * Country in which storage location should be supported. - */ - @JsonProperty(value = "country") - private String country; - - /** - * Get the storageLocation property: Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. - * - * @return the storageLocation value. - */ - public String storageLocation() { - return this.storageLocation; - } - - /** - * Set the storageLocation property: Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. - * - * @param storageLocation the storageLocation value to set. - * @return the ScheduleAvailabilityRequest object itself. - */ - public ScheduleAvailabilityRequest withStorageLocation(String storageLocation) { - this.storageLocation = storageLocation; - return this; - } - - /** - * Get the country property: Country in which storage location should be supported. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: Country in which storage location should be supported. - * - * @param country the country value to set. - * @return the ScheduleAvailabilityRequest object itself. - */ - public ScheduleAvailabilityRequest withCountry(String country) { - this.country = country; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageLocation() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageLocation in model ScheduleAvailabilityRequest")); - } - } -} 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 deleted file mode 100644 index 59ccbaca1d7fb..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ScheduleAvailabilityResponse.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Schedule availability for given sku in a region. */ -@Immutable -public final class ScheduleAvailabilityResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleAvailabilityResponse.class); - - /* - * List of dates available to schedule - */ - @JsonProperty(value = "availableDates", access = JsonProperty.Access.WRITE_ONLY) - private List availableDates; - - /** - * Get the availableDates property: List of dates available to schedule. - * - * @return the availableDates value. - */ - public List availableDates() { - return this.availableDates; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index f2a81cc9a44ea..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Services.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Services. */ -public interface Services { - /** - * 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 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. - */ - PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest); - - /** - * 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. - * @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. - */ - PagedIterable listAvailableSkusByResourceGroup( - String resourceGroupName, String location, AvailableSkuRequest availableSkuRequest, Context 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. - * @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 output of the address validation api. - */ - AddressValidationOutput validateAddress(String location, ValidateAddress validateAddress); - - /** - * [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 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 output of the address validation api. - */ - Response validateAddressWithResponse( - String location, ValidateAddress validateAddress, Context 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. - * @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); - - /** - * 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 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. - */ - Response validateInputsByResourceGroupWithResponse( - String resourceGroupName, String location, ValidationRequest validationRequest, Context context); - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @param location The location of the resource. - * @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 response of pre job creation validations. - */ - ValidationResponse validateInputs(String location, ValidationRequest validationRequest); - - /** - * This method does all necessary pre-job creation validation under subscription. - * - * @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 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. - */ - Response validateInputsWithResponse( - String location, ValidationRequest validationRequest, Context context); - - /** - * This API provides configuration details specific to given region/location at Subscription level. - * - * @param location The location of the resource. - * @param regionConfigurationRequest Request body to get the configuration for the region. - * @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, RegionConfigurationRequest regionConfigurationRequest); - - /** - * This API provides configuration details specific to given region/location at Subscription 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. - * @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. - */ - Response regionConfigurationWithResponse( - String location, RegionConfigurationRequest regionConfigurationRequest, Context context); - - /** - * 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. - * @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 regionConfigurationByResourceGroup( - String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest); - - /** - * 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 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. - */ - Response regionConfigurationByResourceGroupWithResponse( - String resourceGroupName, - String location, - RegionConfigurationRequest regionConfigurationRequest, - Context context); -} 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 deleted file mode 100644 index 9ad9e2f2d7f28..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareCredentialDetails.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Credential details of the shares in account. */ -@Immutable -public final class ShareCredentialDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShareCredentialDetails.class); - - /* - * Name of the share. - */ - @JsonProperty(value = "shareName", access = JsonProperty.Access.WRITE_ONLY) - private String shareName; - - /* - * Type of the share. - */ - @JsonProperty(value = "shareType", access = JsonProperty.Access.WRITE_ONLY) - private ShareDestinationFormatType shareType; - - /* - * User name for the share. - */ - @JsonProperty(value = "userName", access = JsonProperty.Access.WRITE_ONLY) - private String username; - - /* - * Password for the share. - */ - @JsonProperty(value = "password", access = JsonProperty.Access.WRITE_ONLY) - private String password; - - /* - * Access protocols supported on the device. - */ - @JsonProperty(value = "supportedAccessProtocols", access = JsonProperty.Access.WRITE_ONLY) - private List supportedAccessProtocols; - - /** - * Get the shareName property: Name of the share. - * - * @return the shareName value. - */ - public String shareName() { - return this.shareName; - } - - /** - * Get the shareType property: Type of the share. - * - * @return the shareType value. - */ - public ShareDestinationFormatType shareType() { - return this.shareType; - } - - /** - * Get the username property: User name for the share. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the password property: Password for the share. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Get the supportedAccessProtocols property: Access protocols supported on the device. - * - * @return the supportedAccessProtocols value. - */ - public List supportedAccessProtocols() { - return this.supportedAccessProtocols; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 063f7fb26b8b8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShareDestinationFormatType.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ShareDestinationFormatType. */ -public enum ShareDestinationFormatType { - /** Enum value UnknownType. */ - UNKNOWN_TYPE("UnknownType"), - - /** Enum value HCS. */ - HCS("HCS"), - - /** Enum value BlockBlob. */ - BLOCK_BLOB("BlockBlob"), - - /** Enum value PageBlob. */ - PAGE_BLOB("PageBlob"), - - /** Enum value AzureFile. */ - AZURE_FILE("AzureFile"), - - /** Enum value ManagedDisk. */ - MANAGED_DISK("ManagedDisk"); - - /** The actual serialized value for a ShareDestinationFormatType instance. */ - private final String value; - - ShareDestinationFormatType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ShareDestinationFormatType instance. - * - * @param value the serialized value to parse. - * @return the parsed ShareDestinationFormatType object, or null if unable to parse. - */ - @JsonCreator - public static ShareDestinationFormatType fromString(String value) { - ShareDestinationFormatType[] items = ShareDestinationFormatType.values(); - for (ShareDestinationFormatType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 9c83fa6328be7..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpRequest.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Shipment pick up request details. */ -@Fluent -public final class ShipmentPickUpRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShipmentPickUpRequest.class); - - /* - * Minimum date after which the pick up should commence, this must be in - * local time of pick up area. - */ - @JsonProperty(value = "startTime", required = true) - private OffsetDateTime startTime; - - /* - * Maximum date before which the pick up should commence, this must be in - * local time of pick up area. - */ - @JsonProperty(value = "endTime", required = true) - private OffsetDateTime endTime; - - /* - * Shipment Location in the pickup place. Eg.front desk - */ - @JsonProperty(value = "shipmentLocation", required = true) - private String shipmentLocation; - - /** - * Get the startTime property: Minimum date after which the pick up should commence, this must be in local time of - * pick up area. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Minimum date after which the pick up should commence, this must be in local time of - * pick up area. - * - * @param startTime the startTime value to set. - * @return the ShipmentPickUpRequest object itself. - */ - public ShipmentPickUpRequest withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: Maximum date before which the pick up should commence, this must be in local time of - * pick up area. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Maximum date before which the pick up should commence, this must be in local time of - * pick up area. - * - * @param endTime the endTime value to set. - * @return the ShipmentPickUpRequest object itself. - */ - public ShipmentPickUpRequest withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the shipmentLocation property: Shipment Location in the pickup place. Eg.front desk. - * - * @return the shipmentLocation value. - */ - public String shipmentLocation() { - return this.shipmentLocation; - } - - /** - * Set the shipmentLocation property: Shipment Location in the pickup place. Eg.front desk. - * - * @param shipmentLocation the shipmentLocation value to set. - * @return the ShipmentPickUpRequest object itself. - */ - public ShipmentPickUpRequest withShipmentLocation(String shipmentLocation) { - this.shipmentLocation = shipmentLocation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startTime() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property startTime in model ShipmentPickUpRequest")); - } - if (endTime() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property endTime in model ShipmentPickUpRequest")); - } - if (shipmentLocation() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property shipmentLocation in model ShipmentPickUpRequest")); - } - } -} 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 deleted file mode 100644 index 54af3154cabe8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShipmentPickUpResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.resourcemanager.databox.fluent.models.ShipmentPickUpResponseInner; -import java.time.OffsetDateTime; - -/** An immutable client-side representation of ShipmentPickUpResponse. */ -public interface ShipmentPickUpResponse { - /** - * Gets the confirmationNumber property: Confirmation number for the pick up request. - * - * @return the confirmationNumber value. - */ - String confirmationNumber(); - - /** - * Gets the readyByTime property: Time by which shipment should be ready for pick up, this is in local time of pick - * up area. - * - * @return the readyByTime value. - */ - OffsetDateTime readyByTime(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.ShipmentPickUpResponseInner object. - * - * @return the inner object. - */ - ShipmentPickUpResponseInner innerModel(); -} 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 deleted file mode 100644 index 77cd83beabd27..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ShippingAddress.java +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Shipping address where customer wishes to receive the device. */ -@Fluent -public final class ShippingAddress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ShippingAddress.class); - - /* - * Street Address line 1. - */ - @JsonProperty(value = "streetAddress1", required = true) - private String streetAddress1; - - /* - * Street Address line 2. - */ - @JsonProperty(value = "streetAddress2") - private String streetAddress2; - - /* - * Street Address line 3. - */ - @JsonProperty(value = "streetAddress3") - private String streetAddress3; - - /* - * Name of the City. - */ - @JsonProperty(value = "city") - private String city; - - /* - * Name of the State or Province. - */ - @JsonProperty(value = "stateOrProvince") - private String stateOrProvince; - - /* - * Name of the Country. - */ - @JsonProperty(value = "country", required = true) - private String country; - - /* - * Postal code. - */ - @JsonProperty(value = "postalCode") - private String postalCode; - - /* - * Extended Zip Code. - */ - @JsonProperty(value = "zipExtendedCode") - private String zipExtendedCode; - - /* - * Name of the company. - */ - @JsonProperty(value = "companyName") - private String companyName; - - /* - * Type of address. - */ - @JsonProperty(value = "addressType") - private AddressType addressType; - - /** - * Get the streetAddress1 property: Street Address line 1. - * - * @return the streetAddress1 value. - */ - public String streetAddress1() { - return this.streetAddress1; - } - - /** - * Set the streetAddress1 property: Street Address line 1. - * - * @param streetAddress1 the streetAddress1 value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withStreetAddress1(String streetAddress1) { - this.streetAddress1 = streetAddress1; - return this; - } - - /** - * Get the streetAddress2 property: Street Address line 2. - * - * @return the streetAddress2 value. - */ - public String streetAddress2() { - return this.streetAddress2; - } - - /** - * Set the streetAddress2 property: Street Address line 2. - * - * @param streetAddress2 the streetAddress2 value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withStreetAddress2(String streetAddress2) { - this.streetAddress2 = streetAddress2; - return this; - } - - /** - * Get the streetAddress3 property: Street Address line 3. - * - * @return the streetAddress3 value. - */ - public String streetAddress3() { - return this.streetAddress3; - } - - /** - * Set the streetAddress3 property: Street Address line 3. - * - * @param streetAddress3 the streetAddress3 value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withStreetAddress3(String streetAddress3) { - this.streetAddress3 = streetAddress3; - return this; - } - - /** - * Get the city property: Name of the City. - * - * @return the city value. - */ - public String city() { - return this.city; - } - - /** - * Set the city property: Name of the City. - * - * @param city the city value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withCity(String city) { - this.city = city; - return this; - } - - /** - * Get the stateOrProvince property: Name of the State or Province. - * - * @return the stateOrProvince value. - */ - public String stateOrProvince() { - return this.stateOrProvince; - } - - /** - * Set the stateOrProvince property: Name of the State or Province. - * - * @param stateOrProvince the stateOrProvince value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withStateOrProvince(String stateOrProvince) { - this.stateOrProvince = stateOrProvince; - return this; - } - - /** - * Get the country property: Name of the Country. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: Name of the Country. - * - * @param country the country value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the postalCode property: Postal code. - * - * @return the postalCode value. - */ - public String postalCode() { - return this.postalCode; - } - - /** - * Set the postalCode property: Postal code. - * - * @param postalCode the postalCode value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withPostalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } - - /** - * Get the zipExtendedCode property: Extended Zip Code. - * - * @return the zipExtendedCode value. - */ - public String zipExtendedCode() { - return this.zipExtendedCode; - } - - /** - * Set the zipExtendedCode property: Extended Zip Code. - * - * @param zipExtendedCode the zipExtendedCode value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withZipExtendedCode(String zipExtendedCode) { - this.zipExtendedCode = zipExtendedCode; - return this; - } - - /** - * Get the companyName property: Name of the company. - * - * @return the companyName value. - */ - public String companyName() { - return this.companyName; - } - - /** - * Set the companyName property: Name of the company. - * - * @param companyName the companyName value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withCompanyName(String companyName) { - this.companyName = companyName; - return this; - } - - /** - * Get the addressType property: Type of address. - * - * @return the addressType value. - */ - public AddressType addressType() { - return this.addressType; - } - - /** - * Set the addressType property: Type of address. - * - * @param addressType the addressType value to set. - * @return the ShippingAddress object itself. - */ - public ShippingAddress withAddressType(AddressType addressType) { - this.addressType = addressType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (streetAddress1() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property streetAddress1 in model ShippingAddress")); - } - if (country() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property country in model ShippingAddress")); - } - } -} 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 deleted file mode 100644 index 206244a2550d7..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Sku.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Sku. */ -@Fluent -public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - - /* - * The sku name. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /* - * The display name of the sku. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The sku family. - */ - @JsonProperty(value = "family") - private String family; - - /** - * Get the name property: The sku name. - * - * @return the name value. - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name property: The sku name. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: The display name of the sku. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name of the sku. - * - * @param displayName the displayName value to set. - * @return the Sku object itself. - */ - public Sku withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the family property: The sku family. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Set the family property: The sku family. - * - * @param family the family value to set. - * @return the Sku object itself. - */ - public Sku withFamily(String family) { - this.family = family; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); - } - } -} 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 deleted file mode 100644 index 38d5513319da6..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationRequest.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request to validate sku availability. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateSkuAvailability") -@Fluent -public final class SkuAvailabilityValidationRequest extends ValidationInputRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuAvailabilityValidationRequest.class); - - /* - * Device type to be used for the job. - */ - @JsonProperty(value = "deviceType", required = true) - private SkuName deviceType; - - /* - * Type of the transfer. - */ - @JsonProperty(value = "transferType", required = true) - private TransferType transferType; - - /* - * ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements - */ - @JsonProperty(value = "country", required = true) - private String country; - - /* - * Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - */ - @JsonProperty(value = "location", required = true) - private String location; - - /** - * Get the deviceType property: Device type to be used for the job. - * - * @return the deviceType value. - */ - public SkuName deviceType() { - return this.deviceType; - } - - /** - * Set the deviceType property: Device type to be used for the job. - * - * @param deviceType the deviceType value to set. - * @return the SkuAvailabilityValidationRequest object itself. - */ - public SkuAvailabilityValidationRequest withDeviceType(SkuName deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * Get the transferType property: Type of the transfer. - * - * @return the transferType value. - */ - public TransferType transferType() { - return this.transferType; - } - - /** - * Set the transferType property: Type of the transfer. - * - * @param transferType the transferType value to set. - * @return the SkuAvailabilityValidationRequest object itself. - */ - public SkuAvailabilityValidationRequest withTransferType(TransferType transferType) { - this.transferType = transferType; - return this; - } - - /** - * Get the country property: ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. - * - * @return the country value. - */ - public String country() { - return this.country; - } - - /** - * Set the country property: ISO country code. Country for hardware shipment. For codes check: - * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. - * - * @param country the country value to set. - * @return the SkuAvailabilityValidationRequest object itself. - */ - public SkuAvailabilityValidationRequest withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the location property: Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Location for data transfer. For locations check: - * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. - * - * @param location the location value to set. - * @return the SkuAvailabilityValidationRequest object itself. - */ - public SkuAvailabilityValidationRequest withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (deviceType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property deviceType in model SkuAvailabilityValidationRequest")); - } - if (transferType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property transferType in model SkuAvailabilityValidationRequest")); - } - if (country() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property country in model SkuAvailabilityValidationRequest")); - } - if (location() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property location in model SkuAvailabilityValidationRequest")); - } - } -} 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 deleted file mode 100644 index 2d1d696a2ed71..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuAvailabilityValidationResponseProperties.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties of sku availability validation response. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateSkuAvailability") -@Immutable -public final class SkuAvailabilityValidationResponseProperties extends ValidationInputResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuAvailabilityValidationResponseProperties.class); - - /* - * Sku availability validation status. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the status property: Sku availability validation status. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index b9a054ffd6935..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCapacity.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Capacity of the sku. */ -@Immutable -public final class SkuCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCapacity.class); - - /* - * Usable capacity in TB. - */ - @JsonProperty(value = "usable", access = JsonProperty.Access.WRITE_ONLY) - private String usable; - - /* - * Maximum capacity in TB. - */ - @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) - private String maximum; - - /** - * Get the usable property: Usable capacity in TB. - * - * @return the usable value. - */ - public String usable() { - return this.usable; - } - - /** - * Get the maximum property: Maximum capacity in TB. - * - * @return the maximum value. - */ - public String maximum() { - return this.maximum; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index e20fa820e22ad..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuCost.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes metadata for retrieving price info. */ -@Immutable -public final class SkuCost { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCost.class); - - /* - * Meter id of the Sku. - */ - @JsonProperty(value = "meterId", access = JsonProperty.Access.WRITE_ONLY) - private String meterId; - - /* - * The type of the meter. - */ - @JsonProperty(value = "meterType", access = JsonProperty.Access.WRITE_ONLY) - private String meterType; - - /* - * Multiplier specifies the region specific value to be multiplied with 1$ - * guid. Eg: Our new regions will be using 1$ shipping guid with - * appropriate multiplier specific to region. - */ - @JsonProperty(value = "multiplier", access = JsonProperty.Access.WRITE_ONLY) - private Double multiplier; - - /** - * Get the meterId property: Meter id of the Sku. - * - * @return the meterId value. - */ - public String meterId() { - return this.meterId; - } - - /** - * Get the meterType property: The type of the meter. - * - * @return the meterType value. - */ - public String meterType() { - return this.meterType; - } - - /** - * Get the multiplier property: Multiplier specifies the region specific value to be multiplied with 1$ guid. Eg: - * Our new regions will be using 1$ shipping guid with appropriate multiplier specific to region. - * - * @return the multiplier value. - */ - public Double multiplier() { - return this.multiplier; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 8321992516df5..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuDisabledReason.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SkuDisabledReason. */ -public enum SkuDisabledReason { - /** Enum value None. */ - NONE("None"), - - /** Enum value Country. */ - COUNTRY("Country"), - - /** Enum value Region. */ - REGION("Region"), - - /** Enum value Feature. */ - FEATURE("Feature"), - - /** Enum value OfferType. */ - OFFER_TYPE("OfferType"), - - /** Enum value NoSubscriptionInfo. */ - NO_SUBSCRIPTION_INFO("NoSubscriptionInfo"); - - /** The actual serialized value for a SkuDisabledReason instance. */ - private final String value; - - SkuDisabledReason(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuDisabledReason instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuDisabledReason object, or null if unable to parse. - */ - @JsonCreator - public static SkuDisabledReason fromString(String value) { - SkuDisabledReason[] items = SkuDisabledReason.values(); - for (SkuDisabledReason item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 3fd4df6c66120..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.resourcemanager.databox.fluent.models.SkuInformationInner; -import java.util.List; - -/** An immutable client-side representation of SkuInformation. */ -public interface SkuInformation { - /** - * Gets the sku property: The Sku. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the enabled property: The sku is enabled or not. - * - * @return the enabled value. - */ - Boolean enabled(); - - /** - * Gets the dataLocationToServiceLocationMap property: The map of data location to service location. - * - * @return the dataLocationToServiceLocationMap value. - */ - List dataLocationToServiceLocationMap(); - - /** - * Gets the capacity property: Capacity of the Sku. - * - * @return the capacity value. - */ - SkuCapacity capacity(); - - /** - * Gets the costs property: Cost of the Sku. - * - * @return the costs value. - */ - List costs(); - - /** - * Gets the apiVersions property: Api versions that support this Sku. - * - * @return the apiVersions value. - */ - List apiVersions(); - - /** - * Gets the disabledReason property: Reason why the Sku is disabled. - * - * @return the disabledReason value. - */ - SkuDisabledReason disabledReason(); - - /** - * Gets the disabledReasonMessage property: Message for why the Sku is disabled. - * - * @return the disabledReasonMessage value. - */ - String disabledReasonMessage(); - - /** - * Gets the requiredFeature property: Required feature to access the sku. - * - * @return the requiredFeature value. - */ - String requiredFeature(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.SkuInformationInner object. - * - * @return the inner object. - */ - SkuInformationInner innerModel(); -} 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 deleted file mode 100644 index 9f727241afc51..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SkuName. */ -public enum SkuName { - /** Enum value DataBox. */ - DATA_BOX("DataBox"), - - /** Enum value DataBoxDisk. */ - DATA_BOX_DISK("DataBoxDisk"), - - /** Enum value DataBoxHeavy. */ - DATA_BOX_HEAVY("DataBoxHeavy"); - - /** The actual serialized value for a SkuName instance. */ - private final String value; - - SkuName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuName instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuName object, or null if unable to parse. - */ - @JsonCreator - public static SkuName fromString(String value) { - SkuName[] items = SkuName.values(); - for (SkuName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 7af3e1211144d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for StageName. */ -public enum StageName { - /** Enum value DeviceOrdered. */ - DEVICE_ORDERED("DeviceOrdered"), - - /** Enum value DevicePrepared. */ - DEVICE_PREPARED("DevicePrepared"), - - /** Enum value Dispatched. */ - DISPATCHED("Dispatched"), - - /** Enum value Delivered. */ - DELIVERED("Delivered"), - - /** Enum value PickedUp. */ - PICKED_UP("PickedUp"), - - /** Enum value AtAzureDC. */ - AT_AZURE_DC("AtAzureDC"), - - /** Enum value DataCopy. */ - DATA_COPY("DataCopy"), - - /** Enum value Completed. */ - COMPLETED("Completed"), - - /** Enum value CompletedWithErrors. */ - COMPLETED_WITH_ERRORS("CompletedWithErrors"), - - /** Enum value Cancelled. */ - CANCELLED("Cancelled"), - - /** Enum value Failed_IssueReportedAtCustomer. */ - FAILED_ISSUE_REPORTED_AT_CUSTOMER("Failed_IssueReportedAtCustomer"), - - /** Enum value Failed_IssueDetectedAtAzureDC. */ - FAILED_ISSUE_DETECTED_AT_AZURE_DC("Failed_IssueDetectedAtAzureDC"), - - /** Enum value Aborted. */ - ABORTED("Aborted"), - - /** Enum value CompletedWithWarnings. */ - COMPLETED_WITH_WARNINGS("CompletedWithWarnings"), - - /** Enum value ReadyToDispatchFromAzureDC. */ - READY_TO_DISPATCH_FROM_AZURE_DC("ReadyToDispatchFromAzureDC"), - - /** Enum value ReadyToReceiveAtAzureDC. */ - READY_TO_RECEIVE_AT_AZURE_DC("ReadyToReceiveAtAzureDC"); - - /** The actual serialized value for a StageName instance. */ - private final String value; - - StageName(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a StageName instance. - * - * @param value the serialized value to parse. - * @return the parsed StageName object, or null if unable to parse. - */ - @JsonCreator - public static StageName fromString(String value) { - StageName[] items = StageName.values(); - for (StageName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 3ac5d3d6cfca0..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for StageStatus. */ -public enum StageStatus { - /** Enum value None. */ - NONE("None"), - - /** Enum value InProgress. */ - IN_PROGRESS("InProgress"), - - /** Enum value Succeeded. */ - SUCCEEDED("Succeeded"), - - /** Enum value Failed. */ - FAILED("Failed"), - - /** Enum value Cancelled. */ - CANCELLED("Cancelled"), - - /** Enum value Cancelling. */ - CANCELLING("Cancelling"), - - /** Enum value SucceededWithErrors. */ - SUCCEEDED_WITH_ERRORS("SucceededWithErrors"), - - /** Enum value WaitingForCustomerAction. */ - WAITING_FOR_CUSTOMER_ACTION("WaitingForCustomerAction"), - - /** Enum value SucceededWithWarnings. */ - SUCCEEDED_WITH_WARNINGS("SucceededWithWarnings"); - - /** The actual serialized value for a StageStatus instance. */ - private final String value; - - StageStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a StageStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed StageStatus object, or null if unable to parse. - */ - @JsonCreator - public static StageStatus fromString(String value) { - StageStatus[] items = StageStatus.values(); - for (StageStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 999647c3cac6b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StorageAccountDetails.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Details for the storage account. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataAccountType") -@JsonTypeName("StorageAccount") -@Fluent -public final class StorageAccountDetails extends DataAccountDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountDetails.class); - - /* - * Storage Account Resource Id. - */ - @JsonProperty(value = "storageAccountId", required = true) - private String storageAccountId; - - /** - * Get the storageAccountId property: Storage Account Resource Id. - * - * @return the storageAccountId value. - */ - public String storageAccountId() { - return this.storageAccountId; - } - - /** - * Set the storageAccountId property: Storage Account Resource Id. - * - * @param storageAccountId the storageAccountId value to set. - * @return the StorageAccountDetails object itself. - */ - public StorageAccountDetails withStorageAccountId(String storageAccountId) { - this.storageAccountId = storageAccountId; - return this; - } - - /** {@inheritDoc} */ - @Override - public StorageAccountDetails withSharePassword(String sharePassword) { - super.withSharePassword(sharePassword); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (storageAccountId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageAccountId in model StorageAccountDetails")); - } - } -} 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 deleted file mode 100644 index 5291b3f92a0a4..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationRequest.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Request to validate subscription permission to create jobs. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateSubscriptionIsAllowedToCreateJob") -@Immutable -public final class SubscriptionIsAllowedToCreateJobValidationRequest extends ValidationInputRequest { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SubscriptionIsAllowedToCreateJobValidationRequest.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index 29808923f0e40..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties of subscription permission to create job validation response. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateSubscriptionIsAllowedToCreateJob") -@Immutable -public final class SubscriptionIsAllowedToCreateJobValidationResponseProperties extends ValidationInputResponse { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(SubscriptionIsAllowedToCreateJobValidationResponseProperties.class); - - /* - * Validation status of subscription permission to create job. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private ValidationStatus status; - - /** - * Get the status property: Validation status of subscription permission to create job. - * - * @return the status value. - */ - public ValidationStatus status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 deleted file mode 100644 index 4fb40089f85dc..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferAllDetails.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Details to transfer all data. */ -@Fluent -public final class TransferAllDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransferAllDetails.class); - - /* - * Type of the account of data - */ - @JsonProperty(value = "dataAccountType", required = true) - private DataAccountType dataAccountType; - - /* - * To indicate if all Azure blobs have to be transferred - */ - @JsonProperty(value = "transferAllBlobs") - private Boolean transferAllBlobs; - - /* - * To indicate if all Azure Files have to be transferred - */ - @JsonProperty(value = "transferAllFiles") - private Boolean transferAllFiles; - - /** - * Get the dataAccountType property: Type of the account of data. - * - * @return the dataAccountType value. - */ - public DataAccountType dataAccountType() { - return this.dataAccountType; - } - - /** - * Set the dataAccountType property: Type of the account of data. - * - * @param dataAccountType the dataAccountType value to set. - * @return the TransferAllDetails object itself. - */ - public TransferAllDetails withDataAccountType(DataAccountType dataAccountType) { - this.dataAccountType = dataAccountType; - return this; - } - - /** - * Get the transferAllBlobs property: To indicate if all Azure blobs have to be transferred. - * - * @return the transferAllBlobs value. - */ - public Boolean transferAllBlobs() { - return this.transferAllBlobs; - } - - /** - * Set the transferAllBlobs property: To indicate if all Azure blobs have to be transferred. - * - * @param transferAllBlobs the transferAllBlobs value to set. - * @return the TransferAllDetails object itself. - */ - public TransferAllDetails withTransferAllBlobs(Boolean transferAllBlobs) { - this.transferAllBlobs = transferAllBlobs; - return this; - } - - /** - * Get the transferAllFiles property: To indicate if all Azure Files have to be transferred. - * - * @return the transferAllFiles value. - */ - public Boolean transferAllFiles() { - return this.transferAllFiles; - } - - /** - * Set the transferAllFiles property: To indicate if all Azure Files have to be transferred. - * - * @param transferAllFiles the transferAllFiles value to set. - * @return the TransferAllDetails object itself. - */ - public TransferAllDetails withTransferAllFiles(Boolean transferAllFiles) { - this.transferAllFiles = transferAllFiles; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataAccountType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataAccountType in model TransferAllDetails")); - } - } -} 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 deleted file mode 100644 index 08752ee8d2434..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfiguration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration for defining the transfer of data. */ -@Fluent -public final class TransferConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransferConfiguration.class); - - /* - * Type of the configuration for transfer. - */ - @JsonProperty(value = "transferConfigurationType", required = true) - private TransferConfigurationType transferConfigurationType; - - /* - * Map of filter type and the details to filter. This field is required - * only if the TransferConfigurationType is given as TransferUsingFilter. - */ - @JsonProperty(value = "transferFilterDetails") - private TransferConfigurationTransferFilterDetails transferFilterDetails; - - /* - * Map of filter type and the details to transfer all data. This field is - * required only if the TransferConfigurationType is given as TransferAll - */ - @JsonProperty(value = "transferAllDetails") - private TransferConfigurationTransferAllDetails transferAllDetails; - - /** - * Get the transferConfigurationType property: Type of the configuration for transfer. - * - * @return the transferConfigurationType value. - */ - public TransferConfigurationType transferConfigurationType() { - return this.transferConfigurationType; - } - - /** - * Set the transferConfigurationType property: Type of the configuration for transfer. - * - * @param transferConfigurationType the transferConfigurationType value to set. - * @return the TransferConfiguration object itself. - */ - public TransferConfiguration withTransferConfigurationType(TransferConfigurationType transferConfigurationType) { - this.transferConfigurationType = transferConfigurationType; - return this; - } - - /** - * Get the transferFilterDetails property: Map of filter type and the details to filter. This field is required only - * if the TransferConfigurationType is given as TransferUsingFilter. - * - * @return the transferFilterDetails value. - */ - public TransferConfigurationTransferFilterDetails transferFilterDetails() { - return this.transferFilterDetails; - } - - /** - * Set the transferFilterDetails property: Map of filter type and the details to filter. This field is required only - * if the TransferConfigurationType is given as TransferUsingFilter. - * - * @param transferFilterDetails the transferFilterDetails value to set. - * @return the TransferConfiguration object itself. - */ - public TransferConfiguration withTransferFilterDetails( - TransferConfigurationTransferFilterDetails transferFilterDetails) { - this.transferFilterDetails = transferFilterDetails; - return this; - } - - /** - * Get the transferAllDetails property: Map of filter type and the details to transfer all data. This field is - * required only if the TransferConfigurationType is given as TransferAll. - * - * @return the transferAllDetails value. - */ - public TransferConfigurationTransferAllDetails transferAllDetails() { - return this.transferAllDetails; - } - - /** - * Set the transferAllDetails property: Map of filter type and the details to transfer all data. This field is - * required only if the TransferConfigurationType is given as TransferAll. - * - * @param transferAllDetails the transferAllDetails value to set. - * @return the TransferConfiguration object itself. - */ - public TransferConfiguration withTransferAllDetails(TransferConfigurationTransferAllDetails transferAllDetails) { - this.transferAllDetails = transferAllDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (transferConfigurationType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property transferConfigurationType in model TransferConfiguration")); - } - if (transferFilterDetails() != null) { - transferFilterDetails().validate(); - } - if (transferAllDetails() != null) { - transferAllDetails().validate(); - } - } -} 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 deleted file mode 100644 index 8e4d4a8933324..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferAllDetails.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType - * is given as TransferAll. - */ -@Fluent -public final class TransferConfigurationTransferAllDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransferConfigurationTransferAllDetails.class); - - /* - * Details to transfer all data. - */ - @JsonProperty(value = "include") - private TransferAllDetails include; - - /** - * Get the include property: Details to transfer all data. - * - * @return the include value. - */ - public TransferAllDetails include() { - return this.include; - } - - /** - * Set the include property: Details to transfer all data. - * - * @param include the include value to set. - * @return the TransferConfigurationTransferAllDetails object itself. - */ - public TransferConfigurationTransferAllDetails withInclude(TransferAllDetails include) { - this.include = include; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (include() != null) { - include().validate(); - } - } -} 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 deleted file mode 100644 index b387573748400..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationTransferFilterDetails.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given - * as TransferUsingFilter. - */ -@Fluent -public final class TransferConfigurationTransferFilterDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransferConfigurationTransferFilterDetails.class); - - /* - * Details of the filtering the transfer of data. - */ - @JsonProperty(value = "include") - private TransferFilterDetails include; - - /** - * Get the include property: Details of the filtering the transfer of data. - * - * @return the include value. - */ - public TransferFilterDetails include() { - return this.include; - } - - /** - * Set the include property: Details of the filtering the transfer of data. - * - * @param include the include value to set. - * @return the TransferConfigurationTransferFilterDetails object itself. - */ - public TransferConfigurationTransferFilterDetails withInclude(TransferFilterDetails include) { - this.include = include; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (include() != null) { - include().validate(); - } - } -} 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 deleted file mode 100644 index 71de8996c3c8c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferConfigurationType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for TransferConfigurationType. */ -public enum TransferConfigurationType { - /** Enum value TransferAll. */ - TRANSFER_ALL("TransferAll"), - - /** Enum value TransferUsingFilter. */ - TRANSFER_USING_FILTER("TransferUsingFilter"); - - /** The actual serialized value for a TransferConfigurationType instance. */ - private final String value; - - TransferConfigurationType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a TransferConfigurationType instance. - * - * @param value the serialized value to parse. - * @return the parsed TransferConfigurationType object, or null if unable to parse. - */ - @JsonCreator - public static TransferConfigurationType fromString(String value) { - TransferConfigurationType[] items = TransferConfigurationType.values(); - for (TransferConfigurationType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 8db6d12cc869f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferFilterDetails.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Details of the filtering the transfer of data. */ -@Fluent -public final class TransferFilterDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransferFilterDetails.class); - - /* - * Type of the account of data. - */ - @JsonProperty(value = "dataAccountType", required = true) - private DataAccountType dataAccountType; - - /* - * Filter details to transfer blobs. - */ - @JsonProperty(value = "blobFilterDetails") - private BlobFilterDetails blobFilterDetails; - - /* - * Filter details to transfer Azure files. - */ - @JsonProperty(value = "azureFileFilterDetails") - private AzureFileFilterDetails azureFileFilterDetails; - - /* - * Details of the filter files to be used for data transfer. - */ - @JsonProperty(value = "filterFileDetails") - private List filterFileDetails; - - /** - * Get the dataAccountType property: Type of the account of data. - * - * @return the dataAccountType value. - */ - public DataAccountType dataAccountType() { - return this.dataAccountType; - } - - /** - * Set the dataAccountType property: Type of the account of data. - * - * @param dataAccountType the dataAccountType value to set. - * @return the TransferFilterDetails object itself. - */ - public TransferFilterDetails withDataAccountType(DataAccountType dataAccountType) { - this.dataAccountType = dataAccountType; - return this; - } - - /** - * Get the blobFilterDetails property: Filter details to transfer blobs. - * - * @return the blobFilterDetails value. - */ - public BlobFilterDetails blobFilterDetails() { - return this.blobFilterDetails; - } - - /** - * Set the blobFilterDetails property: Filter details to transfer blobs. - * - * @param blobFilterDetails the blobFilterDetails value to set. - * @return the TransferFilterDetails object itself. - */ - public TransferFilterDetails withBlobFilterDetails(BlobFilterDetails blobFilterDetails) { - this.blobFilterDetails = blobFilterDetails; - return this; - } - - /** - * Get the azureFileFilterDetails property: Filter details to transfer Azure files. - * - * @return the azureFileFilterDetails value. - */ - public AzureFileFilterDetails azureFileFilterDetails() { - return this.azureFileFilterDetails; - } - - /** - * Set the azureFileFilterDetails property: Filter details to transfer Azure files. - * - * @param azureFileFilterDetails the azureFileFilterDetails value to set. - * @return the TransferFilterDetails object itself. - */ - public TransferFilterDetails withAzureFileFilterDetails(AzureFileFilterDetails azureFileFilterDetails) { - this.azureFileFilterDetails = azureFileFilterDetails; - return this; - } - - /** - * Get the filterFileDetails property: Details of the filter files to be used for data transfer. - * - * @return the filterFileDetails value. - */ - public List filterFileDetails() { - return this.filterFileDetails; - } - - /** - * Set the filterFileDetails property: Details of the filter files to be used for data transfer. - * - * @param filterFileDetails the filterFileDetails value to set. - * @return the TransferFilterDetails object itself. - */ - public TransferFilterDetails withFilterFileDetails(List filterFileDetails) { - this.filterFileDetails = filterFileDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataAccountType() == null) { - throw logger - .logExceptionAsError( - 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()); - } - } -} 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 deleted file mode 100644 index 8fdccb4664f39..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransferType.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for TransferType. */ -public enum TransferType { - /** Enum value ImportToAzure. */ - IMPORT_TO_AZURE("ImportToAzure"), - - /** Enum value ExportFromAzure. */ - EXPORT_FROM_AZURE("ExportFromAzure"); - - /** The actual serialized value for a TransferType instance. */ - private final String value; - - TransferType(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a TransferType instance. - * - * @param value the serialized value to parse. - * @return the parsed TransferType object, or null if unable to parse. - */ - @JsonCreator - public static TransferType fromString(String value) { - TransferType[] items = TransferType.values(); - for (TransferType item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 7a28de9e6d715..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityDetails.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Transport options availability details for given region. */ -@Immutable -public final class TransportAvailabilityDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransportAvailabilityDetails.class); - - /* - * Transport Shipment Type supported for given region. - */ - @JsonProperty(value = "shipmentType", access = JsonProperty.Access.WRITE_ONLY) - private TransportShipmentTypes shipmentType; - - /** - * Get the shipmentType property: Transport Shipment Type supported for given region. - * - * @return the shipmentType value. - */ - public TransportShipmentTypes shipmentType() { - return this.shipmentType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityRequest.java deleted file mode 100644 index 21a17e54675d6..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityRequest.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Request body to get the transport availability for given sku. */ -@Fluent -public final class TransportAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransportAvailabilityRequest.class); - - /* - * Type of the device. - */ - @JsonProperty(value = "skuName") - private SkuName skuName; - - /** - * Get the skuName property: Type of the device. - * - * @return the skuName value. - */ - public SkuName skuName() { - return this.skuName; - } - - /** - * Set the skuName property: Type of the device. - * - * @param skuName the skuName value to set. - * @return the TransportAvailabilityRequest object itself. - */ - public TransportAvailabilityRequest withSkuName(SkuName skuName) { - this.skuName = skuName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityResponse.java deleted file mode 100644 index 0243043dc7264..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportAvailabilityResponse.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Transport options available for given sku in a region. */ -@Immutable -public final class TransportAvailabilityResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransportAvailabilityResponse.class); - - /* - * List of transport availability details for given region - */ - @JsonProperty(value = "transportAvailabilityDetails", access = JsonProperty.Access.WRITE_ONLY) - private List transportAvailabilityDetails; - - /** - * Get the transportAvailabilityDetails property: List of transport availability details for given region. - * - * @return the transportAvailabilityDetails value. - */ - public List 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()); - } - } -} 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 deleted file mode 100644 index d5cd7a4a24d0b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Preferences related to the shipment logistics of the sku. */ -@Fluent -public final class TransportPreferences { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransportPreferences.class); - - /* - * Indicates Shipment Logistics type that the customer preferred. - */ - @JsonProperty(value = "preferredShipmentType", required = true) - private TransportShipmentTypes preferredShipmentType; - - /** - * Get the preferredShipmentType property: Indicates Shipment Logistics type that the customer preferred. - * - * @return the preferredShipmentType value. - */ - public TransportShipmentTypes preferredShipmentType() { - return this.preferredShipmentType; - } - - /** - * Set the preferredShipmentType property: Indicates Shipment Logistics type that the customer preferred. - * - * @param preferredShipmentType the preferredShipmentType value to set. - * @return the TransportPreferences object itself. - */ - public TransportPreferences withPreferredShipmentType(TransportShipmentTypes preferredShipmentType) { - this.preferredShipmentType = preferredShipmentType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (preferredShipmentType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property preferredShipmentType in model TransportPreferences")); - } - } -} 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 deleted file mode 100644 index 2ae24db76f2a1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportShipmentTypes.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for TransportShipmentTypes. */ -public enum TransportShipmentTypes { - /** Enum value CustomerManaged. */ - CUSTOMER_MANAGED("CustomerManaged"), - - /** Enum value MicrosoftManaged. */ - MICROSOFT_MANAGED("MicrosoftManaged"); - - /** The actual serialized value for a TransportShipmentTypes instance. */ - private final String value; - - TransportShipmentTypes(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a TransportShipmentTypes instance. - * - * @param value the serialized value to parse. - * @return the parsed TransportShipmentTypes object, or null if unable to parse. - */ - @JsonCreator - public static TransportShipmentTypes fromString(String value) { - TransportShipmentTypes[] items = TransportShipmentTypes.values(); - for (TransportShipmentTypes item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 504d4a36e9c62..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentials.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner; - -/** An immutable client-side representation of UnencryptedCredentials. */ -public interface UnencryptedCredentials { - /** - * Gets the jobName property: Name of the job. - * - * @return the jobName value. - */ - String jobName(); - - /** - * Gets the jobSecrets property: Secrets related to this job. - * - * @return the jobSecrets value. - */ - JobSecrets jobSecrets(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner object. - * - * @return the inner object. - */ - UnencryptedCredentialsInner innerModel(); -} 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/models/UnencryptedCredentialsList.java deleted file mode 100644 index 510fd4665f248..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UnencryptedCredentialsList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of unencrypted credentials for accessing device. */ -@Fluent -public final class UnencryptedCredentialsList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UnencryptedCredentialsList.class); - - /* - * List of unencrypted credentials. - */ - @JsonProperty(value = "value") - private List value; - - /* - * Link for the next set of unencrypted credentials. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: List of unencrypted credentials. - * - * @return the value value. - */ - public List value() { - return this.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. - * - * @return the nextLink value. - */ - 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()); - } - } -} 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 deleted file mode 100644 index aa073ff928f76..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Job details for update. */ -@Fluent -public final class UpdateJobDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateJobDetails.class); - - /* - * Contact details for notification and shipping. - */ - @JsonProperty(value = "contactDetails") - private ContactDetails contactDetails; - - /* - * Shipping address of the customer. - */ - @JsonProperty(value = "shippingAddress") - private ShippingAddress shippingAddress; - - /* - * Key encryption key for the job. - */ - @JsonProperty(value = "keyEncryptionKey") - private KeyEncryptionKey keyEncryptionKey; - - /** - * Get the contactDetails property: Contact details for notification and shipping. - * - * @return the contactDetails value. - */ - public ContactDetails contactDetails() { - return this.contactDetails; - } - - /** - * Set the contactDetails property: Contact details for notification and shipping. - * - * @param contactDetails the contactDetails value to set. - * @return the UpdateJobDetails object itself. - */ - public UpdateJobDetails withContactDetails(ContactDetails contactDetails) { - this.contactDetails = contactDetails; - return this; - } - - /** - * Get the shippingAddress property: Shipping address of the customer. - * - * @return the shippingAddress value. - */ - public ShippingAddress shippingAddress() { - return this.shippingAddress; - } - - /** - * Set the shippingAddress property: Shipping address of the customer. - * - * @param shippingAddress the shippingAddress value to set. - * @return the UpdateJobDetails object itself. - */ - public UpdateJobDetails withShippingAddress(ShippingAddress shippingAddress) { - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get the keyEncryptionKey property: Key encryption key for the job. - * - * @return the keyEncryptionKey value. - */ - public KeyEncryptionKey keyEncryptionKey() { - return this.keyEncryptionKey; - } - - /** - * Set the keyEncryptionKey property: Key encryption key for the job. - * - * @param keyEncryptionKey the keyEncryptionKey value to set. - * @return the UpdateJobDetails object itself. - */ - public UpdateJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { - this.keyEncryptionKey = keyEncryptionKey; - 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 (keyEncryptionKey() != null) { - keyEncryptionKey().validate(); - } - } -} 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 deleted file mode 100644 index 99986cb7be6ea..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedIdentity.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Class defining User assigned identity details. */ -@Immutable -public class UserAssignedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class); - - /* - * The principal id of user assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The client id of user assigned identity. - */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private String clientId; - - /** - * Get the principalId property: The principal id of user assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client id of user assigned identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index da63f2e360965..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UserAssignedProperties.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** User assigned identity properties. */ -@Fluent -public final class UserAssignedProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedProperties.class); - - /* - * Arm resource id for user assigned identity to be used to fetch MSI - * token. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * Get the resourceId property: Arm resource id for user assigned identity to be used to fetch MSI token. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: Arm resource id for user assigned identity to be used to fetch MSI token. - * - * @param resourceId the resourceId value to set. - * @return the UserAssignedProperties object itself. - */ - public UserAssignedProperties withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index 8cb51ba0482f1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidateAddress.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The requirements to validate customer address where the device needs to be shipped. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType") -@JsonTypeName("ValidateAddress") -@Fluent -public final class ValidateAddress extends ValidationInputRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateAddress.class); - - /* - * Shipping address of the customer. - */ - @JsonProperty(value = "shippingAddress", required = true) - private ShippingAddress shippingAddress; - - /* - * Device type to be used for the job. - */ - @JsonProperty(value = "deviceType", required = true) - private SkuName deviceType; - - /* - * Preferences related to the shipment logistics of the sku. - */ - @JsonProperty(value = "transportPreferences") - private TransportPreferences transportPreferences; - - /** - * Get the shippingAddress property: Shipping address of the customer. - * - * @return the shippingAddress value. - */ - public ShippingAddress shippingAddress() { - return this.shippingAddress; - } - - /** - * Set the shippingAddress property: Shipping address of the customer. - * - * @param shippingAddress the shippingAddress value to set. - * @return the ValidateAddress object itself. - */ - public ValidateAddress withShippingAddress(ShippingAddress shippingAddress) { - this.shippingAddress = shippingAddress; - return this; - } - - /** - * Get the deviceType property: Device type to be used for the job. - * - * @return the deviceType value. - */ - public SkuName deviceType() { - return this.deviceType; - } - - /** - * Set the deviceType property: Device type to be used for the job. - * - * @param deviceType the deviceType value to set. - * @return the ValidateAddress object itself. - */ - public ValidateAddress withDeviceType(SkuName deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * Get the transportPreferences property: Preferences related to the shipment logistics of the sku. - * - * @return the transportPreferences value. - */ - public TransportPreferences transportPreferences() { - return this.transportPreferences; - } - - /** - * Set the transportPreferences property: Preferences related to the shipment logistics of the sku. - * - * @param transportPreferences the transportPreferences value to set. - * @return the ValidateAddress object itself. - */ - public ValidateAddress withTransportPreferences(TransportPreferences transportPreferences) { - this.transportPreferences = transportPreferences; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (shippingAddress() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property shippingAddress in model ValidateAddress")); - } else { - shippingAddress().validate(); - } - if (deviceType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property deviceType in model ValidateAddress")); - } - if (transportPreferences() != null) { - transportPreferences().validate(); - } - } -} 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 deleted file mode 100644 index ac52f51497394..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputDiscriminator.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ValidationInputDiscriminator. */ -public enum ValidationInputDiscriminator { - /** Enum value ValidateAddress. */ - VALIDATE_ADDRESS("ValidateAddress"), - - /** Enum value ValidateSubscriptionIsAllowedToCreateJob. */ - VALIDATE_SUBSCRIPTION_IS_ALLOWED_TO_CREATE_JOB("ValidateSubscriptionIsAllowedToCreateJob"), - - /** Enum value ValidatePreferences. */ - VALIDATE_PREFERENCES("ValidatePreferences"), - - /** Enum value ValidateCreateOrderLimit. */ - VALIDATE_CREATE_ORDER_LIMIT("ValidateCreateOrderLimit"), - - /** Enum value ValidateSkuAvailability. */ - VALIDATE_SKU_AVAILABILITY("ValidateSkuAvailability"), - - /** Enum value ValidateDataTransferDetails. */ - VALIDATE_DATA_TRANSFER_DETAILS("ValidateDataTransferDetails"); - - /** The actual serialized value for a ValidationInputDiscriminator instance. */ - private final String value; - - ValidationInputDiscriminator(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ValidationInputDiscriminator instance. - * - * @param value the serialized value to parse. - * @return the parsed ValidationInputDiscriminator object, or null if unable to parse. - */ - @JsonCreator - public static ValidationInputDiscriminator fromString(String value) { - ValidationInputDiscriminator[] items = ValidationInputDiscriminator.values(); - for (ValidationInputDiscriminator item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 0c364cb0ffbc2..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Minimum fields that must be present in any type of validation request. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "validationType", - defaultImpl = ValidationInputRequest.class) -@JsonTypeName("ValidationInputRequest") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ValidateAddress", value = ValidateAddress.class), - @JsonSubTypes.Type( - name = "ValidateCreateOrderLimit", - value = CreateOrderLimitForSubscriptionValidationRequest.class), - @JsonSubTypes.Type(name = "ValidateDataTransferDetails", value = DataTransferDetailsValidationRequest.class), - @JsonSubTypes.Type(name = "ValidatePreferences", value = PreferencesValidationRequest.class), - @JsonSubTypes.Type(name = "ValidateSkuAvailability", value = SkuAvailabilityValidationRequest.class), - @JsonSubTypes.Type( - name = "ValidateSubscriptionIsAllowedToCreateJob", - value = SubscriptionIsAllowedToCreateJobValidationRequest.class) -}) -@Immutable -public class ValidationInputRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationInputRequest.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 deleted file mode 100644 index be7fad543fddc..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationInputResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Minimum properties that should be present in each individual validation response. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "validationType", - defaultImpl = ValidationInputResponse.class) -@JsonTypeName("ValidationInputResponse") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ValidateAddress", value = AddressValidationProperties.class), - @JsonSubTypes.Type( - name = "ValidateCreateOrderLimit", - value = CreateOrderLimitForSubscriptionValidationResponseProperties.class), - @JsonSubTypes.Type( - name = "ValidateDataTransferDetails", - value = DataTransferDetailsValidationResponseProperties.class), - @JsonSubTypes.Type(name = "ValidatePreferences", value = PreferencesValidationResponseProperties.class), - @JsonSubTypes.Type(name = "ValidateSkuAvailability", value = SkuAvailabilityValidationResponseProperties.class), - @JsonSubTypes.Type( - name = "ValidateSubscriptionIsAllowedToCreateJob", - value = SubscriptionIsAllowedToCreateJobValidationResponseProperties.class) -}) -@Immutable -public class ValidationInputResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationInputResponse.class); - - /* - * Error code and message of validation response. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private CloudError error; - - /** - * Get the error property: Error code and message of validation response. - * - * @return the error value. - */ - public CloudError error() { - return this.error; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationRequest.java deleted file mode 100644 index 4f0b8f55bba60..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationRequest.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Minimum request requirement of any validation category. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "validationCategory", - defaultImpl = ValidationRequest.class) -@JsonTypeName("ValidationRequest") -@JsonSubTypes({@JsonSubTypes.Type(name = "JobCreationValidation", value = CreateJobValidations.class)}) -@Fluent -public class ValidationRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationRequest.class); - - /* - * List of request details contain validationType and its request as key - * and value respectively. - */ - @JsonProperty(value = "individualRequestDetails", required = true) - private List individualRequestDetails; - - /** - * Get the individualRequestDetails property: List of request details contain validationType and its request as key - * and value respectively. - * - * @return the individualRequestDetails value. - */ - public List individualRequestDetails() { - return this.individualRequestDetails; - } - - /** - * Set the individualRequestDetails property: List of request details contain validationType and its request as key - * and value respectively. - * - * @param individualRequestDetails the individualRequestDetails value to set. - * @return the ValidationRequest object itself. - */ - public ValidationRequest withIndividualRequestDetails(List individualRequestDetails) { - this.individualRequestDetails = individualRequestDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (individualRequestDetails() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property individualRequestDetails in model ValidationRequest")); - } else { - individualRequestDetails().forEach(e -> e.validate()); - } - } -} 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 deleted file mode 100644 index ba449252be628..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.azure.resourcemanager.databox.fluent.models.ValidationResponseInner; -import java.util.List; - -/** An immutable client-side representation of ValidationResponse. */ -public interface ValidationResponse { - /** - * Gets the status property: Overall validation status. - * - * @return the status value. - */ - OverallValidationStatus status(); - - /** - * Gets the individualResponseDetails property: List of response details contain validationType and its response as - * key and value respectively. - * - * @return the individualResponseDetails value. - */ - List individualResponseDetails(); - - /** - * Gets the inner com.azure.resourcemanager.databox.fluent.models.ValidationResponseInner object. - * - * @return the inner object. - */ - ValidationResponseInner innerModel(); -} 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 deleted file mode 100644 index ca038f8d8520e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ValidationStatus.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ValidationStatus. */ -public enum ValidationStatus { - /** Enum value Valid. */ - VALID("Valid"), - - /** Enum value Invalid. */ - INVALID("Invalid"), - - /** Enum value Skipped. */ - SKIPPED("Skipped"); - - /** The actual serialized value for a ValidationStatus instance. */ - private final String value; - - ValidationStatus(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ValidationStatus instance. - * - * @param value the serialized value to parse. - * @return the parsed ValidationStatus object, or null if unable to parse. - */ - @JsonCreator - public static ValidationStatus fromString(String value) { - ValidationStatus[] items = ValidationStatus.values(); - for (ValidationStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index f4759f657b712..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the data models for DataBoxManagementClient. null. */ -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 deleted file mode 100644 index 4a83caa801813..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the classes for DataBoxManagementClient. null. */ -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 deleted file mode 100644 index e86620631ac4e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/module-info.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.databox { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.databox; - exports com.azure.resourcemanager.databox.fluent; - exports com.azure.resourcemanager.databox.fluent.models; - exports com.azure.resourcemanager.databox.models; - - opens com.azure.resourcemanager.databox.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.databox.models to - com.azure.core, - com.fasterxml.jackson.databind; -}