From 27e124d3165ead9f59536ea080d7be74a99d0550 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 18 Nov 2020 05:30:07 +0000 Subject: [PATCH] CodeGen from PR 11717 in Azure/azure-rest-api-specs Merge 1069707be68c0cd7e976cb68bf44ec95b10afba8 into b47a32169e59378d8005aabb5358e3f4ddf10766 --- azure-mgmt-databox/pom.xml | 135 ++ .../management/databox/AccessProtocol.java | 53 + .../databox/AccountCredentialDetails.java | 80 + .../databox/AdditionalErrorInfo.java | 69 + .../azure/management/databox/AddressType.java | 56 + .../databox/AddressValidationOutput.java | 37 + .../databox/AddressValidationStatus.java | 56 + .../azure/management/databox/ApiError.java | 43 + .../management/databox/ApiErrorException.java | 44 + .../ApplianceNetworkConfiguration.java | 47 + .../management/databox/ArmBaseObject.java | 62 + .../databox/AvailableSkuRequest.java | 125 ++ .../databox/AzureFileFilterDetails.java | 96 + .../management/databox/BlobFilterDetails.java | 96 + .../databox/CancellationReason.java | 43 + .../management/databox/ContactDetails.java | 174 ++ .../management/databox/CopyLogDetails.java | 26 + .../management/databox/CopyProgress.java | 250 +++ .../azure/management/databox/CopyStatus.java | 80 + .../databox/CreateJobValidations.java | 20 + ...LimitForSubscriptionValidationRequest.java | 48 + ...scriptionValidationResponseProperties.java | 37 + .../databox/DataAccountDetails.java | 59 + .../management/databox/DataAccountType.java | 53 + .../databox/DataBoxAccountCopyLogDetails.java | 67 + .../databox/DataBoxDiskCopyLogDetails.java | 66 + .../databox/DataBoxDiskCopyProgress.java | 81 + .../databox/DataBoxDiskJobDetails.java | 108 + .../databox/DataBoxDiskJobSecrets.java | 67 + .../DataBoxHeavyAccountCopyLogDetails.java | 68 + .../databox/DataBoxHeavyJobDetails.java | 70 + .../databox/DataBoxHeavyJobSecrets.java | 37 + .../databox/DataBoxHeavySecret.java | 93 + .../management/databox/DataBoxJobDetails.java | 70 + .../DataBoxScheduleAvailabilityRequest.java | 20 + .../management/databox/DataBoxSecret.java | 93 + ...taDestinationDetailsValidationRequest.java | 74 + ...onDetailsValidationResponseProperties.java | 37 + .../databox/DataDestinationType.java | 53 + .../management/databox/DataExportDetails.java | 96 + .../management/databox/DataImportDetails.java | 43 + .../DataLocationToServiceLocationMap.java | 47 + .../DataTransferDetailsValidationRequest.java | 128 ++ ...erDetailsValidationResponseProperties.java | 37 + .../management/databox/DataboxJobSecrets.java | 48 + .../databox/DcAccessSecurityCode.java | 69 + .../databox/DestinationAccountDetails.java | 78 + .../DestinationManagedDiskDetails.java | 74 + .../DestinationStorageAccountDetails.java | 47 + .../DestinationToServiceLocationMap.java | 47 + .../azure/management/databox/Details.java | 69 + .../DiskScheduleAvailabilityRequest.java | 48 + .../azure/management/databox/DiskSecret.java | 48 + .../management/databox/DoubleEncryption.java | 53 + .../databox/EncryptionPreferences.java | 44 + .../azure/management/databox/Error.java | 47 + .../azure/management/databox/ErrorDetail.java | 122 ++ .../management/databox/FilterFileDetails.java | 70 + .../management/databox/FilterFileType.java | 53 + .../HeavyScheduleAvailabilityRequest.java | 20 + .../databox/IdentityProperties.java | 69 + .../management/databox/JobDeliveryInfo.java | 44 + .../management/databox/JobDeliveryType.java | 53 + .../azure/management/databox/JobDetails.java | 290 +++ .../management/databox/JobErrorDetails.java | 77 + .../azure/management/databox/JobResource.java | 253 +++ .../databox/JobResourceUpdateParameter.java | 99 + .../azure/management/databox/JobSecrets.java | 58 + .../azure/management/databox/JobStages.java | 100 + .../azure/management/databox/Jobs.java | 58 + .../azure/management/databox/KekType.java | 53 + .../management/databox/KeyEncryptionKey.java | 123 ++ .../databox/LogCollectionLevel.java | 53 + .../databox/ManagedDiskDetails.java | 74 + .../databox/NotificationPreference.java | 70 + .../databox/NotificationStageName.java | 65 + .../azure/management/databox/Operation.java | 45 + .../management/databox/OperationDisplay.java | 121 ++ .../azure/management/databox/Operations.java | 27 + .../databox/OverallValidationStatus.java | 56 + .../databox/PackageShippingDetails.java | 62 + .../azure/management/databox/Preferences.java | 96 + .../databox/PreferencesValidationRequest.java | 74 + ...eferencesValidationResponseProperties.java | 37 + .../databox/RegionConfigurationRequest.java | 69 + .../databox/RegionConfigurationResponse.java | 30 + .../management/databox/ResourceIdentity.java | 100 + .../databox/ScheduleAvailabilityRequest.java | 80 + .../databox/ScheduleAvailabilityResponse.java | 34 + .../azure/management/databox/Services.java | 82 + .../databox/ShareCredentialDetails.java | 95 + .../databox/ShareDestinationFormatType.java | 68 + .../databox/ShipmentPickUpRequest.java | 98 + .../databox/ShipmentPickUpResponse.java | 31 + .../management/databox/ShippingAddress.java | 278 +++ .../azure/management/databox/Sku.java | 96 + .../SkuAvailabilityValidationRequest.java | 129 ++ ...ilabilityValidationResponseProperties.java | 37 + .../azure/management/databox/SkuCapacity.java | 47 + .../azure/management/databox/SkuCost.java | 64 + .../management/databox/SkuDisabledReason.java | 65 + .../management/databox/SkuInformation.java | 66 + .../azure/management/databox/SkuName.java | 56 + .../azure/management/databox/StageName.java | 95 + .../azure/management/databox/StageStatus.java | 74 + .../databox/StorageAccountDetails.java | 47 + ...IsAllowedToCreateJobValidationRequest.java | 20 + ...CreateJobValidationResponseProperties.java | 37 + .../databox/TransferAllDetails.java | 96 + .../databox/TransferConfiguration.java | 98 + ...ansferConfigurationTransferAllDetails.java | 44 + ...ferConfigurationTransferFilterDetails.java | 44 + .../databox/TransferConfigurationType.java | 53 + .../databox/TransferFilterDetails.java | 123 ++ .../management/databox/TransferType.java | 53 + .../databox/TransportAvailabilityDetails.java | 33 + .../databox/TransportAvailabilityRequest.java | 44 + .../TransportAvailabilityResponse.java | 33 + .../databox/TransportPreferences.java | 44 + .../databox/TransportShipmentTypes.java | 53 + .../databox/UnencryptedCredentials.java | 30 + .../management/databox/UpdateJobDetails.java | 95 + .../databox/UserAssignedIdentity.java | 47 + .../databox/UserAssignedProperties.java | 44 + .../management/databox/ValidateAddress.java | 101 + .../databox/ValidationInputRequest.java | 29 + .../databox/ValidationInputResponse.java | 46 + .../management/databox/ValidationRequest.java | 53 + .../databox/ValidationResponse.java | 31 + .../management/databox/ValidationStatus.java | 56 + .../AddressValidationOutputImpl.java | 45 + .../AddressValidationOutputInner.java | 69 + .../DataBoxManagementClientImpl.java | 224 ++ .../implementation/DataBoxManager.java | 123 ++ .../implementation/IdParsingUtils.java | 57 + .../implementation/JobResourceImpl.java | 205 ++ .../implementation/JobResourceInner.java | 373 ++++ .../databox/implementation/JobsImpl.java | 178 ++ .../databox/implementation/JobsInner.java | 1915 +++++++++++++++++ .../databox/implementation/OperationImpl.java | 52 + .../implementation/OperationInner.java | 105 + .../implementation/OperationsImpl.java | 49 + .../implementation/OperationsInner.java | 283 +++ .../databox/implementation/PageImpl.java | 75 + .../databox/implementation/PageImpl1.java | 75 + .../RegionConfigurationResponseImpl.java | 38 + .../RegionConfigurationResponseInner.java | 49 + .../databox/implementation/ServicesImpl.java | 116 + .../databox/implementation/ServicesInner.java | 789 +++++++ .../ShipmentPickUpResponseImpl.java | 37 + .../ShipmentPickUpResponseInner.java | 49 + .../implementation/SkuInformationImpl.java | 77 + .../implementation/SkuInformationInner.java | 161 ++ .../UnencryptedCredentialsImpl.java | 37 + .../UnencryptedCredentialsInner.java | 48 + .../ValidationResponseImpl.java | 39 + .../ValidationResponseInner.java | 54 + .../databox/implementation/package-info.java | 10 + .../management/databox/package-info.java | 10 + 159 files changed, 14528 insertions(+) create mode 100644 azure-mgmt-databox/pom.xml create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccessProtocol.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccountCredentialDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AdditionalErrorInfo.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationOutput.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationStatus.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiError.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiErrorException.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApplianceNetworkConfiguration.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ArmBaseObject.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AvailableSkuRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AzureFileFilterDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/BlobFilterDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CancellationReason.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ContactDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyLogDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyProgress.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyStatus.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateJobValidations.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationResponseProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxAccountCopyLogDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyLogDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyProgress.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobSecrets.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyAccountCopyLogDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobSecrets.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavySecret.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxJobDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxScheduleAvailabilityRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxSecret.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationResponseProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataExportDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataImportDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataLocationToServiceLocationMap.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationResponseProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataboxJobSecrets.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DcAccessSecurityCode.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationAccountDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationManagedDiskDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationStorageAccountDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationToServiceLocationMap.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Details.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskScheduleAvailabilityRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskSecret.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DoubleEncryption.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/EncryptionPreferences.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Error.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ErrorDetail.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/HeavyScheduleAvailabilityRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/IdentityProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryInfo.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobErrorDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResource.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResourceUpdateParameter.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobSecrets.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobStages.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Jobs.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KekType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KeyEncryptionKey.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/LogCollectionLevel.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ManagedDiskDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationPreference.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationStageName.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operation.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OperationDisplay.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operations.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OverallValidationStatus.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PackageShippingDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Preferences.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationResponseProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationResponse.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ResourceIdentity.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityResponse.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Services.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareCredentialDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareDestinationFormatType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpResponse.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShippingAddress.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Sku.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationResponseProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCapacity.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCost.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuDisabledReason.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuInformation.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuName.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageName.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageStatus.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StorageAccountDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferAllDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfiguration.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferAllDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferFilterDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferFilterDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferType.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityResponse.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportPreferences.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportShipmentTypes.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UnencryptedCredentials.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UpdateJobDetails.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedIdentity.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedProperties.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidateAddress.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputResponse.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationRequest.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationResponse.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationStatus.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManagementClientImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManager.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/IdParsingUtils.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl1.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseImpl.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseInner.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/package-info.java create mode 100644 azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/package-info.java diff --git a/azure-mgmt-databox/pom.xml b/azure-mgmt-databox/pom.xml new file mode 100644 index 0000000000000..ba0ff2f48132b --- /dev/null +++ b/azure-mgmt-databox/pom.xml @@ -0,0 +1,135 @@ + + + 4.0.0 + com.microsoft.azure.databox + + com.microsoft.azure + azure-arm-parent + 1.1.0 + ../../../pom.management.xml + + azure-mgmt-databox + 1.0.0-beta + jar + Microsoft Azure SDK for DataBox Management + This package contains Microsoft DataBox Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + 1.6.5 + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccessProtocol.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccessProtocol.java new file mode 100644 index 0000000000000..f77615db8131a --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccessProtocol.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AccessProtocol. + */ +public enum AccessProtocol { + /** Server Message Block protocol(SMB). */ + SMB("SMB"), + + /** Network File System protocol(NFS). */ + NFS("NFS"); + + /** The actual serialized value for a AccessProtocol instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccountCredentialDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccountCredentialDetails.java new file mode 100644 index 0000000000000..979c26584fb26 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AccountCredentialDetails.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Credential details of the account. + */ +public class AccountCredentialDetails { + /** + * Name of the account. + */ + @JsonProperty(value = "accountName", access = JsonProperty.Access.WRITE_ONLY) + private String accountName; + + /** + * Type of the account. Possible values include: 'StorageAccount', + * 'ManagedDisk'. + */ + @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 name of the account. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Get type of the account. Possible values include: 'StorageAccount', 'ManagedDisk'. + * + * @return the dataAccountType value + */ + public DataAccountType dataAccountType() { + return this.dataAccountType; + } + + /** + * Get 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 per share level unencrypted access credentials. + * + * @return the shareCredentialDetails value + */ + public List shareCredentialDetails() { + return this.shareCredentialDetails; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AdditionalErrorInfo.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AdditionalErrorInfo.java new file mode 100644 index 0000000000000..777b5c94a5dcb --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AdditionalErrorInfo.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Additional error info. + */ +public class AdditionalErrorInfo { + /** + * Additional error type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Additional error info. + */ + @JsonProperty(value = "info") + private Object info; + + /** + * Get additional error type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set 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 additional error info. + * + * @return the info value + */ + public Object info() { + return this.info; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressType.java new file mode 100644 index 0000000000000..376ea1a8e452b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AddressType. + */ +public enum AddressType { + /** Address type not known. */ + NONE("None"), + + /** Residential Address. */ + RESIDENTIAL("Residential"), + + /** Commercial Address. */ + COMMERCIAL("Commercial"); + + /** The actual serialized value for a AddressType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationOutput.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationOutput.java new file mode 100644 index 0000000000000..d5e04f450d91b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationOutput.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import com.microsoft.azure.management.databox.implementation.AddressValidationOutputInner; +import java.util.List; +import com.microsoft.rest.CloudError; + +/** + * Type representing AddressValidationOutput. + */ +public interface AddressValidationOutput extends HasInner, HasManager { + /** + * @return the alternateAddresses value. + */ + List alternateAddresses(); + + /** + * @return the error value. + */ + CloudError error(); + + /** + * @return the validationStatus value. + */ + AddressValidationStatus validationStatus(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationStatus.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationStatus.java new file mode 100644 index 0000000000000..2a7626d9af346 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AddressValidationStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AddressValidationStatus. + */ +public enum AddressValidationStatus { + /** Address provided is valid. */ + VALID("Valid"), + + /** Address provided is invalid or not supported. */ + INVALID("Invalid"), + + /** Address provided is ambiguous, please choose one of the alternate addresses returned. */ + AMBIGUOUS("Ambiguous"); + + /** The actual serialized value for a AddressValidationStatus instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiError.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiError.java new file mode 100644 index 0000000000000..fc792585ad5a4 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiError.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ApiError model. + */ +public class ApiError { + /** + * The error property. + */ + @JsonProperty(value = "error", required = true) + private ErrorDetail error; + + /** + * Get the error value. + * + * @return the error value + */ + public ErrorDetail error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the ApiError object itself. + */ + public ApiError withError(ErrorDetail error) { + this.error = error; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiErrorException.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiErrorException.java new file mode 100644 index 0000000000000..aaeb5b2ea17f3 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApiErrorException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ApiError information. + */ +public class ApiErrorException extends RestException { + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ApiErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ApiErrorException(final String message, final Response response, final ApiError body) { + super(message, response, body); + } + + @Override + public ApiError body() { + return (ApiError) super.body(); + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApplianceNetworkConfiguration.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApplianceNetworkConfiguration.java new file mode 100644 index 0000000000000..987e5d2b50376 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ApplianceNetworkConfiguration.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Network Adapter configuration of a DataBox. + */ +public class ApplianceNetworkConfiguration { + /** + * 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 name of the network. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get mac Address. + * + * @return the macAddress value + */ + public String macAddress() { + return this.macAddress; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ArmBaseObject.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ArmBaseObject.java new file mode 100644 index 0000000000000..840c811505618 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ArmBaseObject.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Base class for all objects under resource. + */ +public class ArmBaseObject { + /** + * 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; + + /** + * Get name of the object. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get id of the object. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get type of the object. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AvailableSkuRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AvailableSkuRequest.java new file mode 100644 index 0000000000000..4682449f8da00 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AvailableSkuRequest.java @@ -0,0 +1,125 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The filters for showing the available skus. + */ +public class AvailableSkuRequest { + /** + * Type of the transfer. Possible values include: 'ImportToAzure', + * 'ExportFromAzure'. + */ + @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 type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @return the transferType value + */ + public TransferType transferType() { + return this.transferType; + } + + /** + * Set type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @param transferType the transferType value to set + * @return the AvailableSkuRequest object itself. + */ + public AvailableSkuRequest withTransferType(TransferType transferType) { + this.transferType = transferType; + return this; + } + + /** + * Get 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 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 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 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 sku Names to filter for available skus. + * + * @return the skuNames value + */ + public List skuNames() { + return this.skuNames; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AzureFileFilterDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AzureFileFilterDetails.java new file mode 100644 index 0000000000000..4655c3f33b15d --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/AzureFileFilterDetails.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Filter details to transfer Azure files. + */ +public class AzureFileFilterDetails { + /** + * 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 prefix list of the Azure files to be transferred. + * + * @return the filePrefixList value + */ + public List filePrefixList() { + return this.filePrefixList; + } + + /** + * Set 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 list of full path of the files to be transferred. + * + * @return the filePathList value + */ + public List filePathList() { + return this.filePathList; + } + + /** + * Set 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 list of file shares to be transferred. + * + * @return the fileShareList value + */ + public List fileShareList() { + return this.fileShareList; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/BlobFilterDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/BlobFilterDetails.java new file mode 100644 index 0000000000000..e9a2e2f66c030 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/BlobFilterDetails.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Filter details to transfer Azure Blobs. + */ +public class BlobFilterDetails { + /** + * 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 prefix list of the Azure blobs to be transferred. + * + * @return the blobPrefixList value + */ + public List blobPrefixList() { + return this.blobPrefixList; + } + + /** + * Set 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 list of full path of the blobs to be transferred. + * + * @return the blobPathList value + */ + public List blobPathList() { + return this.blobPathList; + } + + /** + * Set 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 list of blob containers to be transferred. + * + * @return the containerList value + */ + public List containerList() { + return this.containerList; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CancellationReason.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CancellationReason.java new file mode 100644 index 0000000000000..669939d3c6d69 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CancellationReason.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Reason for cancellation. + */ +public class CancellationReason { + /** + * Reason for cancellation. + */ + @JsonProperty(value = "reason", required = true) + private String reason; + + /** + * Get reason for cancellation. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ContactDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ContactDetails.java new file mode 100644 index 0000000000000..158a355ee14ff --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ContactDetails.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contact Details. + */ +public class ContactDetails { + /** + * 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 contact name of the person. + * + * @return the contactName value + */ + public String contactName() { + return this.contactName; + } + + /** + * Set 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 phone number of the contact person. + * + * @return the phone value + */ + public String phone() { + return this.phone; + } + + /** + * Set 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 phone extension number of the contact person. + * + * @return the phoneExtension value + */ + public String phoneExtension() { + return this.phoneExtension; + } + + /** + * Set 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 mobile number of the contact person. + * + * @return the mobile value + */ + public String mobile() { + return this.mobile; + } + + /** + * Set 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 list of Email-ids to be notified about job progress. + * + * @return the emailList value + */ + public List emailList() { + return this.emailList; + } + + /** + * Set 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 notification preference for a job stage. + * + * @return the notificationPreference value + */ + public List notificationPreference() { + return this.notificationPreference; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyLogDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyLogDetails.java new file mode 100644 index 0000000000000..dfa3b9ab0c94f --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyLogDetails.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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) +}) +public class CopyLogDetails { +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyProgress.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyProgress.java new file mode 100644 index 0000000000000..f625a497f8785 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyProgress.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Copy progress. + */ +public class CopyProgress { + /** + * 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. Possible values include: 'ImportToAzure', + * 'ExportFromAzure'. + */ + @JsonProperty(value = "transferType", access = JsonProperty.Access.WRITE_ONLY) + private TransferType transferType; + + /** + * Data Account Type. Possible values include: 'StorageAccount', + * 'ManagedDisk'. + */ + @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 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 transfer type of data. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @return the transferType value + */ + public TransferType transferType() { + return this.transferType; + } + + /** + * Get data Account Type. Possible values include: 'StorageAccount', 'ManagedDisk'. + * + * @return the dataAccountType value + */ + public DataAccountType dataAccountType() { + return this.dataAccountType; + } + + /** + * Get id of the account where the data needs to be uploaded. + * + * @return the accountId value + */ + public String accountId() { + return this.accountId; + } + + /** + * Get to indicate bytes transferred. + * + * @return the bytesProcessed value + */ + public Long bytesProcessed() { + return this.bytesProcessed; + } + + /** + * Get total amount of data to be processed by the job. + * + * @return the totalBytesToProcess value + */ + public Long totalBytesToProcess() { + return this.totalBytesToProcess; + } + + /** + * Get number of files processed. + * + * @return the filesProcessed value + */ + public Long filesProcessed() { + return this.filesProcessed; + } + + /** + * Get total files to process. + * + * @return the totalFilesToProcess value + */ + public Long totalFilesToProcess() { + return this.totalFilesToProcess; + } + + /** + * Get 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 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 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 number of files which could not be copied. + * + * @return the filesErroredOut value + */ + public Long filesErroredOut() { + return this.filesErroredOut; + } + + /** + * Get to indicate directories errored out in the job. + * + * @return the directoriesErroredOut value + */ + public Long directoriesErroredOut() { + return this.directoriesErroredOut; + } + + /** + * Get to indicate directories renamed. + * + * @return the invalidDirectoriesProcessed value + */ + public Long invalidDirectoriesProcessed() { + return this.invalidDirectoriesProcessed; + } + + /** + * Get 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyStatus.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyStatus.java new file mode 100644 index 0000000000000..61f9cf4ed606b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CopyStatus.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CopyStatus. + */ +public enum CopyStatus { + /** Data copy hasn't started yet. */ + NOT_STARTED("NotStarted"), + + /** Data copy is in progress. */ + IN_PROGRESS("InProgress"), + + /** Data copy completed. */ + COMPLETED("Completed"), + + /** Data copy completed with errors. */ + COMPLETED_WITH_ERRORS("CompletedWithErrors"), + + /** Data copy failed. No data was copied. */ + FAILED("Failed"), + + /** No copy triggered as device was not returned. */ + NOT_RETURNED("NotReturned"), + + /** The Device has hit hardware issues. */ + HARDWARE_ERROR("HardwareError"), + + /** Data copy failed. The Device was formatted by user. */ + DEVICE_FORMATTED("DeviceFormatted"), + + /** Data copy failed. Device metadata was modified by user. */ + DEVICE_METADATA_MODIFIED("DeviceMetadataModified"), + + /** Data copy failed. Storage Account was not accessible during copy. */ + STORAGE_ACCOUNT_NOT_ACCESSIBLE("StorageAccountNotAccessible"), + + /** Data copy failed. The Device data content is not supported. */ + UNSUPPORTED_DATA("UnsupportedData"); + + /** The actual serialized value for a CopyStatus instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateJobValidations.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateJobValidations.java new file mode 100644 index 0000000000000..9774e315ef815 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateJobValidations.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * It does all pre-job creation validations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationCategory", defaultImpl = CreateJobValidations.class) +@JsonTypeName("JobCreationValidation") +public class CreateJobValidations extends ValidationRequest { +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationRequest.java new file mode 100644 index 0000000000000..9879965816480 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationRequest.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = CreateOrderLimitForSubscriptionValidationRequest.class) +@JsonTypeName("ValidateCreateOrderLimit") +public class CreateOrderLimitForSubscriptionValidationRequest extends ValidationInputRequest { + /** + * Device type to be used for the job. Possible values include: 'DataBox', + * 'DataBoxDisk', 'DataBoxHeavy'. + */ + @JsonProperty(value = "deviceType", required = true) + private SkuName deviceType; + + /** + * Get device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @return the deviceType value + */ + public SkuName deviceType() { + return this.deviceType; + } + + /** + * Set device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @param deviceType the deviceType value to set + * @return the CreateOrderLimitForSubscriptionValidationRequest object itself. + */ + public CreateOrderLimitForSubscriptionValidationRequest withDeviceType(SkuName deviceType) { + this.deviceType = deviceType; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationResponseProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationResponseProperties.java new file mode 100644 index 0000000000000..c5f2c2a5bd383 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/CreateOrderLimitForSubscriptionValidationResponseProperties.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = CreateOrderLimitForSubscriptionValidationResponseProperties.class) +@JsonTypeName("ValidateCreateOrderLimit") +public class CreateOrderLimitForSubscriptionValidationResponseProperties extends ValidationInputResponse { + /** + * Create order limit validation status. Possible values include: 'Valid', + * 'Invalid', 'Skipped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get create order limit validation status. Possible values include: 'Valid', 'Invalid', 'Skipped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountDetails.java new file mode 100644 index 0000000000000..ddc3a69ffa122 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountDetails.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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) +}) +public class DataAccountDetails { + /** + * 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 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountType.java new file mode 100644 index 0000000000000..68476c3c84cef --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataAccountType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataAccountType. + */ +public enum DataAccountType { + /** Storage Accounts . */ + STORAGE_ACCOUNT("StorageAccount"), + + /** Azure Managed disk storage. */ + MANAGED_DISK("ManagedDisk"); + + /** The actual serialized value for a DataAccountType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxAccountCopyLogDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxAccountCopyLogDetails.java new file mode 100644 index 0000000000000..af171534d8d33 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxAccountCopyLogDetails.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = DataBoxAccountCopyLogDetails.class) +@JsonTypeName("DataBox") +public class DataBoxAccountCopyLogDetails extends CopyLogDetails { + /** + * 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 account name. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Get link for copy logs. + * + * @return the copyLogLink value + */ + public String copyLogLink() { + return this.copyLogLink; + } + + /** + * Get 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyLogDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyLogDetails.java new file mode 100644 index 0000000000000..145a22245eedb --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyLogDetails.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = DataBoxDiskCopyLogDetails.class) +@JsonTypeName("DataBoxDisk") +public class DataBoxDiskCopyLogDetails extends CopyLogDetails { + /** + * 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 disk Serial Number. + * + * @return the diskSerialNumber value + */ + public String diskSerialNumber() { + return this.diskSerialNumber; + } + + /** + * Get link for copy error logs. + * + * @return the errorLogLink value + */ + public String errorLogLink() { + return this.errorLogLink; + } + + /** + * Get link for copy verbose logs. + * + * @return the verboseLogLink value + */ + public String verboseLogLink() { + return this.verboseLogLink; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyProgress.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyProgress.java new file mode 100644 index 0000000000000..e83d58e9349b7 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskCopyProgress.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DataBox Disk Copy Progress. + */ +public class DataBoxDiskCopyProgress { + /** + * 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. Possible values include: 'NotStarted', + * 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', + * 'NotReturned', 'HardwareError', 'DeviceFormatted', + * 'DeviceMetadataModified', 'StorageAccountNotAccessible', + * 'UnsupportedData'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private CopyStatus status; + + /** + * Get the serial number of the disk. + * + * @return the serialNumber value + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get bytes copied during the copy of disk. + * + * @return the bytesCopied value + */ + public Long bytesCopied() { + return this.bytesCopied; + } + + /** + * Get indicates the percentage completed for the copy of the disk. + * + * @return the percentComplete value + */ + public Integer percentComplete() { + return this.percentComplete; + } + + /** + * Get the Status of the copy. Possible values include: 'NotStarted', 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', 'NotReturned', 'HardwareError', 'DeviceFormatted', 'DeviceMetadataModified', 'StorageAccountNotAccessible', 'UnsupportedData'. + * + * @return the status value + */ + public CopyStatus status() { + return this.status; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobDetails.java new file mode 100644 index 0000000000000..d3ef520c52942 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobDetails.java @@ -0,0 +1,108 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DataBox Disk Job Details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobDetailsType", defaultImpl = DataBoxDiskJobDetails.class) +@JsonTypeName("DataBoxDisk") +public class DataBoxDiskJobDetails extends JobDetails { + /** + * 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 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 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 copy progress per disk. + * + * @return the copyProgress value + */ + public List copyProgress() { + return this.copyProgress; + } + + /** + * Get 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 user entered passkey for DataBox Disk job. + * + * @return the passkey value + */ + public String passkey() { + return this.passkey; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobSecrets.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobSecrets.java new file mode 100644 index 0000000000000..f63df7ed91226 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxDiskJobSecrets.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The secrets related to disk job. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobSecretsType", defaultImpl = DataBoxDiskJobSecrets.class) +@JsonTypeName("DataBoxDisk") +public class DataBoxDiskJobSecrets extends JobSecrets { + /** + * 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 contains the list of secrets object for that device. + * + * @return the diskSecrets value + */ + public List diskSecrets() { + return this.diskSecrets; + } + + /** + * Get passKey for the disk Job. + * + * @return the passKey value + */ + public String passKey() { + return this.passKey; + } + + /** + * Get whether passkey was provided by user. + * + * @return the isPasskeyUserDefined value + */ + public Boolean isPasskeyUserDefined() { + return this.isPasskeyUserDefined; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyAccountCopyLogDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyAccountCopyLogDetails.java new file mode 100644 index 0000000000000..3bf0ffeb7965a --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyAccountCopyLogDetails.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +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 for Databox heavy. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "copyLogDetailsType", defaultImpl = DataBoxHeavyAccountCopyLogDetails.class) +@JsonTypeName("DataBoxHeavy") +public class DataBoxHeavyAccountCopyLogDetails extends CopyLogDetails { + /** + * 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 account name. + * + * @return the accountName value + */ + public String accountName() { + return this.accountName; + } + + /** + * Get link for copy logs. + * + * @return the copyLogLink value + */ + public List copyLogLink() { + return this.copyLogLink; + } + + /** + * Get 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobDetails.java new file mode 100644 index 0000000000000..e3aa2882bdce5 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobDetails.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Databox Heavy Device Job Details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobDetailsType", defaultImpl = DataBoxHeavyJobDetails.class) +@JsonTypeName("DataBoxHeavy") +public class DataBoxHeavyJobDetails extends JobDetails { + /** + * 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 copy progress per account. + * + * @return the copyProgress value + */ + public List copyProgress() { + return this.copyProgress; + } + + /** + * Get 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobSecrets.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobSecrets.java new file mode 100644 index 0000000000000..f59a6f32f8bdd --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavyJobSecrets.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The secrets related to a databox heavy job. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobSecretsType", defaultImpl = DataBoxHeavyJobSecrets.class) +@JsonTypeName("DataBoxHeavy") +public class DataBoxHeavyJobSecrets extends JobSecrets { + /** + * Contains the list of secret objects for a databox heavy job. + */ + @JsonProperty(value = "cabinetPodSecrets", access = JsonProperty.Access.WRITE_ONLY) + private List cabinetPodSecrets; + + /** + * Get contains the list of secret objects for a databox heavy job. + * + * @return the cabinetPodSecrets value + */ + public List cabinetPodSecrets() { + return this.cabinetPodSecrets; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavySecret.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavySecret.java new file mode 100644 index 0000000000000..b741ca00545c1 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxHeavySecret.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The secrets related to a databox heavy. + */ +public class DataBoxHeavySecret { + /** + * 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 serial number of the assigned device. + * + * @return the deviceSerialNumber value + */ + public String deviceSerialNumber() { + return this.deviceSerialNumber; + } + + /** + * Get password for out of the box experience on device. + * + * @return the devicePassword value + */ + public String devicePassword() { + return this.devicePassword; + } + + /** + * Get network configuration of the appliance. + * + * @return the networkConfigurations value + */ + public List networkConfigurations() { + return this.networkConfigurations; + } + + /** + * Get the base 64 encoded public key to authenticate with the device. + * + * @return the encodedValidationCertPubKey value + */ + public String encodedValidationCertPubKey() { + return this.encodedValidationCertPubKey; + } + + /** + * Get per account level access credentials. + * + * @return the accountCredentialDetails value + */ + public List accountCredentialDetails() { + return this.accountCredentialDetails; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxJobDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxJobDetails.java new file mode 100644 index 0000000000000..c94cf22d0a5fd --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxJobDetails.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Databox Job Details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobDetailsType", defaultImpl = DataBoxJobDetails.class) +@JsonTypeName("DataBox") +public class DataBoxJobDetails extends JobDetails { + /** + * 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 copy progress per storage account. + * + * @return the copyProgress value + */ + public List copyProgress() { + return this.copyProgress; + } + + /** + * Get 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxScheduleAvailabilityRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxScheduleAvailabilityRequest.java new file mode 100644 index 0000000000000..979497518c770 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxScheduleAvailabilityRequest.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = DataBoxScheduleAvailabilityRequest.class) +@JsonTypeName("DataBox") +public class DataBoxScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxSecret.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxSecret.java new file mode 100644 index 0000000000000..79f35f6db83a9 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataBoxSecret.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The secrets related to a DataBox. + */ +public class DataBoxSecret { + /** + * 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 serial number of the assigned device. + * + * @return the deviceSerialNumber value + */ + public String deviceSerialNumber() { + return this.deviceSerialNumber; + } + + /** + * Get password for out of the box experience on device. + * + * @return the devicePassword value + */ + public String devicePassword() { + return this.devicePassword; + } + + /** + * Get network configuration of the appliance. + * + * @return the networkConfigurations value + */ + public List networkConfigurations() { + return this.networkConfigurations; + } + + /** + * Get the base 64 encoded public key to authenticate with the device. + * + * @return the encodedValidationCertPubKey value + */ + public String encodedValidationCertPubKey() { + return this.encodedValidationCertPubKey; + } + + /** + * Get per account level access credentials. + * + * @return the accountCredentialDetails value + */ + public List accountCredentialDetails() { + return this.accountCredentialDetails; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationRequest.java new file mode 100644 index 0000000000000..99a1c03f4c1de --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationRequest.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Request to validate data destination details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType", defaultImpl = DataDestinationDetailsValidationRequest.class) +@JsonTypeName("ValidateDataDestinationDetails") +public class DataDestinationDetailsValidationRequest extends ValidationInputRequest { + /** + * Destination account details list. + */ + @JsonProperty(value = "destinationAccountDetails", required = true) + private List destinationAccountDetails; + + /** + * Location of stamp or geo. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * Get destination account details list. + * + * @return the destinationAccountDetails value + */ + public List destinationAccountDetails() { + return this.destinationAccountDetails; + } + + /** + * Set destination account details list. + * + * @param destinationAccountDetails the destinationAccountDetails value to set + * @return the DataDestinationDetailsValidationRequest object itself. + */ + public DataDestinationDetailsValidationRequest withDestinationAccountDetails(List destinationAccountDetails) { + this.destinationAccountDetails = destinationAccountDetails; + return this; + } + + /** + * Get location of stamp or geo. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set location of stamp or geo. + * + * @param location the location value to set + * @return the DataDestinationDetailsValidationRequest object itself. + */ + public DataDestinationDetailsValidationRequest withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationResponseProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationResponseProperties.java new file mode 100644 index 0000000000000..4b7ab2628f9fd --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationDetailsValidationResponseProperties.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of data destination details validation response. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType", defaultImpl = DataDestinationDetailsValidationResponseProperties.class) +@JsonTypeName("ValidateDataDestinationDetails") +public class DataDestinationDetailsValidationResponseProperties extends ValidationInputResponse { + /** + * Data destination details validation status. Possible values include: + * 'Valid', 'Invalid', 'Skipped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get data destination details validation status. Possible values include: 'Valid', 'Invalid', 'Skipped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationType.java new file mode 100644 index 0000000000000..64294592b450d --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataDestinationType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataDestinationType. + */ +public enum DataDestinationType { + /** Storage Accounts . */ + STORAGE_ACCOUNT("StorageAccount"), + + /** Azure Managed disk storage. */ + MANAGED_DISK("ManagedDisk"); + + /** The actual serialized value for a DataDestinationType instance. */ + private String value; + + DataDestinationType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataDestinationType instance. + * + * @param value the serialized value to parse. + * @return the parsed DataDestinationType object, or null if unable to parse. + */ + @JsonCreator + public static DataDestinationType fromString(String value) { + DataDestinationType[] items = DataDestinationType.values(); + for (DataDestinationType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataExportDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataExportDetails.java new file mode 100644 index 0000000000000..64945c426907f --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataExportDetails.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of the data to be used for exporting data from azure. + */ +public class DataExportDetails { + /** + * Configuration for the data transfer. + */ + @JsonProperty(value = "transferConfiguration", required = true) + private TransferConfiguration transferConfiguration; + + /** + * Level of the logs to be collected. Possible values include: 'Error', + * 'Verbose'. + */ + @JsonProperty(value = "logCollectionLevel") + private LogCollectionLevel logCollectionLevel; + + /** + * Account details of the data to be transferred. + */ + @JsonProperty(value = "accountDetails", required = true) + private DataAccountDetails accountDetails; + + /** + * Get configuration for the data transfer. + * + * @return the transferConfiguration value + */ + public TransferConfiguration transferConfiguration() { + return this.transferConfiguration; + } + + /** + * Set 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 level of the logs to be collected. Possible values include: 'Error', 'Verbose'. + * + * @return the logCollectionLevel value + */ + public LogCollectionLevel logCollectionLevel() { + return this.logCollectionLevel; + } + + /** + * Set level of the logs to be collected. Possible values include: 'Error', 'Verbose'. + * + * @param logCollectionLevel the logCollectionLevel value to set + * @return the DataExportDetails object itself. + */ + public DataExportDetails withLogCollectionLevel(LogCollectionLevel logCollectionLevel) { + this.logCollectionLevel = logCollectionLevel; + return this; + } + + /** + * Get account details of the data to be transferred. + * + * @return the accountDetails value + */ + public DataAccountDetails accountDetails() { + return this.accountDetails; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataImportDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataImportDetails.java new file mode 100644 index 0000000000000..a348605e5bff5 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataImportDetails.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of the data to be used for importing data to azure. + */ +public class DataImportDetails { + /** + * Account details of the data to be transferred. + */ + @JsonProperty(value = "accountDetails", required = true) + private DataAccountDetails accountDetails; + + /** + * Get account details of the data to be transferred. + * + * @return the accountDetails value + */ + public DataAccountDetails accountDetails() { + return this.accountDetails; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataLocationToServiceLocationMap.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataLocationToServiceLocationMap.java new file mode 100644 index 0000000000000..7232d6a82c28a --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataLocationToServiceLocationMap.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Map of data location to service location. + */ +public class DataLocationToServiceLocationMap { + /** + * 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 location of the data. + * + * @return the dataLocation value + */ + public String dataLocation() { + return this.dataLocation; + } + + /** + * Get location of the service. + * + * @return the serviceLocation value + */ + public String serviceLocation() { + return this.serviceLocation; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationRequest.java new file mode 100644 index 0000000000000..09975dd5ae9ea --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationRequest.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Request to validate export and import data details. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "validationType", defaultImpl = DataTransferDetailsValidationRequest.class) +@JsonTypeName("ValidateDataTransferDetails") +public class DataTransferDetailsValidationRequest extends ValidationInputRequest { + /** + * 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. Possible values include: 'DataBox', 'DataBoxDisk', + * 'DataBoxHeavy'. + */ + @JsonProperty(value = "deviceType", required = true) + private SkuName deviceType; + + /** + * Type of the transfer. Possible values include: 'ImportToAzure', + * 'ExportFromAzure'. + */ + @JsonProperty(value = "transferType", required = true) + private TransferType transferType; + + /** + * Get list of DataTransfer details to be used to export data from azure. + * + * @return the dataExportDetails value + */ + public List dataExportDetails() { + return this.dataExportDetails; + } + + /** + * Set 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 list of DataTransfer details to be used to import data to azure. + * + * @return the dataImportDetails value + */ + public List dataImportDetails() { + return this.dataImportDetails; + } + + /** + * Set 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 device type. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @return the deviceType value + */ + public SkuName deviceType() { + return this.deviceType; + } + + /** + * Set device type. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @param deviceType the deviceType value to set + * @return the DataTransferDetailsValidationRequest object itself. + */ + public DataTransferDetailsValidationRequest withDeviceType(SkuName deviceType) { + this.deviceType = deviceType; + return this; + } + + /** + * Get type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @return the transferType value + */ + public TransferType transferType() { + return this.transferType; + } + + /** + * Set type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @param transferType the transferType value to set + * @return the DataTransferDetailsValidationRequest object itself. + */ + public DataTransferDetailsValidationRequest withTransferType(TransferType transferType) { + this.transferType = transferType; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationResponseProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationResponseProperties.java new file mode 100644 index 0000000000000..f42b90566a224 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataTransferDetailsValidationResponseProperties.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = DataTransferDetailsValidationResponseProperties.class) +@JsonTypeName("ValidateDataTransferDetails") +public class DataTransferDetailsValidationResponseProperties extends ValidationInputResponse { + /** + * Data transfer details validation status. Possible values include: + * 'Valid', 'Invalid', 'Skipped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get data transfer details validation status. Possible values include: 'Valid', 'Invalid', 'Skipped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataboxJobSecrets.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataboxJobSecrets.java new file mode 100644 index 0000000000000..9f47136e4e5bb --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DataboxJobSecrets.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The secrets related to a databox job. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobSecretsType", defaultImpl = DataboxJobSecrets.class) +@JsonTypeName("DataBox") +public class DataboxJobSecrets extends JobSecrets { + /** + * Contains the list of secret objects for a job. + */ + @JsonProperty(value = "podSecrets") + private List podSecrets; + + /** + * Get contains the list of secret objects for a job. + * + * @return the podSecrets value + */ + public List podSecrets() { + return this.podSecrets; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DcAccessSecurityCode.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DcAccessSecurityCode.java new file mode 100644 index 0000000000000..94df9a56aea96 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DcAccessSecurityCode.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dc access security code. + */ +public class DcAccessSecurityCode { + /** + * Reverse Dc access security code. + */ + @JsonProperty(value = "reverseDcAccessCode") + private String reverseDcAccessCode; + + /** + * Forward Dc access security code. + */ + @JsonProperty(value = "forwardDcAccessCode") + private String forwardDcAccessCode; + + /** + * Get reverse Dc access security code. + * + * @return the reverseDcAccessCode value + */ + public String reverseDcAccessCode() { + return this.reverseDcAccessCode; + } + + /** + * Set 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 forward Dc access security code. + * + * @return the forwardDcAccessCode value + */ + public String forwardDcAccessCode() { + return this.forwardDcAccessCode; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationAccountDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationAccountDetails.java new file mode 100644 index 0000000000000..69551b87b41d7 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationAccountDetails.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * Details of the destination storage accounts. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataDestinationType", defaultImpl = DestinationAccountDetails.class) +@JsonTypeName("DestinationAccountDetails") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "ManagedDisk", value = DestinationManagedDiskDetails.class), + @JsonSubTypes.Type(name = "StorageAccount", value = DestinationStorageAccountDetails.class) +}) +public class DestinationAccountDetails { + /** + * Arm Id of the destination where the data has to be moved. + */ + @JsonProperty(value = "accountId") + private String accountId; + + /** + * Share password to be shared by all shares in SA. + */ + @JsonProperty(value = "sharePassword") + private String sharePassword; + + /** + * Get arm Id of the destination where the data has to be moved. + * + * @return the accountId value + */ + public String accountId() { + return this.accountId; + } + + /** + * Set arm Id of the destination where the data has to be moved. + * + * @param accountId the accountId value to set + * @return the DestinationAccountDetails object itself. + */ + public DestinationAccountDetails withAccountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get share password to be shared by all shares in SA. + * + * @return the sharePassword value + */ + public String sharePassword() { + return this.sharePassword; + } + + /** + * Set share password to be shared by all shares in SA. + * + * @param sharePassword the sharePassword value to set + * @return the DestinationAccountDetails object itself. + */ + public DestinationAccountDetails withSharePassword(String sharePassword) { + this.sharePassword = sharePassword; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationManagedDiskDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationManagedDiskDetails.java new file mode 100644 index 0000000000000..225a40b876afb --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationManagedDiskDetails.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Details for the destination compute disks. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataDestinationType", defaultImpl = DestinationManagedDiskDetails.class) +@JsonTypeName("ManagedDisk") +public class DestinationManagedDiskDetails extends DestinationAccountDetails { + /** + * Destination Resource Group Id where the Compute disks should be created. + */ + @JsonProperty(value = "resourceGroupId", required = true) + private String resourceGroupId; + + /** + * Arm Id of the storage account that can be used to copy the vhd for + * staging. + */ + @JsonProperty(value = "stagingStorageAccountId", required = true) + private String stagingStorageAccountId; + + /** + * Get destination Resource Group Id where the Compute disks should be created. + * + * @return the resourceGroupId value + */ + public String resourceGroupId() { + return this.resourceGroupId; + } + + /** + * Set destination Resource Group Id where the Compute disks should be created. + * + * @param resourceGroupId the resourceGroupId value to set + * @return the DestinationManagedDiskDetails object itself. + */ + public DestinationManagedDiskDetails withResourceGroupId(String resourceGroupId) { + this.resourceGroupId = resourceGroupId; + return this; + } + + /** + * Get arm 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 arm Id of the storage account that can be used to copy the vhd for staging. + * + * @param stagingStorageAccountId the stagingStorageAccountId value to set + * @return the DestinationManagedDiskDetails object itself. + */ + public DestinationManagedDiskDetails withStagingStorageAccountId(String stagingStorageAccountId) { + this.stagingStorageAccountId = stagingStorageAccountId; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationStorageAccountDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationStorageAccountDetails.java new file mode 100644 index 0000000000000..e273e5a255e7b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationStorageAccountDetails.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Details for the destination storage account. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataDestinationType", defaultImpl = DestinationStorageAccountDetails.class) +@JsonTypeName("StorageAccount") +public class DestinationStorageAccountDetails extends DestinationAccountDetails { + /** + * Destination Storage Account Arm Id. + */ + @JsonProperty(value = "storageAccountId", required = true) + private String storageAccountId; + + /** + * Get destination Storage Account Arm Id. + * + * @return the storageAccountId value + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set destination Storage Account Arm Id. + * + * @param storageAccountId the storageAccountId value to set + * @return the DestinationStorageAccountDetails object itself. + */ + public DestinationStorageAccountDetails withStorageAccountId(String storageAccountId) { + this.storageAccountId = storageAccountId; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationToServiceLocationMap.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationToServiceLocationMap.java new file mode 100644 index 0000000000000..54020d2f0b31a --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DestinationToServiceLocationMap.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Map of destination location to service location. + */ +public class DestinationToServiceLocationMap { + /** + * Location of the destination. + */ + @JsonProperty(value = "destinationLocation", access = JsonProperty.Access.WRITE_ONLY) + private String destinationLocation; + + /** + * Location of the service. + */ + @JsonProperty(value = "serviceLocation", access = JsonProperty.Access.WRITE_ONLY) + private String serviceLocation; + + /** + * Get location of the destination. + * + * @return the destinationLocation value + */ + public String destinationLocation() { + return this.destinationLocation; + } + + /** + * Get location of the service. + * + * @return the serviceLocation value + */ + public String serviceLocation() { + return this.serviceLocation; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Details.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Details.java new file mode 100644 index 0000000000000..53b654f8249ca --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Details.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Details model. + */ +public class Details { + /** + * The code property. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * The message property. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the Details object itself. + */ + public Details withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the Details object itself. + */ + public Details withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskScheduleAvailabilityRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskScheduleAvailabilityRequest.java new file mode 100644 index 0000000000000..8986678b21c7e --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskScheduleAvailabilityRequest.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = DiskScheduleAvailabilityRequest.class) +@JsonTypeName("DataBoxDisk") +public class DiskScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { + /** + * 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 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskSecret.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskSecret.java new file mode 100644 index 0000000000000..d9592abd9c702 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DiskSecret.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains all the secrets of a Disk. + */ +public class DiskSecret { + /** + * 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 serial number of the assigned disk. + * + * @return the diskSerialNumber value + */ + public String diskSerialNumber() { + return this.diskSerialNumber; + } + + /** + * Get 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DoubleEncryption.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DoubleEncryption.java new file mode 100644 index 0000000000000..08741a10764c3 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/DoubleEncryption.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DoubleEncryption. + */ +public enum DoubleEncryption { + /** Software-based encryption is enabled. */ + ENABLED("Enabled"), + + /** Software-based encryption is disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a DoubleEncryption instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/EncryptionPreferences.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/EncryptionPreferences.java new file mode 100644 index 0000000000000..fc8c659be7655 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/EncryptionPreferences.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Preferences related to the Encryption. + */ +public class EncryptionPreferences { + /** + * Defines secondary layer of software-based encryption enablement. + * Possible values include: 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "doubleEncryption") + private DoubleEncryption doubleEncryption; + + /** + * Get defines secondary layer of software-based encryption enablement. Possible values include: 'Enabled', 'Disabled'. + * + * @return the doubleEncryption value + */ + public DoubleEncryption doubleEncryption() { + return this.doubleEncryption; + } + + /** + * Set defines secondary layer of software-based encryption enablement. Possible values include: 'Enabled', 'Disabled'. + * + * @param doubleEncryption the doubleEncryption value to set + * @return the EncryptionPreferences object itself. + */ + public EncryptionPreferences withDoubleEncryption(DoubleEncryption doubleEncryption) { + this.doubleEncryption = doubleEncryption; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Error.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Error.java new file mode 100644 index 0000000000000..0009fe9ef7afd --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Error.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Top level error for the job. + */ +public class Error { + /** + * Error code that can be used to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * Describes the error in detail and provides debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get error code that can be used to programmatically identify the error. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get describes the error in detail and provides debugging information. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ErrorDetail.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ErrorDetail.java new file mode 100644 index 0000000000000..ea58287532062 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ErrorDetail.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ErrorDetail model. + */ +public class ErrorDetail { + /** + * The code property. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * The message property. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * The details property. + */ + @JsonProperty(value = "details") + private List
details; + + /** + * The target property. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public List
details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withDetails(List
details) { + this.details = details; + return this; + } + + /** + * Get the target value. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the target value. + * + * @param target the target value to set + * @return the ErrorDetail object itself. + */ + public ErrorDetail withTarget(String target) { + this.target = target; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileDetails.java new file mode 100644 index 0000000000000..b8040d0164706 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileDetails.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of the filter files to be used for data transfer. + */ +public class FilterFileDetails { + /** + * Type of the filter file. Possible values include: 'AzureBlob', + * 'AzureFile'. + */ + @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 type of the filter file. Possible values include: 'AzureBlob', 'AzureFile'. + * + * @return the filterFileType value + */ + public FilterFileType filterFileType() { + return this.filterFileType; + } + + /** + * Set type of the filter file. Possible values include: 'AzureBlob', 'AzureFile'. + * + * @param filterFileType the filterFileType value to set + * @return the FilterFileDetails object itself. + */ + public FilterFileDetails withFilterFileType(FilterFileType filterFileType) { + this.filterFileType = filterFileType; + return this; + } + + /** + * Get path of the file that contains the details of all items to transfer. + * + * @return the filterFilePath value + */ + public String filterFilePath() { + return this.filterFilePath; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileType.java new file mode 100644 index 0000000000000..087cfef1066f3 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/FilterFileType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for FilterFileType. + */ +public enum FilterFileType { + /** Filter file is of the type AzureBlob. */ + AZURE_BLOB("AzureBlob"), + + /** Filter file is of the type AzureFiles. */ + AZURE_FILE("AzureFile"); + + /** The actual serialized value for a FilterFileType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/HeavyScheduleAvailabilityRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/HeavyScheduleAvailabilityRequest.java new file mode 100644 index 0000000000000..81b17f0999cfc --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/HeavyScheduleAvailabilityRequest.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = HeavyScheduleAvailabilityRequest.class) +@JsonTypeName("DataBoxHeavy") +public class HeavyScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/IdentityProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/IdentityProperties.java new file mode 100644 index 0000000000000..cfa8b4d162f16 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/IdentityProperties.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Managed identity properties. + */ +public class IdentityProperties { + /** + * Managed service identity type. + */ + @JsonProperty(value = "type") + private String type; + + /** + * User assigned identity properties. + */ + @JsonProperty(value = "userAssigned") + private UserAssignedProperties userAssigned; + + /** + * Get managed service identity type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set 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 user assigned identity properties. + * + * @return the userAssigned value + */ + public UserAssignedProperties userAssigned() { + return this.userAssigned; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryInfo.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryInfo.java new file mode 100644 index 0000000000000..9f2b81b0aaa67 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryInfo.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Additional delivery info. + */ +public class JobDeliveryInfo { + /** + * Scheduled date time. + */ + @JsonProperty(value = "scheduledDateTime") + private DateTime scheduledDateTime; + + /** + * Get scheduled date time. + * + * @return the scheduledDateTime value + */ + public DateTime scheduledDateTime() { + return this.scheduledDateTime; + } + + /** + * Set scheduled date time. + * + * @param scheduledDateTime the scheduledDateTime value to set + * @return the JobDeliveryInfo object itself. + */ + public JobDeliveryInfo withScheduledDateTime(DateTime scheduledDateTime) { + this.scheduledDateTime = scheduledDateTime; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryType.java new file mode 100644 index 0000000000000..0b47b116601dc --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDeliveryType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for JobDeliveryType. + */ +public enum JobDeliveryType { + /** Non Scheduled job. */ + NON_SCHEDULED("NonScheduled"), + + /** Scheduled job. */ + SCHEDULED("Scheduled"); + + /** The actual serialized value for a JobDeliveryType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDetails.java new file mode 100644 index 0000000000000..725de5c88f477 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobDetails.java @@ -0,0 +1,290 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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) +}) +public class JobDetails { + /** + * 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", access = JsonProperty.Access.WRITE_ONLY) + 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; + + /** + * Get list of stages that run in the job. + * + * @return the jobStages value + */ + public List jobStages() { + return this.jobStages; + } + + /** + * Get contact details for notification and shipping. + * + * @return the contactDetails value + */ + public ContactDetails contactDetails() { + return this.contactDetails; + } + + /** + * Set 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 shipping address of the customer. + * + * @return the shippingAddress value + */ + public ShippingAddress shippingAddress() { + return this.shippingAddress; + } + + /** + * Set 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 delivery package shipping details. + * + * @return the deliveryPackage value + */ + public PackageShippingDetails deliveryPackage() { + return this.deliveryPackage; + } + + /** + * Get return package shipping details. + * + * @return the returnPackage value + */ + public PackageShippingDetails returnPackage() { + return this.returnPackage; + } + + /** + * Get details of the data to be imported into azure. + * + * @return the dataImportDetails value + */ + public List dataImportDetails() { + return this.dataImportDetails; + } + + /** + * Set 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 details of the data to be exported from azure. + * + * @return the dataExportDetails value + */ + public List dataExportDetails() { + return this.dataExportDetails; + } + + /** + * Set 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 preferences for the order. + * + * @return the preferences value + */ + public Preferences preferences() { + return this.preferences; + } + + /** + * Set 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 list of copy log details. + * + * @return the copyLogDetails value + */ + public List copyLogDetails() { + return this.copyLogDetails; + } + + /** + * Get shared access key to download the return shipment label. + * + * @return the reverseShipmentLabelSasKey value + */ + public String reverseShipmentLabelSasKey() { + return this.reverseShipmentLabelSasKey; + } + + /** + * Get shared access key to download the chain of custody logs. + * + * @return the chainOfCustodySasKey value + */ + public String chainOfCustodySasKey() { + return this.chainOfCustodySasKey; + } + + /** + * Get details about which key encryption type is being used. + * + * @return the keyEncryptionKey value + */ + public KeyEncryptionKey keyEncryptionKey() { + return this.keyEncryptionKey; + } + + /** + * Get 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobErrorDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobErrorDetails.java new file mode 100644 index 0000000000000..305d78f54f71e --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobErrorDetails.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Job Error Details for providing the information and recommended action. + */ +public class JobErrorDetails { + /** + * Message for the error. + */ + @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) + private String errorMessage; + + /** + * Code for the error. + */ + @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer errorCode; + + /** + * Recommended action for the error. + */ + @JsonProperty(value = "recommendedAction", access = JsonProperty.Access.WRITE_ONLY) + private String recommendedAction; + + /** + * Contains the non localized exception message. + */ + @JsonProperty(value = "exceptionMessage", access = JsonProperty.Access.WRITE_ONLY) + private String exceptionMessage; + + /** + * Get message for the error. + * + * @return the errorMessage value + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Get code for the error. + * + * @return the errorCode value + */ + public Integer errorCode() { + return this.errorCode; + } + + /** + * Get recommended action for the error. + * + * @return the recommendedAction value + */ + public String recommendedAction() { + return this.recommendedAction; + } + + /** + * Get contains the non localized exception message. + * + * @return the exceptionMessage value + */ + public String exceptionMessage() { + return this.exceptionMessage; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResource.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResource.java new file mode 100644 index 0000000000000..2b8918102bc9d --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResource.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.Resource; +import com.microsoft.azure.arm.resources.models.GroupableResourceCore; +import com.microsoft.azure.arm.resources.models.HasResourceGroup; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import org.joda.time.DateTime; +import com.microsoft.rest.CloudError; +import com.microsoft.azure.management.databox.implementation.JobResourceInner; + +/** + * Type representing JobResource. + */ +public interface JobResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { + /** + * @return the cancellationReason value. + */ + String cancellationReason(); + + /** + * @return the deliveryInfo value. + */ + JobDeliveryInfo deliveryInfo(); + + /** + * @return the deliveryType value. + */ + JobDeliveryType deliveryType(); + + /** + * @return the details value. + */ + JobDetails details(); + + /** + * @return the error value. + */ + CloudError error(); + + /** + * @return the identity value. + */ + ResourceIdentity identity(); + + /** + * @return the isCancellable value. + */ + Boolean isCancellable(); + + /** + * @return the isCancellableWithoutFee value. + */ + Boolean isCancellableWithoutFee(); + + /** + * @return the isDeletable value. + */ + Boolean isDeletable(); + + /** + * @return the isPrepareToShipEnabled value. + */ + Boolean isPrepareToShipEnabled(); + + /** + * @return the isShippingAddressEditable value. + */ + Boolean isShippingAddressEditable(); + + /** + * @return the sku value. + */ + Sku sku(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the status value. + */ + StageName status(); + + /** + * @return the transferType value. + */ + TransferType transferType(); + + /** + * The entirety of the JobResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithSku, DefinitionStages.WithTransferType, DefinitionStages.WithCreate { + } + + /** + * Grouping of JobResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a JobResource definition. + */ + interface Blank extends GroupableResourceCore.DefinitionWithRegion { + } + + /** + * The stage of the JobResource definition allowing to specify the resource group. + */ + interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { + } + + /** + * The stage of the jobresource definition allowing to specify Sku. + */ + interface WithSku { + /** + * Specifies sku. + * @param sku The sku type + * @return the next definition stage +*/ + WithTransferType withSku(Sku sku); + } + + /** + * The stage of the jobresource definition allowing to specify TransferType. + */ + interface WithTransferType { + /** + * Specifies transferType. + * @param transferType Type of the data transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure' + * @return the next definition stage +*/ + WithCreate withTransferType(TransferType transferType); + } + + /** + * The stage of the jobresource definition allowing to specify DeliveryInfo. + */ + interface WithDeliveryInfo { + /** + * Specifies deliveryInfo. + * @param deliveryInfo Delivery Info of Job + * @return the next definition stage + */ + WithCreate withDeliveryInfo(JobDeliveryInfo deliveryInfo); + } + + /** + * The stage of the jobresource definition allowing to specify DeliveryType. + */ + interface WithDeliveryType { + /** + * Specifies deliveryType. + * @param deliveryType Delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled' + * @return the next definition stage + */ + WithCreate withDeliveryType(JobDeliveryType deliveryType); + } + + /** + * The stage of the jobresource definition allowing to specify Details. + */ + interface WithDetails { + /** + * Specifies details. + * @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 Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity Msi identity of the resource + * @return the next definition stage + */ + WithCreate withIdentity(ResourceIdentity identity); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithDeliveryInfo, DefinitionStages.WithDeliveryType, DefinitionStages.WithDetails, DefinitionStages.WithIdentity { + } + } + /** + * The template for a JobResource update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIfMatch, UpdateStages.WithDetails, UpdateStages.WithIdentity { + } + + /** + * Grouping of JobResource update stages. + */ + interface UpdateStages { + /** + * The stage of the jobresource update allowing to specify IfMatch. + */ + interface WithIfMatch { + /** + * Specifies ifMatch. + * @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 update stage + */ + Update withIfMatch(String ifMatch); + } + + /** + * The stage of the jobresource update allowing to specify Details. + */ + interface WithDetails { + /** + * Specifies details. + * @param details Details of a job to be updated + * @return the next update stage + */ + Update withDetails(UpdateJobDetails details); + } + + /** + * The stage of the jobresource update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity Msi identity of the resource + * @return the next update stage + */ + Update withIdentity(ResourceIdentity identity); + } + + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResourceUpdateParameter.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResourceUpdateParameter.java new file mode 100644 index 0000000000000..77af50e7a4346 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobResourceUpdateParameter.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * The JobResourceUpdateParameter. + */ +@JsonFlatten +public class JobResourceUpdateParameter { + /** + * Details of a job to be updated. + */ + @JsonProperty(value = "properties.details") + private UpdateJobDetails details; + + /** + * 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; + + /** + * Get details of a job to be updated. + * + * @return the details value + */ + public UpdateJobDetails details() { + return this.details; + } + + /** + * Set 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; + } + + /** + * Get 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 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 msi identity of the resource. + * + * @return the identity value + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobSecrets.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobSecrets.java new file mode 100644 index 0000000000000..1b85cd9480211 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobSecrets.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.rest.CloudError; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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) +}) +public class JobSecrets { + /** + * 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 dc Access Security Code for Customer Managed Shipping. + * + * @return the dcAccessSecurityCode value + */ + public DcAccessSecurityCode dcAccessSecurityCode() { + return this.dcAccessSecurityCode; + } + + /** + * Get error while fetching the secrets. + * + * @return the error value + */ + public CloudError error() { + return this.error; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobStages.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobStages.java new file mode 100644 index 0000000000000..2c512b2c0c5d0 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/JobStages.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Job stages. + */ +public class JobStages { + /** + * Name of the job stage. Possible values include: 'DeviceOrdered', + * 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', + * 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', + * 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', + * 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', + * 'ReadyToReceiveAtAzureDC'. + */ + @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. Possible values include: 'None', 'InProgress', + * 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', 'SucceededWithErrors', + * 'WaitingForCustomerAction', 'SucceededWithWarnings'. + */ + @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 DateTime stageTime; + + /** + * Job Stage Details. + */ + @JsonProperty(value = "jobStageDetails", access = JsonProperty.Access.WRITE_ONLY) + private Object jobStageDetails; + + /** + * Get name of the job stage. Possible values include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC'. + * + * @return the stageName value + */ + public StageName stageName() { + return this.stageName; + } + + /** + * Get display name of the job stage. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Get status of the job stage. Possible values include: 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', 'SucceededWithErrors', 'WaitingForCustomerAction', 'SucceededWithWarnings'. + * + * @return the stageStatus value + */ + public StageStatus stageStatus() { + return this.stageStatus; + } + + /** + * Get time for the job stage in UTC ISO 8601 format. + * + * @return the stageTime value + */ + public DateTime stageTime() { + return this.stageTime; + } + + /** + * Get job Stage Details. + * + * @return the jobStageDetails value + */ + public Object jobStageDetails() { + return this.jobStageDetails; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Jobs.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Jobs.java new file mode 100644 index 0000000000000..455b67459abbf --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Jobs.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; +import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; +import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; +import rx.Observable; +import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; +import com.microsoft.azure.arm.collection.SupportsListing; +import rx.Completable; +import com.microsoft.azure.management.databox.implementation.JobsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Jobs. + */ +public interface Jobs extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { + /** + * 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 + * @return the observable for the request + */ + Observable bookShipmentPickUpAsync(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest); + + /** + * 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 reason Reason for cancellation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable cancelAsync(String resourceGroupName, String jobName, String reason); + + /** + * 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 + * @return the observable for the request + */ + Observable listCredentialsAsync(String resourceGroupName, String jobName); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KekType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KekType.java new file mode 100644 index 0000000000000..d139a59624de2 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KekType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for KekType. + */ +public enum KekType { + /** Key encryption key is managed by Microsoft. */ + MICROSOFT_MANAGED("MicrosoftManaged"), + + /** Key encryption key is managed by the Customer. */ + CUSTOMER_MANAGED("CustomerManaged"); + + /** The actual serialized value for a KekType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KeyEncryptionKey.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KeyEncryptionKey.java new file mode 100644 index 0000000000000..55511c4f16da3 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/KeyEncryptionKey.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Encryption key containing details about key to encrypt different keys. + */ +public class KeyEncryptionKey { + /** + * Type of encryption key used for key encryption. Possible values include: + * 'MicrosoftManaged', 'CustomerManaged'. + */ + @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 type of encryption key used for key encryption. Possible values include: 'MicrosoftManaged', 'CustomerManaged'. + * + * @return the kekType value + */ + public KekType kekType() { + return this.kekType; + } + + /** + * Set type of encryption key used for key encryption. Possible values include: 'MicrosoftManaged', 'CustomerManaged'. + * + * @param kekType the kekType value to set + * @return the KeyEncryptionKey object itself. + */ + public KeyEncryptionKey withKekType(KekType kekType) { + this.kekType = kekType; + return this; + } + + /** + * Get managed identity properties used for key encryption. + * + * @return the identityProperties value + */ + public IdentityProperties identityProperties() { + return this.identityProperties; + } + + /** + * Set 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 key encryption key. It is required in case of Customer managed KekType. + * + * @return the kekUrl value + */ + public String kekUrl() { + return this.kekUrl; + } + + /** + * Set 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 kek vault resource id. It is required in case of Customer managed KekType. + * + * @return the kekVaultResourceID value + */ + public String kekVaultResourceID() { + return this.kekVaultResourceID; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/LogCollectionLevel.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/LogCollectionLevel.java new file mode 100644 index 0000000000000..908dfaab9381b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/LogCollectionLevel.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for LogCollectionLevel. + */ +public enum LogCollectionLevel { + /** Only Errors will be collected in the logs. */ + ERROR("Error"), + + /** Verbose logging (includes Errors, CRC, size information and others). */ + VERBOSE("Verbose"); + + /** The actual serialized value for a LogCollectionLevel instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ManagedDiskDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ManagedDiskDetails.java new file mode 100644 index 0000000000000..aff4a83e731fd --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ManagedDiskDetails.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = ManagedDiskDetails.class) +@JsonTypeName("ManagedDisk") +public class ManagedDiskDetails extends DataAccountDetails { + /** + * 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 resource Group Id of the compute disks. + * + * @return the resourceGroupId value + */ + public String resourceGroupId() { + return this.resourceGroupId; + } + + /** + * Set 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 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationPreference.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationPreference.java new file mode 100644 index 0000000000000..f791de4988703 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationPreference.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Notification preference for a job stage. + */ +public class NotificationPreference { + /** + * Name of the stage. Possible values include: 'DevicePrepared', + * 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy'. + */ + @JsonProperty(value = "stageName", required = true) + private NotificationStageName stageName; + + /** + * Notification is required or not. + */ + @JsonProperty(value = "sendNotification", required = true) + private boolean sendNotification; + + /** + * Get name of the stage. Possible values include: 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy'. + * + * @return the stageName value + */ + public NotificationStageName stageName() { + return this.stageName; + } + + /** + * Set name of the stage. Possible values include: 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy'. + * + * @param stageName the stageName value to set + * @return the NotificationPreference object itself. + */ + public NotificationPreference withStageName(NotificationStageName stageName) { + this.stageName = stageName; + return this; + } + + /** + * Get notification is required or not. + * + * @return the sendNotification value + */ + public boolean sendNotification() { + return this.sendNotification; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationStageName.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationStageName.java new file mode 100644 index 0000000000000..c7bbac6b3e9d6 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/NotificationStageName.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for NotificationStageName. + */ +public enum NotificationStageName { + /** Notification at device prepared stage. */ + DEVICE_PREPARED("DevicePrepared"), + + /** Notification at device dispatched stage. */ + DISPATCHED("Dispatched"), + + /** Notification at device delivered stage. */ + DELIVERED("Delivered"), + + /** Notification at device picked up from user stage. */ + PICKED_UP("PickedUp"), + + /** Notification at device received at Azure datacenter stage. */ + AT_AZURE_DC("AtAzureDC"), + + /** Notification at data copy started stage. */ + DATA_COPY("DataCopy"); + + /** The actual serialized value for a NotificationStageName instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operation.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operation.java new file mode 100644 index 0000000000000..85856a5d4e577 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operation.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import com.microsoft.azure.management.databox.implementation.OperationInner; + +/** + * Type representing Operation. + */ +public interface Operation extends HasInner, HasManager { + /** + * @return the display value. + */ + OperationDisplay display(); + + /** + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the origin value. + */ + String origin(); + + /** + * @return the properties value. + */ + Object properties(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OperationDisplay.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OperationDisplay.java new file mode 100644 index 0000000000000..a272b0b49e831 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OperationDisplay.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Operation display. + */ +public class OperationDisplay { + /** + * 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 provider name. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Set 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 resource name. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Set 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 localized name of the operation for display purpose. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + + /** + * Set 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 localized description of the operation for display purpose. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operations.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operations.java new file mode 100644 index 0000000000000..af72e5ec2c409 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Operations.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import rx.Observable; +import com.microsoft.azure.management.databox.implementation.OperationsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Operations. + */ +public interface Operations extends HasInner { + /** + * This method gets all the operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OverallValidationStatus.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OverallValidationStatus.java new file mode 100644 index 0000000000000..3f27b9c0905b4 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/OverallValidationStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for OverallValidationStatus. + */ +public enum OverallValidationStatus { + /** Every input request is valid. */ + ALL_VALID_TO_PROCEED("AllValidToProceed"), + + /** Some input requests are not valid. */ + INPUTS_REVISIT_REQUIRED("InputsRevisitRequired"), + + /** Certain input validations skipped. */ + CERTAIN_INPUT_VALIDATIONS_SKIPPED("CertainInputValidationsSkipped"); + + /** The actual serialized value for a OverallValidationStatus instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PackageShippingDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PackageShippingDetails.java new file mode 100644 index 0000000000000..dd4b11a5b038a --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PackageShippingDetails.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Shipping details. + */ +public class PackageShippingDetails { + /** + * 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 name of the carrier. + * + * @return the carrierName value + */ + public String carrierName() { + return this.carrierName; + } + + /** + * Get tracking Id of shipment. + * + * @return the trackingId value + */ + public String trackingId() { + return this.trackingId; + } + + /** + * Get url where shipment can be tracked. + * + * @return the trackingUrl value + */ + public String trackingUrl() { + return this.trackingUrl; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Preferences.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Preferences.java new file mode 100644 index 0000000000000..605d539193fd6 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Preferences.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Preferences related to the order. + */ +public class Preferences { + /** + * 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 preferred data center region. + * + * @return the preferredDataCenterRegion value + */ + public List preferredDataCenterRegion() { + return this.preferredDataCenterRegion; + } + + /** + * Set 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 preferences related to the shipment logistics of the sku. + * + * @return the transportPreferences value + */ + public TransportPreferences transportPreferences() { + return this.transportPreferences; + } + + /** + * Set 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 preferences related to the Encryption. + * + * @return the encryptionPreferences value + */ + public EncryptionPreferences encryptionPreferences() { + return this.encryptionPreferences; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationRequest.java new file mode 100644 index 0000000000000..e2bdd52b48563 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationRequest.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = PreferencesValidationRequest.class) +@JsonTypeName("ValidatePreferences") +public class PreferencesValidationRequest extends ValidationInputRequest { + /** + * Preference of transport and data center. + */ + @JsonProperty(value = "preference") + private Preferences preference; + + /** + * Device type to be used for the job. Possible values include: 'DataBox', + * 'DataBoxDisk', 'DataBoxHeavy'. + */ + @JsonProperty(value = "deviceType", required = true) + private SkuName deviceType; + + /** + * Get preference of transport and data center. + * + * @return the preference value + */ + public Preferences preference() { + return this.preference; + } + + /** + * Set 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 device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @return the deviceType value + */ + public SkuName deviceType() { + return this.deviceType; + } + + /** + * Set device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @param deviceType the deviceType value to set + * @return the PreferencesValidationRequest object itself. + */ + public PreferencesValidationRequest withDeviceType(SkuName deviceType) { + this.deviceType = deviceType; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationResponseProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationResponseProperties.java new file mode 100644 index 0000000000000..69bb9a4f84595 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/PreferencesValidationResponseProperties.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = PreferencesValidationResponseProperties.class) +@JsonTypeName("ValidatePreferences") +public class PreferencesValidationResponseProperties extends ValidationInputResponse { + /** + * Validation status of requested data center and transport. Possible + * values include: 'Valid', 'Invalid', 'Skipped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get validation status of requested data center and transport. Possible values include: 'Valid', 'Invalid', 'Skipped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationRequest.java new file mode 100644 index 0000000000000..1404de015c5fd --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationRequest.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request body to get the configuration for the region. + */ +public class RegionConfigurationRequest { + /** + * 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 request body to get the availability for scheduling orders. + * + * @return the scheduleAvailabilityRequest value + */ + public ScheduleAvailabilityRequest scheduleAvailabilityRequest() { + return this.scheduleAvailabilityRequest; + } + + /** + * Set 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 request body to get the transport availability for given sku. + * + * @return the transportAvailabilityRequest value + */ + public TransportAvailabilityRequest transportAvailabilityRequest() { + return this.transportAvailabilityRequest; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationResponse.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationResponse.java new file mode 100644 index 0000000000000..70ce558c43a75 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/RegionConfigurationResponse.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import com.microsoft.azure.management.databox.implementation.RegionConfigurationResponseInner; + +/** + * Type representing RegionConfigurationResponse. + */ +public interface RegionConfigurationResponse extends HasInner, HasManager { + /** + * @return the scheduleAvailabilityResponse value. + */ + ScheduleAvailabilityResponse scheduleAvailabilityResponse(); + + /** + * @return the transportAvailabilityResponse value. + */ + TransportAvailabilityResponse transportAvailabilityResponse(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ResourceIdentity.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ResourceIdentity.java new file mode 100644 index 0000000000000..9d2683c61d288 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ResourceIdentity.java @@ -0,0 +1,100 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Msi identity details of the resource. + */ +public class ResourceIdentity { + /** + * 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 identity type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set 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 service Principal Id backing the Msi. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get home Tenant Id. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get user Assigned Identities. + * + * @return the userAssignedIdentities value + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityRequest.java new file mode 100644 index 0000000000000..d2696ce8e9eb9 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityRequest.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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) +}) +public class ScheduleAvailabilityRequest { + /** + * 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 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 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 country in which storage location should be supported. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityResponse.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityResponse.java new file mode 100644 index 0000000000000..36fb88dddb2b4 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ScheduleAvailabilityResponse.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schedule availability for given sku in a region. + */ +public class ScheduleAvailabilityResponse { + /** + * List of dates available to schedule. + */ + @JsonProperty(value = "availableDates", access = JsonProperty.Access.WRITE_ONLY) + private List availableDates; + + /** + * Get list of dates available to schedule. + * + * @return the availableDates value + */ + public List availableDates() { + return this.availableDates; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Services.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Services.java new file mode 100644 index 0000000000000..f32805fa4ea96 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Services.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import rx.Observable; +import com.microsoft.azure.management.databox.implementation.ServicesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing Services. + */ +public interface Services extends HasInner { + /** + * 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 + * @return the observable for the request + */ + Observable listAvailableSkusByResourceGroupAsync(final String resourceGroupName, final String location, final AvailableSkuRequest availableSkuRequest); + + /** + * [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 + * @return the observable for the request + */ + Observable validateAddressMethodAsync(String location, ValidateAddress validateAddress); + + /** + * 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 + * @return the observable for the request + */ + Observable validateInputsByResourceGroupAsync(String resourceGroupName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable validateInputsAsync(String location, ValidationRequest validationRequest); + + /** + * 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 + * @return the observable for the request + */ + Observable regionConfigurationAsync(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. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable regionConfigurationByResourceGroupAsync(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareCredentialDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareCredentialDetails.java new file mode 100644 index 0000000000000..360f4e8e64415 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareCredentialDetails.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Credential details of the shares in account. + */ +public class ShareCredentialDetails { + /** + * Name of the share. + */ + @JsonProperty(value = "shareName", access = JsonProperty.Access.WRITE_ONLY) + private String shareName; + + /** + * Type of the share. Possible values include: 'UnknownType', 'HCS', + * 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk', + * 'AzurePremiumFiles'. + */ + @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 name of the share. + * + * @return the shareName value + */ + public String shareName() { + return this.shareName; + } + + /** + * Get type of the share. Possible values include: 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk', 'AzurePremiumFiles'. + * + * @return the shareType value + */ + public ShareDestinationFormatType shareType() { + return this.shareType; + } + + /** + * Get user name for the share. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Get password for the share. + * + * @return the password value + */ + public String password() { + return this.password; + } + + /** + * Get access protocols supported on the device. + * + * @return the supportedAccessProtocols value + */ + public List supportedAccessProtocols() { + return this.supportedAccessProtocols; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareDestinationFormatType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareDestinationFormatType.java new file mode 100644 index 0000000000000..bd385dcc7f410 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShareDestinationFormatType.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ShareDestinationFormatType. + */ +public enum ShareDestinationFormatType { + /** Unknown format. */ + UNKNOWN_TYPE("UnknownType"), + + /** Storsimple data format. */ + HCS("HCS"), + + /** Azure storage block blob format. */ + BLOCK_BLOB("BlockBlob"), + + /** Azure storage page blob format. */ + PAGE_BLOB("PageBlob"), + + /** Azure storage file format. */ + AZURE_FILE("AzureFile"), + + /** Azure Compute Disk. */ + MANAGED_DISK("ManagedDisk"), + + /** Azure storage Premium Files format. */ + AZURE_PREMIUM_FILES("AzurePremiumFiles"); + + /** The actual serialized value for a ShareDestinationFormatType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpRequest.java new file mode 100644 index 0000000000000..3b589e0bdb244 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpRequest.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Shipment pick up request details. + */ +public class ShipmentPickUpRequest { + /** + * 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 DateTime 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 DateTime endTime; + + /** + * Shipment Location in the pickup place. Eg.front desk. + */ + @JsonProperty(value = "shipmentLocation", required = true) + private String shipmentLocation; + + /** + * Get minimum date after which the pick up should commence, this must be in local time of pick up area. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set 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(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get maximum date before which the pick up should commence, this must be in local time of pick up area. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set 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(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get shipment Location in the pickup place. Eg.front desk. + * + * @return the shipmentLocation value + */ + public String shipmentLocation() { + return this.shipmentLocation; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpResponse.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpResponse.java new file mode 100644 index 0000000000000..165865cb56e38 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShipmentPickUpResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import com.microsoft.azure.management.databox.implementation.ShipmentPickUpResponseInner; +import org.joda.time.DateTime; + +/** + * Type representing ShipmentPickUpResponse. + */ +public interface ShipmentPickUpResponse extends HasInner, HasManager { + /** + * @return the confirmationNumber value. + */ + String confirmationNumber(); + + /** + * @return the readyByTime value. + */ + DateTime readyByTime(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShippingAddress.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShippingAddress.java new file mode 100644 index 0000000000000..0a620abdf7929 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ShippingAddress.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Shipping address where customer wishes to receive the device. + */ +public class ShippingAddress { + /** + * 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", required = true) + 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. Possible values include: 'None', 'Residential', + * 'Commercial'. + */ + @JsonProperty(value = "addressType") + private AddressType addressType; + + /** + * Get street Address line 1. + * + * @return the streetAddress1 value + */ + public String streetAddress1() { + return this.streetAddress1; + } + + /** + * Set 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 street Address line 2. + * + * @return the streetAddress2 value + */ + public String streetAddress2() { + return this.streetAddress2; + } + + /** + * Set 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 street Address line 3. + * + * @return the streetAddress3 value + */ + public String streetAddress3() { + return this.streetAddress3; + } + + /** + * Set 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 name of the City. + * + * @return the city value + */ + public String city() { + return this.city; + } + + /** + * Set 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 name of the State or Province. + * + * @return the stateOrProvince value + */ + public String stateOrProvince() { + return this.stateOrProvince; + } + + /** + * Set 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 name of the Country. + * + * @return the country value + */ + public String country() { + return this.country; + } + + /** + * Set 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 postal code. + * + * @return the postalCode value + */ + public String postalCode() { + return this.postalCode; + } + + /** + * Set 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 extended Zip Code. + * + * @return the zipExtendedCode value + */ + public String zipExtendedCode() { + return this.zipExtendedCode; + } + + /** + * Set 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 name of the company. + * + * @return the companyName value + */ + public String companyName() { + return this.companyName; + } + + /** + * Set 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 type of address. Possible values include: 'None', 'Residential', 'Commercial'. + * + * @return the addressType value + */ + public AddressType addressType() { + return this.addressType; + } + + /** + * Set type of address. Possible values include: 'None', 'Residential', 'Commercial'. + * + * @param addressType the addressType value to set + * @return the ShippingAddress object itself. + */ + public ShippingAddress withAddressType(AddressType addressType) { + this.addressType = addressType; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Sku.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Sku.java new file mode 100644 index 0000000000000..915e07540f899 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/Sku.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Sku. + */ +public class Sku { + /** + * The sku name. Possible values include: 'DataBox', 'DataBoxDisk', + * 'DataBoxHeavy'. + */ + @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 sku name. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @return the name value + */ + public SkuName name() { + return this.name; + } + + /** + * Set the sku name. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @param name the name value to set + * @return the Sku object itself. + */ + public Sku withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get the display name of the sku. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set 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 sku family. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationRequest.java new file mode 100644 index 0000000000000..756427abb0ee9 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationRequest.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = SkuAvailabilityValidationRequest.class) +@JsonTypeName("ValidateSkuAvailability") +public class SkuAvailabilityValidationRequest extends ValidationInputRequest { + /** + * Device type to be used for the job. Possible values include: 'DataBox', + * 'DataBoxDisk', 'DataBoxHeavy'. + */ + @JsonProperty(value = "deviceType", required = true) + private SkuName deviceType; + + /** + * Type of the transfer. Possible values include: 'ImportToAzure', + * 'ExportFromAzure'. + */ + @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 device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @return the deviceType value + */ + public SkuName deviceType() { + return this.deviceType; + } + + /** + * Set device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @param deviceType the deviceType value to set + * @return the SkuAvailabilityValidationRequest object itself. + */ + public SkuAvailabilityValidationRequest withDeviceType(SkuName deviceType) { + this.deviceType = deviceType; + return this; + } + + /** + * Get type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @return the transferType value + */ + public TransferType transferType() { + return this.transferType; + } + + /** + * Set type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @param transferType the transferType value to set + * @return the SkuAvailabilityValidationRequest object itself. + */ + public SkuAvailabilityValidationRequest withTransferType(TransferType transferType) { + this.transferType = transferType; + return this; + } + + /** + * Get 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 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 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationResponseProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationResponseProperties.java new file mode 100644 index 0000000000000..2bcb2244bfa25 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuAvailabilityValidationResponseProperties.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = SkuAvailabilityValidationResponseProperties.class) +@JsonTypeName("ValidateSkuAvailability") +public class SkuAvailabilityValidationResponseProperties extends ValidationInputResponse { + /** + * Sku availability validation status. Possible values include: 'Valid', + * 'Invalid', 'Skipped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get sku availability validation status. Possible values include: 'Valid', 'Invalid', 'Skipped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCapacity.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCapacity.java new file mode 100644 index 0000000000000..b30894ff6cb30 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCapacity.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Capacity of the sku. + */ +public class SkuCapacity { + /** + * 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 usable capacity in TB. + * + * @return the usable value + */ + public String usable() { + return this.usable; + } + + /** + * Get maximum capacity in TB. + * + * @return the maximum value + */ + public String maximum() { + return this.maximum; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCost.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCost.java new file mode 100644 index 0000000000000..30d64cf530316 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuCost.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes metadata for retrieving price info. + */ +public class SkuCost { + /** + * 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 meter id of the Sku. + * + * @return the meterId value + */ + public String meterId() { + return this.meterId; + } + + /** + * Get the type of the meter. + * + * @return the meterType value + */ + public String meterType() { + return this.meterType; + } + + /** + * Get 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuDisabledReason.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuDisabledReason.java new file mode 100644 index 0000000000000..274597d67b28c --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuDisabledReason.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SkuDisabledReason. + */ +public enum SkuDisabledReason { + /** SKU is not disabled. */ + NONE("None"), + + /** SKU is not available in the requested country. */ + COUNTRY("Country"), + + /** SKU is not available to push data to the requested Azure region. */ + REGION("Region"), + + /** Required features are not enabled for the SKU. */ + FEATURE("Feature"), + + /** Subscription does not have required offer types for the SKU. */ + OFFER_TYPE("OfferType"), + + /** Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification. */ + NO_SUBSCRIPTION_INFO("NoSubscriptionInfo"); + + /** The actual serialized value for a SkuDisabledReason instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuInformation.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuInformation.java new file mode 100644 index 0000000000000..43c9c018725cb --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuInformation.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import com.microsoft.azure.management.databox.implementation.SkuInformationInner; +import java.util.List; + +/** + * Type representing SkuInformation. + */ +public interface SkuInformation extends HasInner, HasManager { + /** + * @return the apiVersions value. + */ + List apiVersions(); + + /** + * @return the capacity value. + */ + SkuCapacity capacity(); + + /** + * @return the costs value. + */ + List costs(); + + /** + * @return the dataLocationToServiceLocationMap value. + */ + List dataLocationToServiceLocationMap(); + + /** + * @return the disabledReason value. + */ + SkuDisabledReason disabledReason(); + + /** + * @return the disabledReasonMessage value. + */ + String disabledReasonMessage(); + + /** + * @return the enabled value. + */ + Boolean enabled(); + + /** + * @return the requiredFeature value. + */ + String requiredFeature(); + + /** + * @return the sku value. + */ + Sku sku(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuName.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuName.java new file mode 100644 index 0000000000000..11beb9a1cf645 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SkuName.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SkuName. + */ +public enum SkuName { + /** Data Box. */ + DATA_BOX("DataBox"), + + /** Data Box Disk. */ + DATA_BOX_DISK("DataBoxDisk"), + + /** Data Box Heavy. */ + DATA_BOX_HEAVY("DataBoxHeavy"); + + /** The actual serialized value for a SkuName instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageName.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageName.java new file mode 100644 index 0000000000000..18a35537ac692 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageName.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for StageName. + */ +public enum StageName { + /** An order has been created. */ + DEVICE_ORDERED("DeviceOrdered"), + + /** A device has been prepared for the order. */ + DEVICE_PREPARED("DevicePrepared"), + + /** Device has been dispatched to the user of the order. */ + DISPATCHED("Dispatched"), + + /** Device has been delivered to the user of the order. */ + DELIVERED("Delivered"), + + /** Device has been picked up from user and in transit to Azure datacenter. */ + PICKED_UP("PickedUp"), + + /** Device has been received at Azure datacenter from the user. */ + AT_AZURE_DC("AtAzureDC"), + + /** Data copy from the device at Azure datacenter. */ + DATA_COPY("DataCopy"), + + /** Order has completed. */ + COMPLETED("Completed"), + + /** Order has completed with errors. */ + COMPLETED_WITH_ERRORS("CompletedWithErrors"), + + /** Order has been cancelled. */ + CANCELLED("Cancelled"), + + /** Order has failed due to issue reported by user. */ + FAILED_ISSUE_REPORTED_AT_CUSTOMER("Failed_IssueReportedAtCustomer"), + + /** Order has failed due to issue detected at Azure datacenter. */ + FAILED_ISSUE_DETECTED_AT_AZURE_DC("Failed_IssueDetectedAtAzureDC"), + + /** Order has been aborted. */ + ABORTED("Aborted"), + + /** Order has completed with warnings. */ + COMPLETED_WITH_WARNINGS("CompletedWithWarnings"), + + /** Device is ready to be handed to customer from Azure DC. */ + READY_TO_DISPATCH_FROM_AZURE_DC("ReadyToDispatchFromAzureDC"), + + /** Device can be dropped off at Azure DC. */ + READY_TO_RECEIVE_AT_AZURE_DC("ReadyToReceiveAtAzureDC"); + + /** The actual serialized value for a StageName instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageStatus.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageStatus.java new file mode 100644 index 0000000000000..1bba1757278f8 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StageStatus.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for StageStatus. + */ +public enum StageStatus { + /** No status available yet. */ + NONE("None"), + + /** Stage is in progress. */ + IN_PROGRESS("InProgress"), + + /** Stage has succeeded. */ + SUCCEEDED("Succeeded"), + + /** Stage has failed. */ + FAILED("Failed"), + + /** Stage has been cancelled. */ + CANCELLED("Cancelled"), + + /** Stage is cancelling. */ + CANCELLING("Cancelling"), + + /** Stage has succeeded with errors. */ + SUCCEEDED_WITH_ERRORS("SucceededWithErrors"), + + /** Stage is stuck until customer takes some action. */ + WAITING_FOR_CUSTOMER_ACTION("WaitingForCustomerAction"), + + /** Stage has succeeded with warnings. */ + SUCCEEDED_WITH_WARNINGS("SucceededWithWarnings"); + + /** The actual serialized value for a StageStatus instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StorageAccountDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StorageAccountDetails.java new file mode 100644 index 0000000000000..bd61bb0a1b056 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/StorageAccountDetails.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = StorageAccountDetails.class) +@JsonTypeName("StorageAccount") +public class StorageAccountDetails extends DataAccountDetails { + /** + * Storage Account Resource Id. + */ + @JsonProperty(value = "storageAccountId", required = true) + private String storageAccountId; + + /** + * Get storage Account Resource Id. + * + * @return the storageAccountId value + */ + public String storageAccountId() { + return this.storageAccountId; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationRequest.java new file mode 100644 index 0000000000000..02be3c0a463f5 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationRequest.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = SubscriptionIsAllowedToCreateJobValidationRequest.class) +@JsonTypeName("ValidateSubscriptionIsAllowedToCreateJob") +public class SubscriptionIsAllowedToCreateJobValidationRequest extends ValidationInputRequest { +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java new file mode 100644 index 0000000000000..c6f7b82679e13 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/SubscriptionIsAllowedToCreateJobValidationResponseProperties.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = SubscriptionIsAllowedToCreateJobValidationResponseProperties.class) +@JsonTypeName("ValidateSubscriptionIsAllowedToCreateJob") +public class SubscriptionIsAllowedToCreateJobValidationResponseProperties extends ValidationInputResponse { + /** + * Validation status of subscription permission to create job. Possible + * values include: 'Valid', 'Invalid', 'Skipped'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private ValidationStatus status; + + /** + * Get validation status of subscription permission to create job. Possible values include: 'Valid', 'Invalid', 'Skipped'. + * + * @return the status value + */ + public ValidationStatus status() { + return this.status; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferAllDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferAllDetails.java new file mode 100644 index 0000000000000..ebb9efb93d205 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferAllDetails.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details to transfer all data. + */ +public class TransferAllDetails { + /** + * Type of the account of data. Possible values include: 'StorageAccount', + * 'ManagedDisk'. + */ + @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 type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'. + * + * @return the dataAccountType value + */ + public DataAccountType dataAccountType() { + return this.dataAccountType; + } + + /** + * Set type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'. + * + * @param dataAccountType the dataAccountType value to set + * @return the TransferAllDetails object itself. + */ + public TransferAllDetails withDataAccountType(DataAccountType dataAccountType) { + this.dataAccountType = dataAccountType; + return this; + } + + /** + * Get to indicate if all Azure blobs have to be transferred. + * + * @return the transferAllBlobs value + */ + public Boolean transferAllBlobs() { + return this.transferAllBlobs; + } + + /** + * Set 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 to indicate if all Azure Files have to be transferred. + * + * @return the transferAllFiles value + */ + public Boolean transferAllFiles() { + return this.transferAllFiles; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfiguration.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfiguration.java new file mode 100644 index 0000000000000..cd0f37c745fa0 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfiguration.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration for defining the transfer of data. + */ +public class TransferConfiguration { + /** + * Type of the configuration for transfer. Possible values include: + * 'TransferAll', 'TransferUsingFilter'. + */ + @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 type of the configuration for transfer. Possible values include: 'TransferAll', 'TransferUsingFilter'. + * + * @return the transferConfigurationType value + */ + public TransferConfigurationType transferConfigurationType() { + return this.transferConfigurationType; + } + + /** + * Set type of the configuration for transfer. Possible values include: 'TransferAll', 'TransferUsingFilter'. + * + * @param transferConfigurationType the transferConfigurationType value to set + * @return the TransferConfiguration object itself. + */ + public TransferConfiguration withTransferConfigurationType(TransferConfigurationType transferConfigurationType) { + this.transferConfigurationType = transferConfigurationType; + return this; + } + + /** + * Get 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 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 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferAllDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferAllDetails.java new file mode 100644 index 0000000000000..981d66b9cabe5 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferAllDetails.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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. + */ +public class TransferConfigurationTransferAllDetails { + /** + * Details to transfer all data. + */ + @JsonProperty(value = "include") + private TransferAllDetails include; + + /** + * Get details to transfer all data. + * + * @return the include value + */ + public TransferAllDetails include() { + return this.include; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferFilterDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferFilterDetails.java new file mode 100644 index 0000000000000..16c690c309b53 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationTransferFilterDetails.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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. + */ +public class TransferConfigurationTransferFilterDetails { + /** + * Details of the filtering the transfer of data. + */ + @JsonProperty(value = "include") + private TransferFilterDetails include; + + /** + * Get details of the filtering the transfer of data. + * + * @return the include value + */ + public TransferFilterDetails include() { + return this.include; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationType.java new file mode 100644 index 0000000000000..4339672366f0e --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferConfigurationType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TransferConfigurationType. + */ +public enum TransferConfigurationType { + /** Transfer all the data. */ + TRANSFER_ALL("TransferAll"), + + /** Transfer using filter. */ + TRANSFER_USING_FILTER("TransferUsingFilter"); + + /** The actual serialized value for a TransferConfigurationType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferFilterDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferFilterDetails.java new file mode 100644 index 0000000000000..24cd907e964ff --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferFilterDetails.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Details of the filtering the transfer of data. + */ +public class TransferFilterDetails { + /** + * Type of the account of data. Possible values include: 'StorageAccount', + * 'ManagedDisk'. + */ + @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 type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'. + * + * @return the dataAccountType value + */ + public DataAccountType dataAccountType() { + return this.dataAccountType; + } + + /** + * Set type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk'. + * + * @param dataAccountType the dataAccountType value to set + * @return the TransferFilterDetails object itself. + */ + public TransferFilterDetails withDataAccountType(DataAccountType dataAccountType) { + this.dataAccountType = dataAccountType; + return this; + } + + /** + * Get filter details to transfer blobs. + * + * @return the blobFilterDetails value + */ + public BlobFilterDetails blobFilterDetails() { + return this.blobFilterDetails; + } + + /** + * Set 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 filter details to transfer Azure files. + * + * @return the azureFileFilterDetails value + */ + public AzureFileFilterDetails azureFileFilterDetails() { + return this.azureFileFilterDetails; + } + + /** + * Set 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 details of the filter files to be used for data transfer. + * + * @return the filterFileDetails value + */ + public List filterFileDetails() { + return this.filterFileDetails; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferType.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferType.java new file mode 100644 index 0000000000000..fdca2a4da9e41 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransferType.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TransferType. + */ +public enum TransferType { + /** Import data to azure. */ + IMPORT_TO_AZURE("ImportToAzure"), + + /** Export data from azure. */ + EXPORT_FROM_AZURE("ExportFromAzure"); + + /** The actual serialized value for a TransferType instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityDetails.java new file mode 100644 index 0000000000000..6d608d88de3de --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityDetails.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Transport options availability details for given region. + */ +public class TransportAvailabilityDetails { + /** + * Transport Shipment Type supported for given region. Possible values + * include: 'CustomerManaged', 'MicrosoftManaged'. + */ + @JsonProperty(value = "shipmentType", access = JsonProperty.Access.WRITE_ONLY) + private TransportShipmentTypes shipmentType; + + /** + * Get transport Shipment Type supported for given region. Possible values include: 'CustomerManaged', 'MicrosoftManaged'. + * + * @return the shipmentType value + */ + public TransportShipmentTypes shipmentType() { + return this.shipmentType; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityRequest.java new file mode 100644 index 0000000000000..94ad782f8dedc --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityRequest.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request body to get the transport availability for given sku. + */ +public class TransportAvailabilityRequest { + /** + * Type of the device. Possible values include: 'DataBox', 'DataBoxDisk', + * 'DataBoxHeavy'. + */ + @JsonProperty(value = "skuName") + private SkuName skuName; + + /** + * Get type of the device. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @return the skuName value + */ + public SkuName skuName() { + return this.skuName; + } + + /** + * Set type of the device. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @param skuName the skuName value to set + * @return the TransportAvailabilityRequest object itself. + */ + public TransportAvailabilityRequest withSkuName(SkuName skuName) { + this.skuName = skuName; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityResponse.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityResponse.java new file mode 100644 index 0000000000000..f701a51e7d6cf --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportAvailabilityResponse.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Transport options available for given sku in a region. + */ +public class TransportAvailabilityResponse { + /** + * List of transport availability details for given region. + */ + @JsonProperty(value = "transportAvailabilityDetails", access = JsonProperty.Access.WRITE_ONLY) + private List transportAvailabilityDetails; + + /** + * Get list of transport availability details for given region. + * + * @return the transportAvailabilityDetails value + */ + public List transportAvailabilityDetails() { + return this.transportAvailabilityDetails; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportPreferences.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportPreferences.java new file mode 100644 index 0000000000000..89c5de0ecbb1b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportPreferences.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Preferences related to the shipment logistics of the sku. + */ +public class TransportPreferences { + /** + * Indicates Shipment Logistics type that the customer preferred. Possible + * values include: 'CustomerManaged', 'MicrosoftManaged'. + */ + @JsonProperty(value = "preferredShipmentType", required = true) + private TransportShipmentTypes preferredShipmentType; + + /** + * Get indicates Shipment Logistics type that the customer preferred. Possible values include: 'CustomerManaged', 'MicrosoftManaged'. + * + * @return the preferredShipmentType value + */ + public TransportShipmentTypes preferredShipmentType() { + return this.preferredShipmentType; + } + + /** + * Set indicates Shipment Logistics type that the customer preferred. Possible values include: 'CustomerManaged', 'MicrosoftManaged'. + * + * @param preferredShipmentType the preferredShipmentType value to set + * @return the TransportPreferences object itself. + */ + public TransportPreferences withPreferredShipmentType(TransportShipmentTypes preferredShipmentType) { + this.preferredShipmentType = preferredShipmentType; + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportShipmentTypes.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportShipmentTypes.java new file mode 100644 index 0000000000000..63efc245ba21f --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/TransportShipmentTypes.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TransportShipmentTypes. + */ +public enum TransportShipmentTypes { + /** Shipment Logistics is handled by the customer. */ + CUSTOMER_MANAGED("CustomerManaged"), + + /** Shipment Logistics is handled by Microsoft. */ + MICROSOFT_MANAGED("MicrosoftManaged"); + + /** The actual serialized value for a TransportShipmentTypes instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UnencryptedCredentials.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UnencryptedCredentials.java new file mode 100644 index 0000000000000..28d135cc743fc --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UnencryptedCredentials.java @@ -0,0 +1,30 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import com.microsoft.azure.management.databox.implementation.UnencryptedCredentialsInner; + +/** + * Type representing UnencryptedCredentials. + */ +public interface UnencryptedCredentials extends HasInner, HasManager { + /** + * @return the jobName value. + */ + String jobName(); + + /** + * @return the jobSecrets value. + */ + JobSecrets jobSecrets(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UpdateJobDetails.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UpdateJobDetails.java new file mode 100644 index 0000000000000..5b06c98643281 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UpdateJobDetails.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Job details for update. + */ +public class UpdateJobDetails { + /** + * 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 contact details for notification and shipping. + * + * @return the contactDetails value + */ + public ContactDetails contactDetails() { + return this.contactDetails; + } + + /** + * Set 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 shipping address of the customer. + * + * @return the shippingAddress value + */ + public ShippingAddress shippingAddress() { + return this.shippingAddress; + } + + /** + * Set 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 key encryption key for the job. + * + * @return the keyEncryptionKey value + */ + public KeyEncryptionKey keyEncryptionKey() { + return this.keyEncryptionKey; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedIdentity.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedIdentity.java new file mode 100644 index 0000000000000..3ecc2e4d1bf95 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedIdentity.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Class defining User assigned identity details. + */ +public class UserAssignedIdentity { + /** + * 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 principal id of user assigned identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the client id of user assigned identity. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedProperties.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedProperties.java new file mode 100644 index 0000000000000..200d8f619b43c --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/UserAssignedProperties.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * User assigned identity properties. + */ +public class UserAssignedProperties { + /** + * Arm resource id for user assigned identity to be used to fetch MSI + * token. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidateAddress.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidateAddress.java new file mode 100644 index 0000000000000..f984c457bf888 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidateAddress.java @@ -0,0 +1,101 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +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", defaultImpl = ValidateAddress.class) +@JsonTypeName("ValidateAddress") +public class ValidateAddress extends ValidationInputRequest { + /** + * Shipping address of the customer. + */ + @JsonProperty(value = "shippingAddress", required = true) + private ShippingAddress shippingAddress; + + /** + * Device type to be used for the job. Possible values include: 'DataBox', + * 'DataBoxDisk', 'DataBoxHeavy'. + */ + @JsonProperty(value = "deviceType", required = true) + private SkuName deviceType; + + /** + * Preferences related to the shipment logistics of the sku. + */ + @JsonProperty(value = "transportPreferences") + private TransportPreferences transportPreferences; + + /** + * Get shipping address of the customer. + * + * @return the shippingAddress value + */ + public ShippingAddress shippingAddress() { + return this.shippingAddress; + } + + /** + * Set 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 device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @return the deviceType value + */ + public SkuName deviceType() { + return this.deviceType; + } + + /** + * Set device type to be used for the job. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'. + * + * @param deviceType the deviceType value to set + * @return the ValidateAddress object itself. + */ + public ValidateAddress withDeviceType(SkuName deviceType) { + this.deviceType = deviceType; + return this; + } + + /** + * Get preferences related to the shipment logistics of the sku. + * + * @return the transportPreferences value + */ + public TransportPreferences transportPreferences() { + return this.transportPreferences; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputRequest.java new file mode 100644 index 0000000000000..e7717e2c29271 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputRequest.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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 = "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), + @JsonSubTypes.Type(name = "ValidateAddress", value = ValidateAddress.class) +}) +public class ValidationInputRequest { +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputResponse.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputResponse.java new file mode 100644 index 0000000000000..20b3c22b04046 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationInputResponse.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.rest.CloudError; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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 = "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) +}) +public class ValidationInputResponse { + /** + * Error code and message of validation response. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private CloudError error; + + /** + * Get error code and message of validation response. + * + * @return the error value + */ + public CloudError error() { + return this.error; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationRequest.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationRequest.java new file mode 100644 index 0000000000000..506d8236f9ad3 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationRequest.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonSubTypes; + +/** + * 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) +}) +public class ValidationRequest { + /** + * List of request details contain validationType and its request as key + * and value respectively. + */ + @JsonProperty(value = "individualRequestDetails", required = true) + private List individualRequestDetails; + + /** + * Get 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 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationResponse.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationResponse.java new file mode 100644 index 0000000000000..580328cc5e371 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationResponse.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.databox.implementation.DataBoxManager; +import com.microsoft.azure.management.databox.implementation.ValidationResponseInner; +import java.util.List; + +/** + * Type representing ValidationResponse. + */ +public interface ValidationResponse extends HasInner, HasManager { + /** + * @return the individualResponseDetails value. + */ + List individualResponseDetails(); + + /** + * @return the status value. + */ + OverallValidationStatus status(); + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationStatus.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationStatus.java new file mode 100644 index 0000000000000..2bae6b7a5a49a --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/ValidationStatus.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ValidationStatus. + */ +public enum ValidationStatus { + /** Validation is successful. */ + VALID("Valid"), + + /** Validation is not successful. */ + INVALID("Invalid"), + + /** Validation is skipped. */ + SKIPPED("Skipped"); + + /** The actual serialized value for a ValidationStatus instance. */ + private 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/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputImpl.java new file mode 100644 index 0000000000000..e31d8dce02332 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputImpl.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.AddressValidationOutput; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.databox.ShippingAddress; +import com.microsoft.rest.CloudError; +import com.microsoft.azure.management.databox.AddressValidationStatus; + +class AddressValidationOutputImpl extends WrapperImpl implements AddressValidationOutput { + private final DataBoxManager manager; + AddressValidationOutputImpl(AddressValidationOutputInner inner, DataBoxManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataBoxManager manager() { + return this.manager; + } + + @Override + public List alternateAddresses() { + return this.inner().alternateAddresses(); + } + + @Override + public CloudError error() { + return this.inner().error(); + } + + @Override + public AddressValidationStatus validationStatus() { + return this.inner().validationStatus(); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputInner.java new file mode 100644 index 0000000000000..242988c214e9b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/AddressValidationOutputInner.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.rest.CloudError; +import com.microsoft.azure.management.databox.AddressValidationStatus; +import java.util.List; +import com.microsoft.azure.management.databox.ShippingAddress; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Output of the address validation api. + */ +@JsonFlatten +public class AddressValidationOutputInner { + /** + * Error code and message of validation response. + */ + @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY) + private CloudError error; + + /** + * The address validation status. Possible values include: 'Valid', + * 'Invalid', 'Ambiguous'. + */ + @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 error code and message of validation response. + * + * @return the error value + */ + public CloudError error() { + return this.error; + } + + /** + * Get the address validation status. Possible values include: 'Valid', 'Invalid', 'Ambiguous'. + * + * @return the validationStatus value + */ + public AddressValidationStatus validationStatus() { + return this.validationStatus; + } + + /** + * Get list of alternate addresses. + * + * @return the alternateAddresses value + */ + public List alternateAddresses() { + return this.alternateAddresses; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManagementClientImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManagementClientImpl.java new file mode 100644 index 0000000000000..9b35cb2559c63 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManagementClientImpl.java @@ -0,0 +1,224 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the DataBoxManagementClientImpl class. + */ +public class DataBoxManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** The API Version. */ + private String apiVersion; + + /** + * Gets The API Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The Subscription Id. */ + private String subscriptionId; + + /** + * Gets The Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets The Subscription Id. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public DataBoxManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public DataBoxManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public DataBoxManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public DataBoxManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The JobsInner object to access its operations. + */ + private JobsInner jobs; + + /** + * Gets the JobsInner object to access its operations. + * @return the JobsInner object. + */ + public JobsInner jobs() { + return this.jobs; + } + + /** + * The ServicesInner object to access its operations. + */ + private ServicesInner services; + + /** + * Gets the ServicesInner object to access its operations. + * @return the ServicesInner object. + */ + public ServicesInner services() { + return this.services; + } + + /** + * Initializes an instance of DataBoxManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public DataBoxManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of DataBoxManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public DataBoxManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of DataBoxManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public DataBoxManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2020-11-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.operations = new OperationsInner(restClient().retrofit(), this); + this.jobs = new JobsInner(restClient().retrofit(), this); + this.services = new ServicesInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "DataBoxManagementClient", "2020-11-01"); + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManager.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManager.java new file mode 100644 index 0000000000000..a16dff1590946 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/DataBoxManager.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.databox.Operations; +import com.microsoft.azure.management.databox.Jobs; +import com.microsoft.azure.management.databox.Services; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure DataBox resource management. + */ +public final class DataBoxManager extends ManagerCore { + private Operations operations; + private Jobs jobs; + private Services services; + /** + * Get a Configurable instance that can be used to create DataBoxManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new DataBoxManager.ConfigurableImpl(); + } + /** + * Creates an instance of DataBoxManager that exposes DataBox resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the DataBoxManager + */ + public static DataBoxManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new DataBoxManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of DataBoxManager that exposes DataBox resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the DataBoxManager + */ + public static DataBoxManager authenticate(RestClient restClient, String subscriptionId) { + return new DataBoxManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of DataBoxManager that exposes DataBox management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing DataBox management API entry points that work across subscriptions + */ + DataBoxManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage Jobs. + */ + public Jobs jobs() { + if (this.jobs == null) { + this.jobs = new JobsImpl(this); + } + return this.jobs; + } + + /** + * @return Entry point to manage Services. + */ + public Services services() { + if (this.services == null) { + this.services = new ServicesImpl(this); + } + return this.services; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public DataBoxManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return DataBoxManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private DataBoxManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new DataBoxManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/IdParsingUtils.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/IdParsingUtils.java new file mode 100644 index 0000000000000..7e904287a0ea3 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/IdParsingUtils.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; +import java.util.Arrays; +import java.util.Iterator; + +class IdParsingUtils { + public static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + public static String getValueFromIdByPosition(String id, int pos) { + if (id == null) { + return null; + } + Iterable iterable = Arrays.asList(id.split("/")); + Iterator itr = iterable.iterator(); + int index = 0; + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && part.trim() != "") { + if (index == pos) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + index++; + } + return null; + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceImpl.java new file mode 100644 index 0000000000000..2be0435ff1289 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceImpl.java @@ -0,0 +1,205 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; +import com.microsoft.azure.management.databox.JobResource; +import rx.Observable; +import com.microsoft.azure.management.databox.JobResourceUpdateParameter; +import com.microsoft.azure.management.databox.Sku; +import com.microsoft.azure.management.databox.ResourceIdentity; +import com.microsoft.azure.management.databox.TransferType; +import com.microsoft.azure.management.databox.StageName; +import org.joda.time.DateTime; +import com.microsoft.rest.CloudError; +import com.microsoft.azure.management.databox.JobDetails; +import com.microsoft.azure.management.databox.JobDeliveryType; +import com.microsoft.azure.management.databox.JobDeliveryInfo; +import com.microsoft.azure.management.databox.UpdateJobDetails; +import rx.functions.Func1; + +class JobResourceImpl extends GroupableResourceCoreImpl implements JobResource, JobResource.Definition, JobResource.Update { + private String uifMatch; + private JobResourceUpdateParameter updateParameter; + JobResourceImpl(String name, JobResourceInner inner, DataBoxManager manager) { + super(name, inner, manager); + this.updateParameter = new JobResourceUpdateParameter(); + } + + @Override + public Observable createResourceAsync() { + JobsInner client = this.manager().inner().jobs(); + return client.createAsync(this.resourceGroupName(), this.name(), this.inner()) + .map(new Func1() { + @Override + public JobResourceInner call(JobResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + JobsInner client = this.manager().inner().jobs(); + return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter, this.uifMatch) + .map(new Func1() { + @Override + public JobResourceInner call(JobResourceInner resource) { + resetCreateUpdateParameters(); + return resource; + } + }) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + JobsInner client = this.manager().inner().jobs(); + return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + private void resetCreateUpdateParameters() { + this.updateParameter = new JobResourceUpdateParameter(); + } + + @Override + public String cancellationReason() { + return this.inner().cancellationReason(); + } + + @Override + public JobDeliveryInfo deliveryInfo() { + return this.inner().deliveryInfo(); + } + + @Override + public JobDeliveryType deliveryType() { + return this.inner().deliveryType(); + } + + @Override + public JobDetails details() { + return this.inner().details(); + } + + @Override + public CloudError error() { + return this.inner().error(); + } + + @Override + public ResourceIdentity identity() { + return this.inner().identity(); + } + + @Override + public Boolean isCancellable() { + return this.inner().isCancellable(); + } + + @Override + public Boolean isCancellableWithoutFee() { + return this.inner().isCancellableWithoutFee(); + } + + @Override + public Boolean isDeletable() { + return this.inner().isDeletable(); + } + + @Override + public Boolean isPrepareToShipEnabled() { + return this.inner().isPrepareToShipEnabled(); + } + + @Override + public Boolean isShippingAddressEditable() { + return this.inner().isShippingAddressEditable(); + } + + @Override + public Sku sku() { + return this.inner().sku(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public StageName status() { + return this.inner().status(); + } + + @Override + public TransferType transferType() { + return this.inner().transferType(); + } + + @Override + public JobResourceImpl withSku(Sku sku) { + this.inner().withSku(sku); + return this; + } + + @Override + public JobResourceImpl withTransferType(TransferType transferType) { + this.inner().withTransferType(transferType); + return this; + } + + @Override + public JobResourceImpl withDeliveryInfo(JobDeliveryInfo deliveryInfo) { + this.inner().withDeliveryInfo(deliveryInfo); + return this; + } + + @Override + public JobResourceImpl withDeliveryType(JobDeliveryType deliveryType) { + this.inner().withDeliveryType(deliveryType); + return this; + } + + @Override + public JobResourceImpl withDetails(JobDetails details) { + this.inner().withDetails(details); + return this; + } + + @Override + public JobResourceImpl withIfMatch(String ifMatch) { + this.uifMatch = ifMatch; + return this; + } + + @Override + public JobResourceImpl withDetails(UpdateJobDetails details) { + this.updateParameter.withDetails(details); + return this; + } + + @Override + public JobResourceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.inner().withIdentity(identity); + } else { + this.updateParameter.withIdentity(identity); + } + return this; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceInner.java new file mode 100644 index 0000000000000..ab90a24f8908b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobResourceInner.java @@ -0,0 +1,373 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.TransferType; +import com.microsoft.azure.management.databox.StageName; +import org.joda.time.DateTime; +import com.microsoft.rest.CloudError; +import com.microsoft.azure.management.databox.JobDetails; +import com.microsoft.azure.management.databox.JobDeliveryType; +import com.microsoft.azure.management.databox.JobDeliveryInfo; +import com.microsoft.azure.management.databox.Sku; +import com.microsoft.azure.management.databox.ResourceIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * Job Resource. + */ +@JsonFlatten +public class JobResourceInner extends Resource { + /** + * Type of the data transfer. Possible values include: 'ImportToAzure', + * 'ExportFromAzure'. + */ + @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. Possible values include: + * 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', + * 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', + * 'Cancelled', 'Failed_IssueReportedAtCustomer', + * 'Failed_IssueDetectedAtAzureDC', 'Aborted', 'CompletedWithWarnings', + * 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC'. + */ + @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 DateTime 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. Possible values include: 'NonScheduled', + * 'Scheduled'. + */ + @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; + + /** + * 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; + + /** + * The sku type. + */ + @JsonProperty(value = "sku", required = true) + private Sku sku; + + /** + * Msi identity of the resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /** + * Get type of the data transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @return the transferType value + */ + public TransferType transferType() { + return this.transferType; + } + + /** + * Set type of the data transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure'. + * + * @param transferType the transferType value to set + * @return the JobResourceInner object itself. + */ + public JobResourceInner withTransferType(TransferType transferType) { + this.transferType = transferType; + return this; + } + + /** + * Get describes whether the job is cancellable or not. + * + * @return the isCancellable value + */ + public Boolean isCancellable() { + return this.isCancellable; + } + + /** + * Get describes whether the job is deletable or not. + * + * @return the isDeletable value + */ + public Boolean isDeletable() { + return this.isDeletable; + } + + /** + * Get describes whether the shipping address is editable or not. + * + * @return the isShippingAddressEditable value + */ + public Boolean isShippingAddressEditable() { + return this.isShippingAddressEditable; + } + + /** + * Get is Prepare To Ship Enabled on this job. + * + * @return the isPrepareToShipEnabled value + */ + public Boolean isPrepareToShipEnabled() { + return this.isPrepareToShipEnabled; + } + + /** + * Get name of the stage which is in progress. Possible values include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', 'CompletedWithErrors', 'Cancelled', 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', 'ReadyToReceiveAtAzureDC'. + * + * @return the status value + */ + public StageName status() { + return this.status; + } + + /** + * Get time at which the job was started in UTC ISO 8601 format. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get top level error for the job. + * + * @return the error value + */ + public CloudError error() { + return this.error; + } + + /** + * Get 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 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 reason for cancellation. + * + * @return the cancellationReason value + */ + public String cancellationReason() { + return this.cancellationReason; + } + + /** + * Get delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled'. + * + * @return the deliveryType value + */ + public JobDeliveryType deliveryType() { + return this.deliveryType; + } + + /** + * Set delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled'. + * + * @param deliveryType the deliveryType value to set + * @return the JobResourceInner object itself. + */ + public JobResourceInner withDeliveryType(JobDeliveryType deliveryType) { + this.deliveryType = deliveryType; + return this; + } + + /** + * Get delivery Info of Job. + * + * @return the deliveryInfo value + */ + public JobDeliveryInfo deliveryInfo() { + return this.deliveryInfo; + } + + /** + * Set 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 flag to indicate cancellation of scheduled job. + * + * @return the isCancellableWithoutFee value + */ + public Boolean isCancellableWithoutFee() { + return this.isCancellableWithoutFee; + } + + /** + * Get name of the object. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get id of the object. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get type of the object. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the sku type. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set 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 msi identity of the resource. + * + * @return the identity value + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsImpl.java new file mode 100644 index 0000000000000..0852ac50e9d36 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsImpl.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * def + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.management.databox.Jobs; +import com.microsoft.azure.management.databox.JobResource; +import rx.Observable; +import rx.Completable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import com.microsoft.azure.arm.resources.ResourceUtilsCore; +import com.microsoft.azure.arm.utils.RXMapper; +import rx.functions.Func1; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Page; +import java.util.List; +import com.microsoft.azure.management.databox.ShipmentPickUpResponse; +import com.microsoft.azure.management.databox.UnencryptedCredentials; +import com.microsoft.azure.management.databox.ShipmentPickUpRequest; + +class JobsImpl extends GroupableResourcesCoreImpl implements Jobs { + protected JobsImpl(DataBoxManager manager) { + super(manager.inner().jobs(), manager); + } + + @Override + protected Observable getInnerAsync(String resourceGroupName, String name) { + JobsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, name); + } + + @Override + protected Completable deleteInnerAsync(String resourceGroupName, String name) { + JobsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, name).toCompletable(); + } + + @Override + public Observable deleteByIdsAsync(Collection ids) { + if (ids == null || ids.isEmpty()) { + return Observable.empty(); + } + Collection> observables = new ArrayList<>(); + for (String id : ids) { + final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); + final String name = ResourceUtilsCore.nameFromResourceId(id); + Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); + observables.add(o); + } + return Observable.mergeDelayError(observables); + } + + @Override + public Observable deleteByIdsAsync(String...ids) { + return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + } + + @Override + public void deleteByIds(Collection ids) { + if (ids != null && !ids.isEmpty()) { + this.deleteByIdsAsync(ids).toBlocking().last(); + } + } + + @Override + public void deleteByIds(String...ids) { + this.deleteByIds(new ArrayList(Arrays.asList(ids))); + } + + @Override + public PagedList listByResourceGroup(String resourceGroupName) { + JobsInner client = this.inner(); + return this.wrapList(client.listByResourceGroup(resourceGroupName)); + } + + @Override + public Observable listByResourceGroupAsync(String resourceGroupName) { + JobsInner client = this.inner(); + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public JobResource call(JobResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public PagedList list() { + JobsInner client = this.inner(); + return this.wrapList(client.list()); + } + + @Override + public Observable listAsync() { + JobsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public JobResource call(JobResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public JobResourceImpl define(String name) { + return wrapModel(name); + } + + @Override + public Observable bookShipmentPickUpAsync(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { + JobsInner client = this.inner(); + return client.bookShipmentPickUpAsync(resourceGroupName, jobName, shipmentPickUpRequest) + .map(new Func1() { + @Override + public ShipmentPickUpResponse call(ShipmentPickUpResponseInner inner) { + return new ShipmentPickUpResponseImpl(inner, manager()); + } + }); + } + + @Override + public Completable cancelAsync(String resourceGroupName, String jobName, String reason) { + JobsInner client = this.inner(); + return client.cancelAsync(resourceGroupName, jobName, reason).toCompletable(); + } + + @Override + public Observable listCredentialsAsync(String resourceGroupName, String jobName) { + JobsInner client = this.inner(); + return client.listCredentialsAsync(resourceGroupName, jobName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public UnencryptedCredentials call(UnencryptedCredentialsInner inner) { + return new UnencryptedCredentialsImpl(inner, manager()); + } + }); + } + + @Override + protected JobResourceImpl wrapModel(JobResourceInner inner) { + return new JobResourceImpl(inner.name(), inner, manager()); + } + + @Override + protected JobResourceImpl wrapModel(String name) { + return new JobResourceImpl(name, new JobResourceInner(), this.manager()); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsInner.java new file mode 100644 index 0000000000000..e2d8548a7d965 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/JobsInner.java @@ -0,0 +1,1915 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsGet; +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.databox.ApiErrorException; +import com.microsoft.azure.management.databox.CancellationReason; +import com.microsoft.azure.management.databox.JobResourceUpdateParameter; +import com.microsoft.azure.management.databox.ShipmentPickUpRequest; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.PATCH; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Jobs. + */ +public class JobsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { + /** The Retrofit service to perform REST calls. */ + private JobsService service; + /** The service client containing this operation class. */ + private DataBoxManagementClientImpl client; + + /** + * Initializes an instance of JobsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public JobsInner(Retrofit retrofit, DataBoxManagementClientImpl client) { + this.service = retrofit.create(JobsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Jobs to be + * used by Retrofit to perform actually REST calls. + */ + interface JobsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs list" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$skipToken") String skipToken, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs") + Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$skipToken") String skipToken, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs getByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Body JobResourceInner jobResource, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + Observable> beginCreate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Body JobResourceInner jobResource, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs update" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + Observable> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Body JobResourceUpdateParameter jobResourceUpdateParameter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs beginUpdate" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}") + Observable> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Body JobResourceUpdateParameter jobResourceUpdateParameter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs bookShipmentPickUp" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp") + Observable> bookShipmentPickUp(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Body ShipmentPickUpRequest shipmentPickUpRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs cancel" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel") + Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CancellationReason cancellationReason, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs listCredentials" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials") + Observable> listCredentials(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("jobName") String jobName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Jobs listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all the jobs available under the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobResourceInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the jobs available under the subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the jobs available under the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the jobs available under the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the jobs available under the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String skipToken = null; + return service.list(this.client.subscriptionId(), this.client.apiVersion(), skipToken, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobResourceInner> object if successful. + */ + public PagedList list(final String skipToken) { + ServiceResponse> response = listSinglePageAsync(skipToken).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String skipToken, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(skipToken), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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 + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable> listAsync(final String skipToken) { + return listWithServiceResponseAsync(skipToken) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String skipToken) { + return listSinglePageAsync(skipToken) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the jobs available under the subscription. + * + ServiceResponse> * @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 + * @return the PagedList<JobResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String skipToken) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), skipToken, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobResourceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param resourceGroupName The Resource Group Name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param resourceGroupName The Resource Group Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param resourceGroupName The Resource Group Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param resourceGroupName The Resource Group Name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String skipToken = null; + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), skipToken, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobResourceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String skipToken) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, skipToken).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String skipToken, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, skipToken), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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 + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String skipToken) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, skipToken) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String skipToken) { + return listByResourceGroupSinglePageAsync(resourceGroupName, skipToken) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the jobs available under the given resource group. + * + ServiceResponse> * @param resourceGroupName The Resource Group Name + ServiceResponse> * @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 + * @return the PagedList<JobResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String skipToken) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), skipToken, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner getByResourceGroup(String resourceGroupName, String jobName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String jobName) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String jobName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String expand = null; + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner getByResourceGroup(String resourceGroupName, String jobName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName, expand).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String jobName, String expand, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName, expand), serviceCallback); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable getByResourceGroupAsync(String resourceGroupName, String jobName, String expand) { + return getByResourceGroupWithServiceResponseAsync(resourceGroupName, jobName, expand).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String jobName, String expand) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getByResourceGroupDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource) { + return createWithServiceResponseAsync(resourceGroupName, jobName, jobResource).toBlocking().last().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, jobName, jobResource), serviceCallback); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) { + return createWithServiceResponseAsync(resourceGroupName, jobName, jobResource).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobResource == null) { + throw new IllegalArgumentException("Parameter jobResource is required and cannot be null."); + } + Validator.validate(jobResource); + Observable> observable = service.create(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), jobResource, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner beginCreate(String resourceGroupName, String jobName, JobResourceInner jobResource) { + return beginCreateWithServiceResponseAsync(resourceGroupName, jobName, jobResource).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String resourceGroupName, String jobName, JobResourceInner jobResource, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(resourceGroupName, jobName, jobResource), serviceCallback); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable beginCreateAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) { + return beginCreateWithServiceResponseAsync(resourceGroupName, jobName, jobResource).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobResource == null) { + throw new IllegalArgumentException("Parameter jobResource is required and cannot be null."); + } + Validator.validate(jobResource); + return service.beginCreate(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), jobResource, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String jobName) { + deleteWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().last().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String jobName) { + return deleteWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String jobName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String jobName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String jobName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); + } + + /** + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String jobName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String jobName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner update(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + return updateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter).toBlocking().last().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter), serviceCallback); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + return updateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobResourceUpdateParameter == null) { + throw new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null."); + } + Validator.validate(jobResourceUpdateParameter); + final String ifMatch = null; + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), ifMatch, jobResourceUpdateParameter, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner update(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + return updateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).toBlocking().last().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch), serviceCallback); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable updateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + return updateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable for the request + */ + public Observable> updateWithServiceResponseAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobResourceUpdateParameter == null) { + throw new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null."); + } + Validator.validate(jobResourceUpdateParameter); + Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), ifMatch, jobResourceUpdateParameter, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner beginUpdate(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter), serviceCallback); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobResourceUpdateParameter == null) { + throw new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null."); + } + Validator.validate(jobResourceUpdateParameter); + final String ifMatch = null; + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), ifMatch, jobResourceUpdateParameter, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobResourceInner object if successful. + */ + public JobResourceInner beginUpdate(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch), serviceCallback); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable beginUpdateAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + return beginUpdateWithServiceResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).map(new Func1, JobResourceInner>() { + @Override + public JobResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the JobResourceInner object + */ + public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (jobResourceUpdateParameter == null) { + throw new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null."); + } + Validator.validate(jobResourceUpdateParameter); + return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), ifMatch, jobResourceUpdateParameter, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUpdateDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ShipmentPickUpResponseInner object if successful. + */ + public ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { + return bookShipmentPickUpWithServiceResponseAsync(resourceGroupName, jobName, shipmentPickUpRequest).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture bookShipmentPickUpAsync(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(bookShipmentPickUpWithServiceResponseAsync(resourceGroupName, jobName, shipmentPickUpRequest), serviceCallback); + } + + /** + * 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 + * @return the observable to the ShipmentPickUpResponseInner object + */ + public Observable bookShipmentPickUpAsync(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { + return bookShipmentPickUpWithServiceResponseAsync(resourceGroupName, jobName, shipmentPickUpRequest).map(new Func1, ShipmentPickUpResponseInner>() { + @Override + public ShipmentPickUpResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the ShipmentPickUpResponseInner object + */ + public Observable> bookShipmentPickUpWithServiceResponseAsync(String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (shipmentPickUpRequest == null) { + throw new IllegalArgumentException("Parameter shipmentPickUpRequest is required and cannot be null."); + } + Validator.validate(shipmentPickUpRequest); + return service.bookShipmentPickUp(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), shipmentPickUpRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = bookShipmentPickUpDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse bookShipmentPickUpDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 reason Reason for cancellation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void cancel(String resourceGroupName, String jobName, String reason) { + cancelWithServiceResponseAsync(resourceGroupName, jobName, reason).toBlocking().single().body(); + } + + /** + * 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 reason Reason for cancellation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture cancelAsync(String resourceGroupName, String jobName, String reason, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(resourceGroupName, jobName, reason), serviceCallback); + } + + /** + * 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 reason Reason for cancellation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable cancelAsync(String resourceGroupName, String jobName, String reason) { + return cancelWithServiceResponseAsync(resourceGroupName, jobName, reason).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 reason Reason for cancellation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> cancelWithServiceResponseAsync(String resourceGroupName, String jobName, String reason) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (reason == null) { + throw new IllegalArgumentException("Parameter reason is required and cannot be null."); + } + CancellationReason cancellationReason = new CancellationReason(); + cancellationReason.withReason(reason); + return service.cancel(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), cancellationReason, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = cancelDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse cancelDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<UnencryptedCredentialsInner> object if successful. + */ + public List listCredentials(String resourceGroupName, String jobName) { + return listCredentialsWithServiceResponseAsync(resourceGroupName, jobName).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listCredentialsAsync(String resourceGroupName, String jobName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listCredentialsWithServiceResponseAsync(resourceGroupName, jobName), serviceCallback); + } + + /** + * 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 + * @return the observable to the List<UnencryptedCredentialsInner> object + */ + public Observable> listCredentialsAsync(String resourceGroupName, String jobName) { + return listCredentialsWithServiceResponseAsync(resourceGroupName, jobName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the List<UnencryptedCredentialsInner> object + */ + public Observable>> listCredentialsWithServiceResponseAsync(String resourceGroupName, String jobName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (jobName == null) { + throw new IllegalArgumentException("Parameter jobName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listCredentials(this.client.subscriptionId(), resourceGroupName, jobName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listCredentialsDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listCredentialsDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Lists all the jobs available under the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobResourceInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the jobs available under the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the jobs available under the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the jobs available under the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the jobs available under the subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<JobResourceInner> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all the jobs available under the given resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<JobResourceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists all the jobs available under the given resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<JobResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationImpl.java new file mode 100644 index 0000000000000..b0c9ab9ff4b6d --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.Operation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.databox.OperationDisplay; + +class OperationImpl extends WrapperImpl implements Operation { + private final DataBoxManager manager; + OperationImpl(OperationInner inner, DataBoxManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataBoxManager manager() { + return this.manager; + } + + @Override + public OperationDisplay display() { + return this.inner().display(); + } + + @Override + public Boolean isDataAction() { + return this.inner().isDataAction(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String origin() { + return this.inner().origin(); + } + + @Override + public Object properties() { + return this.inner().properties(); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationInner.java new file mode 100644 index 0000000000000..5b5eb78e211cb --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationInner.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Operation entity. + */ +public class OperationInner { + /** + * 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 name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get operation display values. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Get operation properties. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Get origin of the operation. Can be : user|system|user,system. + * + * @return the origin value + */ + public String origin() { + return this.origin; + } + + /** + * Get indicates whether the operation is a data action. + * + * @return the isDataAction value + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set 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; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsImpl.java new file mode 100644 index 0000000000000..b50097403717f --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.databox.Operations; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.databox.Operation; + +class OperationsImpl extends WrapperImpl implements Operations { + private final DataBoxManager manager; + + OperationsImpl(DataBoxManager manager) { + super(manager.inner().operations()); + this.manager = manager; + } + + public DataBoxManager manager() { + return this.manager; + } + + @Override + public Observable listAsync() { + OperationsInner client = this.inner(); + return client.listAsync() + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public Operation call(OperationInner inner) { + return new OperationImpl(inner, manager()); + } + }); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsInner.java new file mode 100644 index 0000000000000..121c0a5ee3cb7 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.databox.ApiErrorException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private DataBoxManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, DataBoxManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Operations list" }) + @GET("providers/Microsoft.DataBox/operations") + Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * This method gets all the operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * This method gets all the operations. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * This method gets all the operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * This method gets all the operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * This method gets all the operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * This method gets all the operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<OperationInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * This method gets all the operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * This method gets all the operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * This method gets all the operations. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * This method gets all the operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl.java new file mode 100644 index 0000000000000..bafa49e84f4eb --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl1.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl1.java new file mode 100644 index 0000000000000..093145701ea27 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseImpl.java new file mode 100644 index 0000000000000..0dde28de0048b --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.RegionConfigurationResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.databox.ScheduleAvailabilityResponse; +import com.microsoft.azure.management.databox.TransportAvailabilityResponse; + +class RegionConfigurationResponseImpl extends WrapperImpl implements RegionConfigurationResponse { + private final DataBoxManager manager; + RegionConfigurationResponseImpl(RegionConfigurationResponseInner inner, DataBoxManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataBoxManager manager() { + return this.manager; + } + + @Override + public ScheduleAvailabilityResponse scheduleAvailabilityResponse() { + return this.inner().scheduleAvailabilityResponse(); + } + + @Override + public TransportAvailabilityResponse transportAvailabilityResponse() { + return this.inner().transportAvailabilityResponse(); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseInner.java new file mode 100644 index 0000000000000..55e85275995f3 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/RegionConfigurationResponseInner.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.ScheduleAvailabilityResponse; +import com.microsoft.azure.management.databox.TransportAvailabilityResponse; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration response specific to a region. + */ +public class RegionConfigurationResponseInner { + /** + * 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 schedule availability for given sku in a region. + * + * @return the scheduleAvailabilityResponse value + */ + public ScheduleAvailabilityResponse scheduleAvailabilityResponse() { + return this.scheduleAvailabilityResponse; + } + + /** + * Get transport options available for given sku in a region. + * + * @return the transportAvailabilityResponse value + */ + public TransportAvailabilityResponse transportAvailabilityResponse() { + return this.transportAvailabilityResponse; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesImpl.java new file mode 100644 index 0000000000000..e2afd0a6e1bd0 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesImpl.java @@ -0,0 +1,116 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.databox.Services; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.databox.SkuInformation; +import com.microsoft.azure.management.databox.AddressValidationOutput; +import com.microsoft.azure.management.databox.ValidationResponse; +import com.microsoft.azure.management.databox.RegionConfigurationResponse; +import com.microsoft.azure.management.databox.AvailableSkuRequest; +import com.microsoft.azure.management.databox.ValidateAddress; +import com.microsoft.azure.management.databox.ValidationRequest; +import com.microsoft.azure.management.databox.RegionConfigurationRequest; + +class ServicesImpl extends WrapperImpl implements Services { + private final DataBoxManager manager; + + ServicesImpl(DataBoxManager manager) { + super(manager.inner().services()); + this.manager = manager; + } + + public DataBoxManager manager() { + return this.manager; + } + + @Override + public Observable listAvailableSkusByResourceGroupAsync(final String resourceGroupName, final String location, final AvailableSkuRequest availableSkuRequest) { + ServicesInner client = this.inner(); + return client.listAvailableSkusByResourceGroupAsync(resourceGroupName, location, availableSkuRequest) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SkuInformation call(SkuInformationInner inner) { + return new SkuInformationImpl(inner, manager()); + } + }); + } + + @Override + public Observable validateAddressMethodAsync(String location, ValidateAddress validateAddress) { + ServicesInner client = this.inner(); + return client.validateAddressMethodAsync(location, validateAddress) + .map(new Func1() { + @Override + public AddressValidationOutput call(AddressValidationOutputInner inner) { + return new AddressValidationOutputImpl(inner, manager()); + } + }); + } + + @Override + public Observable validateInputsByResourceGroupAsync(String resourceGroupName, String location, ValidationRequest validationRequest) { + ServicesInner client = this.inner(); + return client.validateInputsByResourceGroupAsync(resourceGroupName, location, validationRequest) + .map(new Func1() { + @Override + public ValidationResponse call(ValidationResponseInner inner) { + return new ValidationResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable validateInputsAsync(String location, ValidationRequest validationRequest) { + ServicesInner client = this.inner(); + return client.validateInputsAsync(location, validationRequest) + .map(new Func1() { + @Override + public ValidationResponse call(ValidationResponseInner inner) { + return new ValidationResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable regionConfigurationAsync(String location, RegionConfigurationRequest regionConfigurationRequest) { + ServicesInner client = this.inner(); + return client.regionConfigurationAsync(location, regionConfigurationRequest) + .map(new Func1() { + @Override + public RegionConfigurationResponse call(RegionConfigurationResponseInner inner) { + return new RegionConfigurationResponseImpl(inner, manager()); + } + }); + } + + @Override + public Observable regionConfigurationByResourceGroupAsync(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { + ServicesInner client = this.inner(); + return client.regionConfigurationByResourceGroupAsync(resourceGroupName, location, regionConfigurationRequest) + .map(new Func1() { + @Override + public RegionConfigurationResponse call(RegionConfigurationResponseInner inner) { + return new RegionConfigurationResponseImpl(inner, manager()); + } + }); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesInner.java new file mode 100644 index 0000000000000..0faece57f76e5 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ServicesInner.java @@ -0,0 +1,789 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.databox.ApiErrorException; +import com.microsoft.azure.management.databox.AvailableSkuRequest; +import com.microsoft.azure.management.databox.RegionConfigurationRequest; +import com.microsoft.azure.management.databox.ValidateAddress; +import com.microsoft.azure.management.databox.ValidationRequest; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Services. + */ +public class ServicesInner { + /** The Retrofit service to perform REST calls. */ + private ServicesService service; + /** The service client containing this operation class. */ + private DataBoxManagementClientImpl client; + + /** + * Initializes an instance of ServicesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServicesInner(Retrofit retrofit, DataBoxManagementClientImpl client) { + this.service = retrofit.create(ServicesService.class); + this.client = client; + } + + /** + * The interface defining all the services for Services to be + * used by Retrofit to perform actually REST calls. + */ + interface ServicesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Services listAvailableSkusByResourceGroup" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus") + Observable> listAvailableSkusByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Query("api-version") String apiVersion, @Body AvailableSkuRequest availableSkuRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Services validateAddressMethod" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress") + Observable> validateAddressMethod(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body ValidateAddress validateAddress, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Services validateInputsByResourceGroup" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs") + Observable> validateInputsByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Query("api-version") String apiVersion, @Body ValidationRequest validationRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Services validateInputs" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs") + Observable> validateInputs(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body ValidationRequest validationRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Services regionConfiguration" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") + Observable> regionConfiguration(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Body RegionConfigurationRequest regionConfigurationRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Services regionConfigurationByResourceGroup" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration") + Observable> regionConfigurationByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Query("api-version") String apiVersion, @Body RegionConfigurationRequest regionConfigurationRequest, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.databox.Services listAvailableSkusByResourceGroupNext" }) + @GET + Observable> listAvailableSkusByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SkuInformationInner> object if successful. + */ + public PagedList listAvailableSkusByResourceGroup(final String resourceGroupName, final String location, final AvailableSkuRequest availableSkuRequest) { + ServiceResponse> response = listAvailableSkusByResourceGroupSinglePageAsync(resourceGroupName, location, availableSkuRequest).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAvailableSkusByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAvailableSkusByResourceGroupAsync(final String resourceGroupName, final String location, final AvailableSkuRequest availableSkuRequest, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAvailableSkusByResourceGroupSinglePageAsync(resourceGroupName, location, availableSkuRequest), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAvailableSkusByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * 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 + * @return the observable to the PagedList<SkuInformationInner> object + */ + public Observable> listAvailableSkusByResourceGroupAsync(final String resourceGroupName, final String location, final AvailableSkuRequest availableSkuRequest) { + return listAvailableSkusByResourceGroupWithServiceResponseAsync(resourceGroupName, location, availableSkuRequest) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the PagedList<SkuInformationInner> object + */ + public Observable>> listAvailableSkusByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String location, final AvailableSkuRequest availableSkuRequest) { + return listAvailableSkusByResourceGroupSinglePageAsync(resourceGroupName, location, availableSkuRequest) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAvailableSkusByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * This method provides the list of available skus for the given subscription, resource group and location. + * + ServiceResponse> * @param resourceGroupName The Resource Group Name + ServiceResponse> * @param location The location of the resource + ServiceResponse> * @param availableSkuRequest Filters for showing the available skus. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SkuInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAvailableSkusByResourceGroupSinglePageAsync(final String resourceGroupName, final String location, final AvailableSkuRequest availableSkuRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (availableSkuRequest == null) { + throw new IllegalArgumentException("Parameter availableSkuRequest is required and cannot be null."); + } + Validator.validate(availableSkuRequest); + return service.listAvailableSkusByResourceGroup(this.client.subscriptionId(), resourceGroupName, location, this.client.apiVersion(), availableSkuRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAvailableSkusByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAvailableSkusByResourceGroupDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * [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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AddressValidationOutputInner object if successful. + */ + public AddressValidationOutputInner validateAddressMethod(String location, ValidateAddress validateAddress) { + return validateAddressMethodWithServiceResponseAsync(location, validateAddress).toBlocking().single().body(); + } + + /** + * [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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture validateAddressMethodAsync(String location, ValidateAddress validateAddress, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateAddressMethodWithServiceResponseAsync(location, validateAddress), serviceCallback); + } + + /** + * [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 + * @return the observable to the AddressValidationOutputInner object + */ + public Observable validateAddressMethodAsync(String location, ValidateAddress validateAddress) { + return validateAddressMethodWithServiceResponseAsync(location, validateAddress).map(new Func1, AddressValidationOutputInner>() { + @Override + public AddressValidationOutputInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * [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 + * @return the observable to the AddressValidationOutputInner object + */ + public Observable> validateAddressMethodWithServiceResponseAsync(String location, ValidateAddress validateAddress) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (validateAddress == null) { + throw new IllegalArgumentException("Parameter validateAddress is required and cannot be null."); + } + Validator.validate(validateAddress); + return service.validateAddressMethod(this.client.subscriptionId(), location, this.client.apiVersion(), validateAddress, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateAddressMethodDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateAddressMethodDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ValidationResponseInner object if successful. + */ + public ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location, ValidationRequest validationRequest) { + return validateInputsByResourceGroupWithServiceResponseAsync(resourceGroupName, location, validationRequest).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture validateInputsByResourceGroupAsync(String resourceGroupName, String location, ValidationRequest validationRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateInputsByResourceGroupWithServiceResponseAsync(resourceGroupName, location, validationRequest), serviceCallback); + } + + /** + * 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 + * @return the observable to the ValidationResponseInner object + */ + public Observable validateInputsByResourceGroupAsync(String resourceGroupName, String location, ValidationRequest validationRequest) { + return validateInputsByResourceGroupWithServiceResponseAsync(resourceGroupName, location, validationRequest).map(new Func1, ValidationResponseInner>() { + @Override + public ValidationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the ValidationResponseInner object + */ + public Observable> validateInputsByResourceGroupWithServiceResponseAsync(String resourceGroupName, String location, ValidationRequest validationRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (validationRequest == null) { + throw new IllegalArgumentException("Parameter validationRequest is required and cannot be null."); + } + Validator.validate(validationRequest); + return service.validateInputsByResourceGroup(this.client.subscriptionId(), resourceGroupName, location, this.client.apiVersion(), validationRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateInputsByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateInputsByResourceGroupDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ValidationResponseInner object if successful. + */ + public ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest) { + return validateInputsWithServiceResponseAsync(location, validationRequest).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture validateInputsAsync(String location, ValidationRequest validationRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateInputsWithServiceResponseAsync(location, validationRequest), serviceCallback); + } + + /** + * 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 + * @return the observable to the ValidationResponseInner object + */ + public Observable validateInputsAsync(String location, ValidationRequest validationRequest) { + return validateInputsWithServiceResponseAsync(location, validationRequest).map(new Func1, ValidationResponseInner>() { + @Override + public ValidationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the ValidationResponseInner object + */ + public Observable> validateInputsWithServiceResponseAsync(String location, ValidationRequest validationRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (validationRequest == null) { + throw new IllegalArgumentException("Parameter validationRequest is required and cannot be null."); + } + Validator.validate(validationRequest); + return service.validateInputs(this.client.subscriptionId(), location, this.client.apiVersion(), validationRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateInputsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateInputsDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RegionConfigurationResponseInner object if successful. + */ + public RegionConfigurationResponseInner regionConfiguration(String location, RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationWithServiceResponseAsync(location, regionConfigurationRequest).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture regionConfigurationAsync(String location, RegionConfigurationRequest regionConfigurationRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regionConfigurationWithServiceResponseAsync(location, regionConfigurationRequest), serviceCallback); + } + + /** + * 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 + * @return the observable to the RegionConfigurationResponseInner object + */ + public Observable regionConfigurationAsync(String location, RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationWithServiceResponseAsync(location, regionConfigurationRequest).map(new Func1, RegionConfigurationResponseInner>() { + @Override + public RegionConfigurationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the RegionConfigurationResponseInner object + */ + public Observable> regionConfigurationWithServiceResponseAsync(String location, RegionConfigurationRequest regionConfigurationRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (regionConfigurationRequest == null) { + throw new IllegalArgumentException("Parameter regionConfigurationRequest is required and cannot be null."); + } + Validator.validate(regionConfigurationRequest); + return service.regionConfiguration(this.client.subscriptionId(), location, this.client.apiVersion(), regionConfigurationRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regionConfigurationDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regionConfigurationDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * 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 ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RegionConfigurationResponseInner object if successful. + */ + public RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationByResourceGroupWithServiceResponseAsync(resourceGroupName, location, regionConfigurationRequest).toBlocking().single().body(); + } + + /** + * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture regionConfigurationByResourceGroupAsync(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regionConfigurationByResourceGroupWithServiceResponseAsync(resourceGroupName, location, regionConfigurationRequest), serviceCallback); + } + + /** + * 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 + * @return the observable to the RegionConfigurationResponseInner object + */ + public Observable regionConfigurationByResourceGroupAsync(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { + return regionConfigurationByResourceGroupWithServiceResponseAsync(resourceGroupName, location, regionConfigurationRequest).map(new Func1, RegionConfigurationResponseInner>() { + @Override + public RegionConfigurationResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * 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 + * @return the observable to the RegionConfigurationResponseInner object + */ + public Observable> regionConfigurationByResourceGroupWithServiceResponseAsync(String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (regionConfigurationRequest == null) { + throw new IllegalArgumentException("Parameter regionConfigurationRequest is required and cannot be null."); + } + Validator.validate(regionConfigurationRequest); + return service.regionConfigurationByResourceGroup(this.client.subscriptionId(), resourceGroupName, location, this.client.apiVersion(), regionConfigurationRequest, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regionConfigurationByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regionConfigurationByResourceGroupDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + + /** + * This method provides the list of available skus for the given subscription, resource group and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ApiErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SkuInformationInner> object if successful. + */ + public PagedList listAvailableSkusByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listAvailableSkusByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAvailableSkusByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * This method provides the list of available skus for the given subscription, resource group and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAvailableSkusByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAvailableSkusByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAvailableSkusByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * This method provides the list of available skus for the given subscription, resource group and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInformationInner> object + */ + public Observable> listAvailableSkusByResourceGroupNextAsync(final String nextPageLink) { + return listAvailableSkusByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * This method provides the list of available skus for the given subscription, resource group and location. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SkuInformationInner> object + */ + public Observable>> listAvailableSkusByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listAvailableSkusByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listAvailableSkusByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * This method provides the list of available skus for the given subscription, resource group and location. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SkuInformationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAvailableSkusByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listAvailableSkusByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAvailableSkusByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAvailableSkusByResourceGroupNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ApiErrorException.class) + .build(response); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseImpl.java new file mode 100644 index 0000000000000..a06f390128a35 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.ShipmentPickUpResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import org.joda.time.DateTime; + +class ShipmentPickUpResponseImpl extends WrapperImpl implements ShipmentPickUpResponse { + private final DataBoxManager manager; + ShipmentPickUpResponseImpl(ShipmentPickUpResponseInner inner, DataBoxManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataBoxManager manager() { + return this.manager; + } + + @Override + public String confirmationNumber() { + return this.inner().confirmationNumber(); + } + + @Override + public DateTime readyByTime() { + return this.inner().readyByTime(); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseInner.java new file mode 100644 index 0000000000000..17fb28f27a121 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ShipmentPickUpResponseInner.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Shipment pick up response. + */ +public class ShipmentPickUpResponseInner { + /** + * 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 DateTime readyByTime; + + /** + * Get confirmation number for the pick up request. + * + * @return the confirmationNumber value + */ + public String confirmationNumber() { + return this.confirmationNumber; + } + + /** + * Get time by which shipment should be ready for pick up, this is in local time of pick up area. + * + * @return the readyByTime value + */ + public DateTime readyByTime() { + return this.readyByTime; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationImpl.java new file mode 100644 index 0000000000000..e8d0853eb729e --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationImpl.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.SkuInformation; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.databox.SkuCapacity; +import com.microsoft.azure.management.databox.SkuCost; +import com.microsoft.azure.management.databox.DataLocationToServiceLocationMap; +import com.microsoft.azure.management.databox.SkuDisabledReason; +import com.microsoft.azure.management.databox.Sku; + +class SkuInformationImpl extends WrapperImpl implements SkuInformation { + private final DataBoxManager manager; + SkuInformationImpl(SkuInformationInner inner, DataBoxManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataBoxManager manager() { + return this.manager; + } + + @Override + public List apiVersions() { + return this.inner().apiVersions(); + } + + @Override + public SkuCapacity capacity() { + return this.inner().capacity(); + } + + @Override + public List costs() { + return this.inner().costs(); + } + + @Override + public List dataLocationToServiceLocationMap() { + return this.inner().dataLocationToServiceLocationMap(); + } + + @Override + public SkuDisabledReason disabledReason() { + return this.inner().disabledReason(); + } + + @Override + public String disabledReasonMessage() { + return this.inner().disabledReasonMessage(); + } + + @Override + public Boolean enabled() { + return this.inner().enabled(); + } + + @Override + public String requiredFeature() { + return this.inner().requiredFeature(); + } + + @Override + public Sku sku() { + return this.inner().sku(); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationInner.java new file mode 100644 index 0000000000000..8cd0fa757a185 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/SkuInformationInner.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.Sku; +import java.util.List; +import com.microsoft.azure.management.databox.DataLocationToServiceLocationMap; +import com.microsoft.azure.management.databox.SkuCapacity; +import com.microsoft.azure.management.databox.SkuCost; +import com.microsoft.azure.management.databox.SkuDisabledReason; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information of the sku. + */ +@JsonFlatten +public class SkuInformationInner { + /** + * 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. Possible values include: 'None', + * 'Country', 'Region', 'Feature', 'OfferType', 'NoSubscriptionInfo'. + */ + @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. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Get the sku is enabled or not. + * + * @return the enabled value + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Get the map of data location to service location. + * + * @return the dataLocationToServiceLocationMap value + */ + public List dataLocationToServiceLocationMap() { + return this.dataLocationToServiceLocationMap; + } + + /** + * Get capacity of the Sku. + * + * @return the capacity value + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Get cost of the Sku. + * + * @return the costs value + */ + public List costs() { + return this.costs; + } + + /** + * Get api versions that support this Sku. + * + * @return the apiVersions value + */ + public List apiVersions() { + return this.apiVersions; + } + + /** + * Get reason why the Sku is disabled. Possible values include: 'None', 'Country', 'Region', 'Feature', 'OfferType', 'NoSubscriptionInfo'. + * + * @return the disabledReason value + */ + public SkuDisabledReason disabledReason() { + return this.disabledReason; + } + + /** + * Get message for why the Sku is disabled. + * + * @return the disabledReasonMessage value + */ + public String disabledReasonMessage() { + return this.disabledReasonMessage; + } + + /** + * Get required feature to access the sku. + * + * @return the requiredFeature value + */ + public String requiredFeature() { + return this.requiredFeature; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsImpl.java new file mode 100644 index 0000000000000..0f1d962e80dd8 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.UnencryptedCredentials; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.databox.JobSecrets; + +class UnencryptedCredentialsImpl extends WrapperImpl implements UnencryptedCredentials { + private final DataBoxManager manager; + UnencryptedCredentialsImpl(UnencryptedCredentialsInner inner, DataBoxManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataBoxManager manager() { + return this.manager; + } + + @Override + public String jobName() { + return this.inner().jobName(); + } + + @Override + public JobSecrets jobSecrets() { + return this.inner().jobSecrets(); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsInner.java new file mode 100644 index 0000000000000..be6d7c6e050c4 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/UnencryptedCredentialsInner.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.JobSecrets; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Unencrypted credentials for accessing device. + */ +public class UnencryptedCredentialsInner { + /** + * 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 name of the job. + * + * @return the jobName value + */ + public String jobName() { + return this.jobName; + } + + /** + * Get secrets related to this job. + * + * @return the jobSecrets value + */ + public JobSecrets jobSecrets() { + return this.jobSecrets; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseImpl.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseImpl.java new file mode 100644 index 0000000000000..26d5049afd484 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.ValidationResponse; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.databox.ValidationInputResponse; +import com.microsoft.azure.management.databox.OverallValidationStatus; + +class ValidationResponseImpl extends WrapperImpl implements ValidationResponse { + private final DataBoxManager manager; + ValidationResponseImpl(ValidationResponseInner inner, DataBoxManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public DataBoxManager manager() { + return this.manager; + } + + @Override + public List individualResponseDetails() { + return this.inner().individualResponseDetails(); + } + + @Override + public OverallValidationStatus status() { + return this.inner().status(); + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseInner.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseInner.java new file mode 100644 index 0000000000000..270dc47b199ce --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/ValidationResponseInner.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.databox.implementation; + +import com.microsoft.azure.management.databox.OverallValidationStatus; +import java.util.List; +import com.microsoft.azure.management.databox.ValidationInputResponse; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Response of pre job creation validations. + */ +@JsonFlatten +public class ValidationResponseInner { + /** + * Overall validation status. Possible values include: 'AllValidToProceed', + * 'InputsRevisitRequired', 'CertainInputValidationsSkipped'. + */ + @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 overall validation status. Possible values include: 'AllValidToProceed', 'InputsRevisitRequired', 'CertainInputValidationsSkipped'. + * + * @return the status value + */ + public OverallValidationStatus status() { + return this.status; + } + + /** + * Get list of response details contain validationType and its response as key and value respectively. + * + * @return the individualResponseDetails value + */ + public List individualResponseDetails() { + return this.individualResponseDetails; + } + +} diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/package-info.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/package-info.java new file mode 100644 index 0000000000000..92a244ef4a1d8 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/implementation/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for DataBoxManagementClient. + */ +package com.microsoft.azure.management.databox.implementation; diff --git a/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/package-info.java b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/package-info.java new file mode 100644 index 0000000000000..61c5f01a84515 --- /dev/null +++ b/azure-mgmt-databox/src/main/java/com/microsoft/azure/management/databox/package-info.java @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for DataBoxManagementClient. + */ +package com.microsoft.azure.management.databox;