From af4f273af57ecc921ad8076275f174b372aeed04 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 22 Nov 2022 08:57:45 +0000 Subject: [PATCH] CodeGen from PR 21625 in Azure/azure-rest-api-specs Merge 20468dbcb26733e216e282d3639035b5f352f099 into ddbdba6d960f83647257d6dc08be7b81dc5eb8f8 --- common/config/rush/pnpm-lock.yaml | 17 +- sdk/databox/arm-databox/CHANGELOG.md | 16 +- sdk/databox/arm-databox/README.md | 2 +- sdk/databox/arm-databox/_meta.json | 10 +- sdk/databox/arm-databox/package.json | 29 +- .../arm-databox/review/arm-databox.api.md | 412 +++++++------ .../src/dataBoxManagementClient.ts | 75 ++- sdk/databox/arm-databox/src/models/index.ts | 512 ++++++++++++++--- sdk/databox/arm-databox/src/models/mappers.ts | 542 ++++++++++++++++-- .../arm-databox/src/models/parameters.ts | 2 +- sdk/databox/arm-databox/test/sampleTest.ts | 39 +- sdk/databox/arm-databox/tsconfig.json | 10 +- 12 files changed, 1272 insertions(+), 394 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index dcb7c6a23092..00ea775c24e8 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3946,7 +3946,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20221118 + typescript: 5.0.0-dev.20221122 dev: false /downlevel-dts/0.8.0: @@ -8951,8 +8951,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20221118: - resolution: {integrity: sha512-qhm49ypT99QpVWeUNjsgriRvjnWHoeETIX/Xtk8AlyLDAxEJVkr0/QAurza7emkFpyOzzGt2VOIpNPOx1gCXRA==} + /typescript/5.0.0-dev.20221122: + resolution: {integrity: sha512-/QYsPv6nbBSWrKXPObtChCHpACYlPvREUopuRBqi+ULfhoxwsRqlSjzyDareF1BVAojPcJJrdgGBv+s/1RLwoA==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11515,7 +11515,7 @@ packages: dev: false file:projects/arm-databox.tgz: - resolution: {integrity: sha512-Oqk4QpNI7qVkqUzoKIO0ULE3LgI4WuSsrrl4KMq1beX4GdIOsJnIdMuTcWwFgVHtMEdIKAleMZb2f73ZdoPrYQ==, tarball: file:projects/arm-databox.tgz} + resolution: {integrity: sha512-EFhZ7r0sCTHkHWNYEA22qRqT1P6PrBVxja/ah6xSnrM7N8EmtrAScybobtGmqtJ2oY0oA0ULU9TrIwiT5Z2e7w==, tarball: file:projects/arm-databox.tgz} name: '@rush-temp/arm-databox' version: 0.0.0 dependencies: @@ -11526,6 +11526,8 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.3 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -11533,11 +11535,10 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.1 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false @@ -18136,7 +18137,7 @@ packages: dev: false file:projects/notification-hubs.tgz: - resolution: {integrity: sha512-F/F13rtiA7GpNpIPq6NEM4vYK/ZFf/QabtI/jA+Vg7C1SB2o3cPQl7oIpkgRBJx1PVsVupuOkFoswLqUfnCWxg==, tarball: file:projects/notification-hubs.tgz} + resolution: {integrity: sha512-QOCpIU9mFQu3DygIWkmyhkg44lTuX7hmKO0BD9GDHPb34MESU2Oo8xoAQmYWCxmjBU11L6mRoTYHobe+ws1/0w==, tarball: file:projects/notification-hubs.tgz} name: '@rush-temp/notification-hubs' version: 0.0.0 dependencies: @@ -18261,7 +18262,7 @@ packages: dev: false file:projects/perf-ai-language-text.tgz: - resolution: {integrity: sha512-QE8Bt92pG9RF+YJVqVmW4T2uUWCLgOGiI0iY05L6WDJLMP/JVL6oYQsS+Tw/cN55af7bBpizsMiTj6YO73KAOA==, tarball: file:projects/perf-ai-language-text.tgz} + resolution: {integrity: sha512-rHX5jgSLZQiFizDhO+TUBvGBLk59KhIPWraZoz0E8Um706f3VpFVYlZnLHZfzIpwStegucox3UJPAtlNVVDP2w==, tarball: file:projects/perf-ai-language-text.tgz} name: '@rush-temp/perf-ai-language-text' version: 0.0.0 dependencies: diff --git a/sdk/databox/arm-databox/CHANGELOG.md b/sdk/databox/arm-databox/CHANGELOG.md index 86bd3fbd23a3..7ff064ac81e9 100644 --- a/sdk/databox/arm-databox/CHANGELOG.md +++ b/sdk/databox/arm-databox/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 5.0.0 (2022-11-22) -## 5.0.0-beta.3 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 5.0.0-beta.2 (2022-04-15) - -The package of @azure/arm-databox is using our next generation design principles since version 5.0.0-beta.2, which contains breaking changes. +The package of @azure/arm-databox is using our next generation design principles since version 5.0.0, which contains breaking changes. To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). diff --git a/sdk/databox/arm-databox/README.md b/sdk/databox/arm-databox/README.md index 12beff8c004c..6e21df8ea56c 100644 --- a/sdk/databox/arm-databox/README.md +++ b/sdk/databox/arm-databox/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-databox) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-databox) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/databox/arm-databox/_meta.json b/sdk/databox/arm-databox/_meta.json index a796f10dd9fc..43f794516166 100644 --- a/sdk/databox/arm-databox/_meta.json +++ b/sdk/databox/arm-databox/_meta.json @@ -1,8 +1,8 @@ { - "commit": "e6a2296d02ec6c4b2c32479198bfbcb9b16ea247", - "readme": "specification\\databox\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\databox\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "fa44a8b770f50ad6dcb5ac2e75054698acb17b64", + "readme": "specification/databox/resource-manager/readme.md", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/databox/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/databox/arm-databox/package.json b/sdk/databox/arm-databox/package.json index 5b7518af18a7..c432da7a4fc2 100644 --- a/sdk/databox/arm-databox/package.json +++ b/sdk/databox/arm-databox/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataBoxManagementClient.", - "version": "5.0.0-beta.3", + "version": "5.0.0", "engines": { "node": ">=14.0.0" }, @@ -36,13 +36,17 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/databox/arm-databox", "repository": { @@ -93,9 +97,8 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -106,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-databox?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/databox/arm-databox/review/arm-databox.api.md b/sdk/databox/arm-databox/review/arm-databox.api.md index 14f686cf11df..fbcec68db102 100644 --- a/sdk/databox/arm-databox/review/arm-databox.api.md +++ b/sdk/databox/arm-databox/review/arm-databox.api.md @@ -39,11 +39,11 @@ export interface AddressValidationOutput { } // @public -export type AddressValidationProperties = ValidationInputResponse & { - validationType: "ValidateAddress"; - readonly validationStatus?: AddressValidationStatus; +export interface AddressValidationProperties extends ValidationInputResponse { readonly alternateAddresses?: ShippingAddress[]; -}; + readonly validationStatus?: AddressValidationStatus; + validationType: "ValidateAddress"; +} // @public export type AddressValidationStatus = "Valid" | "Invalid" | "Ambiguous"; @@ -122,6 +122,14 @@ export interface ContactDetails { phoneExtension?: string; } +// @public +export interface ContactInfo { + contactName: string; + mobile?: string; + phone: string; + phoneExtension?: string; +} + // @public export interface CopyLogDetails { copyLogDetailsType: "DataBox" | "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy"; @@ -153,31 +161,31 @@ export interface CopyProgress { export type CopyStatus = string; // @public -export type CreateJobValidations = ValidationRequest & { +export interface CreateJobValidations extends ValidationRequest { validationCategory: "JobCreationValidation"; -}; +} // @public -export type CreateOrderLimitForSubscriptionValidationRequest = ValidationInputRequest & { - validationType: "ValidateCreateOrderLimit"; +export interface CreateOrderLimitForSubscriptionValidationRequest extends ValidationInputRequest { deviceType: SkuName; -}; + validationType: "ValidateCreateOrderLimit"; +} // @public -export type CreateOrderLimitForSubscriptionValidationResponseProperties = ValidationInputResponse & { - validationType: "ValidateCreateOrderLimit"; +export interface CreateOrderLimitForSubscriptionValidationResponseProperties extends ValidationInputResponse { readonly status?: ValidationStatus; -}; + validationType: "ValidateCreateOrderLimit"; +} // @public -export type CustomerDiskJobSecrets = JobSecrets & { - jobSecretsType: "DataBoxCustomerDisk"; - readonly diskSecrets?: DiskSecret[]; +export interface CustomerDiskJobSecrets extends JobSecrets { readonly carrierAccountNumber?: string; -}; + readonly diskSecrets?: DiskSecret[]; + jobSecretsType: "DataBoxCustomerDisk"; +} // @public -export type CustomerResolutionCode = "None" | "MoveToCleanUpDevice" | "Resume"; +export type CustomerResolutionCode = "None" | "MoveToCleanUpDevice" | "Resume" | "Restart" | "ReachOutToOperation"; // @public export interface DataAccountDetails { @@ -192,49 +200,49 @@ export type DataAccountDetailsUnion = DataAccountDetails | ManagedDiskDetails | export type DataAccountType = "StorageAccount" | "ManagedDisk"; // @public -export type DataBoxAccountCopyLogDetails = CopyLogDetails & { - copyLogDetailsType: "DataBox"; +export interface DataBoxAccountCopyLogDetails extends CopyLogDetails { readonly accountName?: string; + copyLogDetailsType: "DataBox"; readonly copyLogLink?: string; readonly copyVerboseLogLink?: string; -}; +} // @public -export type DataBoxCustomerDiskCopyLogDetails = CopyLogDetails & { +export interface DataBoxCustomerDiskCopyLogDetails extends CopyLogDetails { copyLogDetailsType: "DataBoxCustomerDisk"; - readonly serialNumber?: string; readonly errorLogLink?: string; + readonly serialNumber?: string; readonly verboseLogLink?: string; -}; +} // @public -export type DataBoxCustomerDiskCopyProgress = CopyProgress & { - readonly serialNumber?: string; +export interface DataBoxCustomerDiskCopyProgress extends CopyProgress { readonly copyStatus?: CopyStatus; -}; + readonly serialNumber?: string; +} // @public -export type DataBoxCustomerDiskJobDetails = JobDetails & { - jobDetailsType: "DataBoxCustomerDisk"; - importDiskDetailsCollection?: { - [propertyName: string]: ImportDiskDetails; - }; +export interface DataBoxCustomerDiskJobDetails extends JobDetails { + readonly copyProgress?: DataBoxCustomerDiskCopyProgress[]; + readonly deliverToDcPackageDetails?: PackageCarrierInfo; + enableManifestBackup?: boolean; readonly exportDiskDetailsCollection?: { [propertyName: string]: ExportDiskDetails; }; - readonly copyProgress?: DataBoxCustomerDiskCopyProgress[]; - readonly deliverToDcPackageDetails?: PackageCarrierInfo; + importDiskDetailsCollection?: { + [propertyName: string]: ImportDiskDetails; + }; + jobDetailsType: "DataBoxCustomerDisk"; returnToCustomerPackageDetails: PackageCarrierDetails; - enableManifestBackup?: boolean; -}; +} // @public -export type DataBoxDiskCopyLogDetails = CopyLogDetails & { +export interface DataBoxDiskCopyLogDetails extends CopyLogDetails { copyLogDetailsType: "DataBoxDisk"; readonly diskSerialNumber?: string; readonly errorLogLink?: string; readonly verboseLogLink?: string; -}; +} // @public export interface DataBoxDiskCopyProgress { @@ -245,46 +253,63 @@ export interface DataBoxDiskCopyProgress { } // @public -export type DataBoxDiskJobDetails = JobDetails & { - jobDetailsType: "DataBoxDisk"; - preferredDisks?: { - [propertyName: string]: number; - }; +export interface DataBoxDiskGranularCopyLogDetails extends GranularCopyLogDetails { + readonly accountId?: string; + copyLogDetailsType: "DataBoxCustomerDisk"; + readonly errorLogLink?: string; + readonly serialNumber?: string; + readonly verboseLogLink?: string; +} + +// @public +export interface DataBoxDiskGranularCopyProgress extends GranularCopyProgress { + readonly copyStatus?: CopyStatus; + readonly serialNumber?: string; +} + +// @public +export interface DataBoxDiskJobDetails extends JobDetails { readonly copyProgress?: DataBoxDiskCopyProgress[]; readonly disksAndSizeDetails?: { [propertyName: string]: number; }; + readonly granularCopyLogDetails?: DataBoxDiskGranularCopyLogDetails[]; + readonly granularCopyProgress?: DataBoxDiskGranularCopyProgress[]; + jobDetailsType: "DataBoxDisk"; passkey?: string; -}; + preferredDisks?: { + [propertyName: string]: number; + }; +} // @public -export type DataBoxDiskJobSecrets = JobSecrets & { - jobSecretsType: "DataBoxDisk"; +export interface DataBoxDiskJobSecrets extends JobSecrets { readonly diskSecrets?: DiskSecret[]; - readonly passKey?: string; readonly isPasskeyUserDefined?: boolean; -}; + jobSecretsType: "DataBoxDisk"; + readonly passKey?: string; +} // @public -export type DataBoxHeavyAccountCopyLogDetails = CopyLogDetails & { - copyLogDetailsType: "DataBoxHeavy"; +export interface DataBoxHeavyAccountCopyLogDetails extends CopyLogDetails { readonly accountName?: string; + copyLogDetailsType: "DataBoxHeavy"; readonly copyLogLink?: string[]; readonly copyVerboseLogLink?: string[]; -}; +} // @public -export type DataBoxHeavyJobDetails = JobDetails & { - jobDetailsType: "DataBoxHeavy"; +export interface DataBoxHeavyJobDetails extends JobDetails { readonly copyProgress?: CopyProgress[]; devicePassword?: string; -}; + jobDetailsType: "DataBoxHeavy"; +} // @public -export type DataBoxHeavyJobSecrets = JobSecrets & { - jobSecretsType: "DataBoxHeavy"; +export interface DataBoxHeavyJobSecrets extends JobSecrets { readonly cabinetPodSecrets?: DataBoxHeavySecret[]; -}; + jobSecretsType: "DataBoxHeavy"; +} // @public export interface DataBoxHeavySecret { @@ -296,17 +321,17 @@ export interface DataBoxHeavySecret { } // @public -export type DataBoxJobDetails = JobDetails & { - jobDetailsType: "DataBox"; +export interface DataBoxJobDetails extends JobDetails { readonly copyProgress?: CopyProgress[]; devicePassword?: string; -}; + jobDetailsType: "DataBox"; +} // @public -export type DataboxJobSecrets = JobSecrets & { +export interface DataboxJobSecrets extends JobSecrets { jobSecretsType: "DataBox"; podSecrets?: DataBoxSecret[]; -}; +} // @public (undocumented) export class DataBoxManagementClient extends coreClient.ServiceClient { @@ -334,9 +359,9 @@ export interface DataBoxManagementClientOptionalParams extends coreClient.Servic } // @public -export type DataBoxScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { +export interface DataBoxScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { skuName: "DataBox"; -}; +} // @public export interface DataBoxSecret { @@ -348,28 +373,28 @@ export interface DataBoxSecret { } // @public -export type DatacenterAddressInstructionResponse = DatacenterAddressResponse & { - datacenterAddressType: "DatacenterAddressInstruction"; +export interface DatacenterAddressInstructionResponse extends DatacenterAddressResponse { readonly communicationInstruction?: string; -}; + datacenterAddressType: "DatacenterAddressInstruction"; +} // @public -export type DatacenterAddressLocationResponse = DatacenterAddressResponse & { - datacenterAddressType: "DatacenterAddressLocation"; - readonly contactPersonName?: string; +export interface DatacenterAddressLocationResponse extends DatacenterAddressResponse { + readonly additionalShippingInformation?: string; + readonly addressType?: string; + readonly city?: string; readonly company?: string; + readonly contactPersonName?: string; + readonly country?: string; + datacenterAddressType: "DatacenterAddressLocation"; + readonly phone?: string; + readonly phoneExtension?: string; + readonly state?: string; readonly street1?: string; readonly street2?: string; readonly street3?: string; - readonly city?: string; - readonly state?: string; readonly zip?: string; - readonly country?: string; - readonly phone?: string; - readonly phoneExtension?: string; - readonly addressType?: string; - readonly additionalShippingInformation?: string; -}; +} // @public export interface DatacenterAddressRequest { @@ -413,19 +438,19 @@ export interface DataLocationToServiceLocationMap { } // @public -export type DataTransferDetailsValidationRequest = ValidationInputRequest & { - validationType: "ValidateDataTransferDetails"; +export interface DataTransferDetailsValidationRequest extends ValidationInputRequest { dataExportDetails?: DataExportDetails[]; dataImportDetails?: DataImportDetails[]; deviceType: SkuName; transferType: TransferType; -}; + validationType: "ValidateDataTransferDetails"; +} // @public -export type DataTransferDetailsValidationResponseProperties = ValidationInputResponse & { - validationType: "ValidateDataTransferDetails"; +export interface DataTransferDetailsValidationResponseProperties extends ValidationInputResponse { readonly status?: ValidationStatus; -}; + validationType: "ValidateDataTransferDetails"; +} // @public export interface DcAccessSecurityCode { @@ -442,10 +467,16 @@ export interface Details { } // @public -export type DiskScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { - skuName: "DataBoxDisk"; +export interface DeviceErasureDetails { + readonly deviceErasureStatus?: StageStatus; + readonly erasureOrDestructionCertificateSasKey?: string; +} + +// @public +export interface DiskScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { expectedDataSizeInTeraBytes: number; -}; + skuName: "DataBoxDisk"; +} // @public export interface DiskSecret { @@ -490,9 +521,36 @@ export interface FilterFileDetails { export type FilterFileType = "AzureBlob" | "AzureFile"; // @public -export type HeavyScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { +export interface GranularCopyLogDetails { + copyLogDetailsType: "DataBoxCustomerDisk"; +} + +// @public (undocumented) +export type GranularCopyLogDetailsUnion = GranularCopyLogDetails | DataBoxDiskGranularCopyLogDetails; + +// @public +export interface GranularCopyProgress { + readonly accountId?: string; + readonly bytesProcessed?: number; + readonly dataAccountType?: DataAccountType; + readonly directoriesErroredOut?: number; + readonly filesErroredOut?: number; + readonly filesProcessed?: number; + readonly invalidDirectoriesProcessed?: number; + readonly invalidFileBytesUploaded?: number; + readonly invalidFilesProcessed?: number; + readonly isEnumerationInProgress?: boolean; + readonly renamedContainerCount?: number; + readonly storageAccountName?: string; + readonly totalBytesToProcess?: number; + readonly totalFilesToProcess?: number; + readonly transferType?: TransferType; +} + +// @public +export interface HeavyScheduleAvailabilityRequest extends ScheduleAvailabilityRequest { skuName: "DataBoxHeavy"; -}; +} // @public export interface IdentityProperties { @@ -527,6 +585,7 @@ export interface JobDetails { dataExportDetails?: DataExportDetails[]; dataImportDetails?: DataImportDetails[]; readonly deliveryPackage?: PackageShippingDetails; + readonly deviceErasureDetails?: DeviceErasureDetails; expectedDataSizeInTeraBytes?: number; jobDetailsType: "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy" | "DataBox"; readonly jobStages?: JobStages[]; @@ -535,6 +594,7 @@ export interface JobDetails { preferences?: Preferences; readonly returnPackage?: PackageShippingDetails; readonly reverseShipmentLabelSasKey?: string; + reverseShippingDetails?: ReverseShippingDetails; shippingAddress?: ShippingAddress; } @@ -542,25 +602,27 @@ export interface JobDetails { export type JobDetailsUnion = JobDetails | DataBoxCustomerDiskJobDetails | DataBoxDiskJobDetails | DataBoxHeavyJobDetails | DataBoxJobDetails; // @public -export type JobResource = Resource & { - readonly name?: string; +export interface JobResource extends Resource { + readonly cancellationReason?: string; + deliveryInfo?: JobDeliveryInfo; + deliveryType?: JobDeliveryType; + details?: JobDetailsUnion; + readonly error?: CloudError; readonly id?: string; - readonly type?: string; - readonly systemData?: SystemData; - transferType: TransferType; readonly isCancellable?: boolean; + readonly isCancellableWithoutFee?: boolean; readonly isDeletable?: boolean; - readonly isShippingAddressEditable?: boolean; readonly isPrepareToShipEnabled?: boolean; - readonly status?: StageName; + readonly isShippingAddressEditable?: boolean; + readonly name?: string; + readonly reverseShippingDetailsUpdate?: ReverseShippingDetailsEditStatus; + readonly reverseTransportPreferenceUpdate?: ReverseTransportPreferenceEditStatus; readonly startTime?: Date; - readonly error?: CloudError; - details?: JobDetailsUnion; - readonly cancellationReason?: string; - deliveryType?: JobDeliveryType; - deliveryInfo?: JobDeliveryInfo; - readonly isCancellableWithoutFee?: boolean; -}; + readonly status?: StageName; + readonly systemData?: SystemData; + transferType: TransferType; + readonly type?: string; +} // @public export interface JobResourceList { @@ -614,6 +676,11 @@ export interface JobsCreateOptionalParams extends coreClient.OperationOptions { // @public export type JobsCreateResponse = JobResource; +// @public +export interface JobsDeleteHeaders { + location?: string; +} + // @public export interface JobsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -690,6 +757,11 @@ export interface JobStages { readonly stageTime?: Date; } +// @public +export interface JobsUpdateHeaders { + location?: string; +} + // @public export interface JobsUpdateOptionalParams extends coreClient.OperationOptions { ifMatch?: string; @@ -735,105 +807,64 @@ export enum KnownCopyStatus { // @public export enum KnownDataCenterCode { - // (undocumented) AdHoc = "AdHoc", - // (undocumented) AM2 = "AM2", - // (undocumented) AMS06 = "AMS06", - // (undocumented) AMS20 = "AMS20", - // (undocumented) AUH20 = "AUH20", - // (undocumented) BJB = "BJB", - // (undocumented) + BJS20 = "BJS20", BL20 = "BL20", - // (undocumented) BL7 = "BL7", - // (undocumented) BN1 = "BN1", - // (undocumented) + BN7 = "BN7", BOM01 = "BOM01", - // (undocumented) BY1 = "BY1", - // (undocumented) BY2 = "BY2", - // (undocumented) BY21 = "BY21", - // (undocumented) BY24 = "BY24", - // (undocumented) CBR20 = "CBR20", - // (undocumented) CH1 = "CH1", - // (undocumented) CPQ02 = "CPQ02", - // (undocumented) CPQ20 = "CPQ20", - // (undocumented) CWL20 = "CWL20", - // (undocumented) CYS04 = "CYS04", - // (undocumented) DSM05 = "DSM05", - // (undocumented) + DUB07 = "DUB07", FRA22 = "FRA22", - // (undocumented) HKG20 = "HKG20", - // (undocumented) Invalid = "Invalid", - // (undocumented) JNB21 = "JNB21", - // (undocumented) JNB22 = "JNB22", - // (undocumented) LON24 = "LON24", - // (undocumented) MAA01 = "MAA01", - // (undocumented) MEL23 = "MEL23", - // (undocumented) MNZ21 = "MNZ21", - // (undocumented) MWH01 = "MWH01", - // (undocumented) ORK70 = "ORK70", - // (undocumented) + OSA02 = "OSA02", OSA20 = "OSA20", - // (undocumented) + OSA22 = "OSA22", + PAR22 = "PAR22", + PNQ01 = "PNQ01", PUS20 = "PUS20", - // (undocumented) SEL20 = "SEL20", - // (undocumented) SEL21 = "SEL21", - // (undocumented) SG2 = "SG2", - // (undocumented) SHA03 = "SHA03", - // (undocumented) SIN20 = "SIN20", - // (undocumented) SN5 = "SN5", - // (undocumented) + SN6 = "SN6", SN8 = "SN8", - // (undocumented) SSE90 = "SSE90", - // (undocumented) + SVG20 = "SVG20", SYD03 = "SYD03", - // (undocumented) SYD23 = "SYD23", - // (undocumented) TYO01 = "TYO01", - // (undocumented) TYO22 = "TYO22", - // (undocumented) YQB20 = "YQB20", - // (undocumented) YTO20 = "YTO20", - // (undocumented) YTO21 = "YTO21", - // (undocumented) ZRH20 = "ZRH20" } @@ -885,11 +916,11 @@ export interface LastMitigationActionOnJob { export type LogCollectionLevel = "Error" | "Verbose"; // @public -export type ManagedDiskDetails = DataAccountDetails & { +export interface ManagedDiskDetails extends DataAccountDetails { dataAccountType: "ManagedDisk"; resourceGroupId: string; stagingStorageAccountId: string; -}; +} // @public export interface MarkDevicesShippedRequest { @@ -983,21 +1014,23 @@ export interface PackageShippingDetails { export interface Preferences { encryptionPreferences?: EncryptionPreferences; preferredDataCenterRegion?: string[]; + reverseTransportPreferences?: TransportPreferences; + storageAccountAccessTierPreferences?: string[]; transportPreferences?: TransportPreferences; } // @public -export type PreferencesValidationRequest = ValidationInputRequest & { - validationType: "ValidatePreferences"; - preference?: Preferences; +export interface PreferencesValidationRequest extends ValidationInputRequest { deviceType: SkuName; -}; + preference?: Preferences; + validationType: "ValidatePreferences"; +} // @public -export type PreferencesValidationResponseProperties = ValidationInputResponse & { - validationType: "ValidatePreferences"; +export interface PreferencesValidationResponseProperties extends ValidationInputResponse { readonly status?: ValidationStatus; -}; + validationType: "ValidatePreferences"; +} // @public export interface RegionConfigurationRequest { @@ -1033,6 +1066,19 @@ export interface ResourceIdentity { }; } +// @public +export interface ReverseShippingDetails { + contactDetails?: ContactInfo; + readonly isUpdated?: boolean; + shippingAddress?: ShippingAddress; +} + +// @public +export type ReverseShippingDetailsEditStatus = "Enabled" | "Disabled" | "NotSupported"; + +// @public +export type ReverseTransportPreferenceEditStatus = "Enabled" | "Disabled" | "NotSupported"; + // @public export interface ScheduleAvailabilityRequest { country?: string; @@ -1154,19 +1200,19 @@ export interface Sku { } // @public -export type SkuAvailabilityValidationRequest = ValidationInputRequest & { - validationType: "ValidateSkuAvailability"; - deviceType: SkuName; - transferType: TransferType; +export interface SkuAvailabilityValidationRequest extends ValidationInputRequest { country: string; + deviceType: SkuName; location: string; -}; + transferType: TransferType; + validationType: "ValidateSkuAvailability"; +} // @public -export type SkuAvailabilityValidationResponseProperties = ValidationInputResponse & { - validationType: "ValidateSkuAvailability"; +export interface SkuAvailabilityValidationResponseProperties extends ValidationInputResponse { readonly status?: ValidationStatus; -}; + validationType: "ValidateSkuAvailability"; +} // @public export interface SkuCapacity { @@ -1189,6 +1235,7 @@ export interface SkuInformation { readonly apiVersions?: string[]; readonly capacity?: SkuCapacity; readonly costs?: SkuCost[]; + readonly countriesWithinCommerceBoundary?: string[]; readonly dataLocationToServiceLocationMap?: DataLocationToServiceLocationMap[]; readonly disabledReason?: SkuDisabledReason; readonly disabledReasonMessage?: string; @@ -1204,24 +1251,24 @@ export type SkuName = "DataBox" | "DataBoxDisk" | "DataBoxHeavy" | "DataBoxCusto export type StageName = string; // @public -export type StageStatus = "None" | "InProgress" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "SucceededWithErrors" | "WaitingForCustomerAction" | "SucceededWithWarnings" | "WaitingForCustomerActionForKek" | "WaitingForCustomerActionForCleanUp" | "CustomerActionPerformedForCleanUp"; +export type StageStatus = "None" | "InProgress" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "SucceededWithErrors" | "WaitingForCustomerAction" | "SucceededWithWarnings" | "WaitingForCustomerActionForKek" | "WaitingForCustomerActionForCleanUp" | "CustomerActionPerformedForCleanUp" | "CustomerActionPerformed"; // @public -export type StorageAccountDetails = DataAccountDetails & { +export interface StorageAccountDetails extends DataAccountDetails { dataAccountType: "StorageAccount"; storageAccountId: string; -}; +} // @public -export type SubscriptionIsAllowedToCreateJobValidationRequest = ValidationInputRequest & { +export interface SubscriptionIsAllowedToCreateJobValidationRequest extends ValidationInputRequest { validationType: "ValidateSubscriptionIsAllowedToCreateJob"; -}; +} // @public -export type SubscriptionIsAllowedToCreateJobValidationResponseProperties = ValidationInputResponse & { - validationType: "ValidateSubscriptionIsAllowedToCreateJob"; +export interface SubscriptionIsAllowedToCreateJobValidationResponseProperties extends ValidationInputResponse { readonly status?: ValidationStatus; -}; + validationType: "ValidateSubscriptionIsAllowedToCreateJob"; +} // @public export interface SystemData { @@ -1288,6 +1335,7 @@ export interface TransportAvailabilityResponse { // @public export interface TransportPreferences { + readonly isUpdated?: boolean; preferredShipmentType: TransportShipmentTypes; } @@ -1310,7 +1358,9 @@ export interface UnencryptedCredentialsList { export interface UpdateJobDetails { contactDetails?: ContactDetails; keyEncryptionKey?: KeyEncryptionKey; + preferences?: Preferences; returnToCustomerPackageDetails?: PackageCarrierDetails; + reverseShippingDetails?: ReverseShippingDetails; shippingAddress?: ShippingAddress; } @@ -1326,12 +1376,12 @@ export interface UserAssignedProperties { } // @public -export type ValidateAddress = ValidationInputRequest & { - validationType: "ValidateAddress"; - shippingAddress: ShippingAddress; +export interface ValidateAddress extends ValidationInputRequest { deviceType: SkuName; + shippingAddress: ShippingAddress; transportPreferences?: TransportPreferences; -}; + validationType: "ValidateAddress"; +} // @public export type ValidationInputDiscriminator = "ValidateAddress" | "ValidateSubscriptionIsAllowedToCreateJob" | "ValidatePreferences" | "ValidateCreateOrderLimit" | "ValidateSkuAvailability" | "ValidateDataTransferDetails"; diff --git a/sdk/databox/arm-databox/src/dataBoxManagementClient.ts b/sdk/databox/arm-databox/src/dataBoxManagementClient.ts index d87068de3356..27af2bb78e66 100644 --- a/sdk/databox/arm-databox/src/dataBoxManagementClient.ts +++ b/sdk/databox/arm-databox/src/dataBoxManagementClient.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, JobsImpl, ServiceImpl } from "./operations"; import { Operations, Jobs, Service } from "./operationsInterfaces"; @@ -51,7 +56,7 @@ export class DataBoxManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-databox/5.0.0-beta.3`; + const packageDetails = `azsdk-js-arm-databox/5.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -71,37 +76,73 @@ export class DataBoxManagementClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-08-01-preview"; + this.apiVersion = options.apiVersion || "2022-09-01"; this.operations = new OperationsImpl(this); this.jobs = new JobsImpl(this); this.service = new ServiceImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } /** diff --git a/sdk/databox/arm-databox/src/models/index.ts b/sdk/databox/arm-databox/src/models/index.ts index 1786edc46313..97751c270103 100644 --- a/sdk/databox/arm-databox/src/models/index.ts +++ b/sdk/databox/arm-databox/src/models/index.ts @@ -56,6 +56,9 @@ export type ScheduleAvailabilityRequestUnion = | DataBoxScheduleAvailabilityRequest | DiskScheduleAvailabilityRequest | HeavyScheduleAvailabilityRequest; +export type GranularCopyLogDetailsUnion = + | GranularCopyLogDetails + | DataBoxDiskGranularCopyLogDetails; /** Operation Collection. */ export interface OperationList { @@ -130,32 +133,32 @@ export interface JobResourceList { nextLink?: string; } -/** Cloud error. */ +/** Provides additional information about an http error response. */ export interface CloudError { - /** Cloud error code. */ - code?: string; - /** Cloud error message. */ - message?: string; - /** Cloud error target. */ - target?: string; /** - * Cloud error details. + * Gets or sets additional error info. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly details?: CloudError[]; + readonly additionalInfo?: AdditionalErrorInfo[]; + /** Error code. */ + code?: string; /** - * Cloud error additional info. + * Gets or sets details for the error. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly additionalInfo?: AdditionalErrorInfo[]; + readonly details?: CloudError[]; + /** The error message parsed from the body of the http error response. */ + message?: string; + /** Gets or sets the target of the error. */ + target?: string; } -/** Additional error info. */ +/** This class represents additional info which Resource Providers pass when an error occurs. */ export interface AdditionalErrorInfo { - /** Additional error type. */ - type?: string; - /** Additional error info. */ + /** Additional information of the type of error. */ info?: Record; + /** Type of error (e.g. CustomerIntervention, PolicyViolation, SecurityViolation). */ + type?: string; } /** Job details. */ @@ -191,6 +194,8 @@ export interface JobDetails { dataExportDetails?: DataExportDetails[]; /** Preferences for the order. */ preferences?: Preferences; + /** Optional Reverse Shipping details for order. */ + reverseShippingDetails?: ReverseShippingDetails; /** * List of copy log details. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -206,6 +211,11 @@ export interface JobDetails { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly chainOfCustodySasKey?: string; + /** + * Holds device data erasure details + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deviceErasureDetails?: DeviceErasureDetails; /** Details about which key encryption type is being used. */ keyEncryptionKey?: KeyEncryptionKey; /** The expected size of the data, which needs to be transferred in this job, in terabytes. */ @@ -432,14 +442,23 @@ export interface Preferences { preferredDataCenterRegion?: string[]; /** Preferences related to the shipment logistics of the sku. */ transportPreferences?: TransportPreferences; + /** Optional Preferences related to the reverse shipment logistics of the sku. */ + reverseTransportPreferences?: TransportPreferences; /** Preferences related to the Encryption. */ encryptionPreferences?: EncryptionPreferences; + /** Preferences related to the Access Tier of storage accounts. */ + storageAccountAccessTierPreferences?: string[]; } /** Preferences related to the shipment logistics of the sku */ export interface TransportPreferences { /** Indicates Shipment Logistics type that the customer preferred. */ preferredShipmentType: TransportShipmentTypes; + /** + * Read only property which indicates whether transport preferences has been updated or not after device is prepared. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isUpdated?: boolean; } /** Preferences related to the Encryption. */ @@ -448,6 +467,32 @@ export interface EncryptionPreferences { doubleEncryption?: DoubleEncryption; } +/** Reverse Shipping Address and contact details for a job. */ +export interface ReverseShippingDetails { + /** Contact Info. */ + contactDetails?: ContactInfo; + /** Shipping address where customer wishes to receive the device. */ + shippingAddress?: ShippingAddress; + /** + * A flag to indicate whether Reverse Shipping details are updated or not after device has been prepared. + * Read only field + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isUpdated?: boolean; +} + +/** Contact Info. */ +export interface ContactInfo { + /** Contact name of the person. */ + contactName: string; + /** Phone number of the contact person. */ + phone: string; + /** Phone extension number of the contact person. */ + phoneExtension?: string; + /** Mobile number of the contact person. */ + mobile?: string; +} + /** Details for log generated during copy. */ export interface CopyLogDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -458,6 +503,20 @@ export interface CopyLogDetails { | "DataBoxHeavy"; } +/** Device erasure details with erasure completion status and erasureordestructionlog sas key */ +export interface DeviceErasureDetails { + /** + * Holds the device erasure completion status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deviceErasureStatus?: StageStatus; + /** + * Shared access key to download cleanup or destruction certificate for device + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly erasureOrDestructionCertificateSasKey?: string; +} + /** Encryption key containing details about key to encrypt different keys. */ export interface KeyEncryptionKey { /** Type of encryption key used for key encryption. */ @@ -699,6 +758,11 @@ export interface SkuInformation { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly requiredFeature?: string; + /** + * List of all the Countries in the SKU specific commerce boundary + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly countriesWithinCommerceBoundary?: string[]; } /** Map of data location to service location */ @@ -836,6 +900,10 @@ export interface UpdateJobDetails { contactDetails?: ContactDetails; /** Shipping address of the customer. */ shippingAddress?: ShippingAddress; + /** Reverse Shipping Address and contact details for a job. */ + reverseShippingDetails?: ReverseShippingDetails; + /** Preferences related to the order */ + preferences?: Preferences; /** Key encryption key for the job. */ keyEncryptionKey?: KeyEncryptionKey; /** Return package details of job. */ @@ -1098,6 +1166,12 @@ export interface ArmBaseObject { readonly type?: string; } +/** Granular Details for log generated during copy. */ +export interface GranularCopyLogDetails { + /** Polymorphic discriminator, which specifies the different types this object can be */ + copyLogDetailsType: "DataBoxCustomerDisk"; +} + /** Copy progress. */ export interface CopyProgress { /** @@ -1178,6 +1252,86 @@ export interface CopyProgress { readonly isEnumerationInProgress?: boolean; } +/** Granular Copy progress. */ +export interface GranularCopyProgress { + /** + * Name of the storage account. This will be empty for data account types other than storage account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageAccountName?: string; + /** + * Transfer type of data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly transferType?: TransferType; + /** + * Data Account Type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataAccountType?: DataAccountType; + /** + * Id of the account where the data needs to be uploaded. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accountId?: string; + /** + * To indicate bytes transferred. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly bytesProcessed?: number; + /** + * Total amount of data to be processed by the job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalBytesToProcess?: number; + /** + * Number of files processed + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly filesProcessed?: number; + /** + * Total files to process + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalFilesToProcess?: number; + /** + * Number of files not adhering to azure naming conventions which were processed by automatic renaming + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly invalidFilesProcessed?: number; + /** + * Total amount of data not adhering to azure naming conventions which were processed by automatic renaming + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly invalidFileBytesUploaded?: number; + /** + * Number of folders not adhering to azure naming conventions which were processed by automatic renaming + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly renamedContainerCount?: number; + /** + * Number of files which could not be copied + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly filesErroredOut?: number; + /** + * To indicate directories errored out in the job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly directoriesErroredOut?: number; + /** + * To indicate directories renamed + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly invalidDirectoriesProcessed?: number; + /** + * To indicate if enumeration of data is in progress. + * Until this is true, the TotalBytesToProcess may not be valid. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isEnumerationInProgress?: boolean; +} + /** Import disk details */ export interface ImportDiskDetails { /** The relative path of the manifest file on the disk. */ @@ -1309,7 +1463,7 @@ export interface DataBoxSecret { } /** Customer disk job details. */ -export type DataBoxCustomerDiskJobDetails = JobDetails & { +export interface DataBoxCustomerDiskJobDetails extends JobDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ jobDetailsType: "DataBoxCustomerDisk"; /** Contains the map of disk serial number to the disk details for import jobs. */ @@ -1335,10 +1489,10 @@ export type DataBoxCustomerDiskJobDetails = JobDetails & { returnToCustomerPackageDetails: PackageCarrierDetails; /** Flag to indicate if disk manifest should be backed-up in the Storage Account. */ enableManifestBackup?: boolean; -}; +} /** DataBox Disk Job Details. */ -export type DataBoxDiskJobDetails = JobDetails & { +export interface DataBoxDiskJobDetails extends JobDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ jobDetailsType: "DataBoxDisk"; /** 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. */ @@ -1348,6 +1502,16 @@ export type DataBoxDiskJobDetails = JobDetails & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly copyProgress?: DataBoxDiskCopyProgress[]; + /** + * Copy progress per disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly granularCopyProgress?: DataBoxDiskGranularCopyProgress[]; + /** + * Copy progress per disk. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly granularCopyLogDetails?: DataBoxDiskGranularCopyLogDetails[]; /** * 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. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1355,10 +1519,10 @@ export type DataBoxDiskJobDetails = JobDetails & { readonly disksAndSizeDetails?: { [propertyName: string]: number }; /** User entered passkey for DataBox Disk job. */ passkey?: string; -}; +} /** Databox Heavy Device Job Details */ -export type DataBoxHeavyJobDetails = JobDetails & { +export interface DataBoxHeavyJobDetails extends JobDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ jobDetailsType: "DataBoxHeavy"; /** @@ -1368,10 +1532,10 @@ export type DataBoxHeavyJobDetails = JobDetails & { readonly copyProgress?: 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 : @#\-$%^!+=;:_()]+ */ devicePassword?: string; -}; +} /** Databox Job Details */ -export type DataBoxJobDetails = JobDetails & { +export interface DataBoxJobDetails extends JobDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ jobDetailsType: "DataBox"; /** @@ -1381,28 +1545,28 @@ export type DataBoxJobDetails = JobDetails & { readonly copyProgress?: 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 : @#\-$%^!+=;:_()]+ */ devicePassword?: string; -}; +} /** Details of the managed disks. */ -export type ManagedDiskDetails = DataAccountDetails & { +export interface ManagedDiskDetails extends DataAccountDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ dataAccountType: "ManagedDisk"; /** Resource Group Id of the compute disks. */ resourceGroupId: string; /** Resource Id of the storage account that can be used to copy the vhd for staging. */ stagingStorageAccountId: string; -}; +} /** Details for the storage account. */ -export type StorageAccountDetails = DataAccountDetails & { +export interface StorageAccountDetails extends DataAccountDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ dataAccountType: "StorageAccount"; /** Storage Account Resource Id. */ storageAccountId: string; -}; +} /** Copy log details for a storage account of a DataBox job */ -export type DataBoxAccountCopyLogDetails = CopyLogDetails & { +export interface DataBoxAccountCopyLogDetails extends CopyLogDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ copyLogDetailsType: "DataBox"; /** @@ -1420,10 +1584,10 @@ export type DataBoxAccountCopyLogDetails = CopyLogDetails & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly copyVerboseLogLink?: string; -}; +} /** Copy Log Details for customer disk */ -export type DataBoxCustomerDiskCopyLogDetails = CopyLogDetails & { +export interface DataBoxCustomerDiskCopyLogDetails extends CopyLogDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ copyLogDetailsType: "DataBoxCustomerDisk"; /** @@ -1441,10 +1605,10 @@ export type DataBoxCustomerDiskCopyLogDetails = CopyLogDetails & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly verboseLogLink?: string; -}; +} /** Copy Log Details for a disk */ -export type DataBoxDiskCopyLogDetails = CopyLogDetails & { +export interface DataBoxDiskCopyLogDetails extends CopyLogDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ copyLogDetailsType: "DataBoxDisk"; /** @@ -1462,10 +1626,10 @@ export type DataBoxDiskCopyLogDetails = CopyLogDetails & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly verboseLogLink?: string; -}; +} /** Copy log details for a storage account for Databox heavy */ -export type DataBoxHeavyAccountCopyLogDetails = CopyLogDetails & { +export interface DataBoxHeavyAccountCopyLogDetails extends CopyLogDetails { /** Polymorphic discriminator, which specifies the different types this object can be */ copyLogDetailsType: "DataBoxHeavy"; /** @@ -1483,10 +1647,11 @@ export type DataBoxHeavyAccountCopyLogDetails = CopyLogDetails & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly copyVerboseLogLink?: string[]; -}; +} /** Datacenter instruction for given storage location. */ -export type DatacenterAddressInstructionResponse = DatacenterAddressResponse & { +export interface DatacenterAddressInstructionResponse + extends DatacenterAddressResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ datacenterAddressType: "DatacenterAddressInstruction"; /** @@ -1494,10 +1659,11 @@ export type DatacenterAddressInstructionResponse = DatacenterAddressResponse & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly communicationInstruction?: string; -}; +} /** Datacenter address for given storage location. */ -export type DatacenterAddressLocationResponse = DatacenterAddressResponse & { +export interface DatacenterAddressLocationResponse + extends DatacenterAddressResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ datacenterAddressType: "DatacenterAddressLocation"; /** @@ -1565,10 +1731,10 @@ export type DatacenterAddressLocationResponse = DatacenterAddressResponse & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly additionalShippingInformation?: string; -}; +} /** Job Resource. */ -export type JobResource = Resource & { +export interface JobResource extends Resource { /** * Name of the object. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1606,6 +1772,16 @@ export type JobResource = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isShippingAddressEditable?: boolean; + /** + * The Editable status for Reverse Shipping Address and Contact Info + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reverseShippingDetailsUpdate?: ReverseShippingDetailsEditStatus; + /** + * The Editable status for Reverse Transport preferences + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly reverseTransportPreferenceUpdate?: ReverseTransportPreferenceEditStatus; /** * Is Prepare To Ship Enabled on this job * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1642,10 +1818,10 @@ export type JobResource = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isCancellableWithoutFee?: boolean; -}; +} /** The requirements to validate customer address where the device needs to be shipped. */ -export type ValidateAddress = ValidationInputRequest & { +export interface ValidateAddress extends ValidationInputRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateAddress"; /** Shipping address of the customer. */ @@ -1654,18 +1830,20 @@ export type ValidateAddress = ValidationInputRequest & { deviceType: SkuName; /** Preferences related to the shipment logistics of the sku. */ transportPreferences?: TransportPreferences; -}; +} /** Request to validate create order limit for current subscription. */ -export type CreateOrderLimitForSubscriptionValidationRequest = ValidationInputRequest & { +export interface CreateOrderLimitForSubscriptionValidationRequest + extends ValidationInputRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateCreateOrderLimit"; /** Device type to be used for the job. */ deviceType: SkuName; -}; +} /** Request to validate export and import data details. */ -export type DataTransferDetailsValidationRequest = ValidationInputRequest & { +export interface DataTransferDetailsValidationRequest + extends ValidationInputRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateDataTransferDetails"; /** List of DataTransfer details to be used to export data from azure. */ @@ -1676,20 +1854,21 @@ export type DataTransferDetailsValidationRequest = ValidationInputRequest & { deviceType: SkuName; /** Type of the transfer. */ transferType: TransferType; -}; +} /** Request to validate preference of transport and data center. */ -export type PreferencesValidationRequest = ValidationInputRequest & { +export interface PreferencesValidationRequest extends ValidationInputRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidatePreferences"; /** Preference of transport and data center. */ preference?: Preferences; /** Device type to be used for the job. */ deviceType: SkuName; -}; +} /** Request to validate sku availability. */ -export type SkuAvailabilityValidationRequest = ValidationInputRequest & { +export interface SkuAvailabilityValidationRequest + extends ValidationInputRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateSkuAvailability"; /** Device type to be used for the job. */ @@ -1700,16 +1879,17 @@ export type SkuAvailabilityValidationRequest = ValidationInputRequest & { country: string; /** Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ location: string; -}; +} /** Request to validate subscription permission to create jobs. */ -export type SubscriptionIsAllowedToCreateJobValidationRequest = ValidationInputRequest & { +export interface SubscriptionIsAllowedToCreateJobValidationRequest + extends ValidationInputRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateSubscriptionIsAllowedToCreateJob"; -}; +} /** The address validation output. */ -export type AddressValidationProperties = ValidationInputResponse & { +export interface AddressValidationProperties extends ValidationInputResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateAddress"; /** @@ -1722,10 +1902,11 @@ export type AddressValidationProperties = ValidationInputResponse & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly alternateAddresses?: ShippingAddress[]; -}; +} /** Properties of create order limit for subscription validation response. */ -export type CreateOrderLimitForSubscriptionValidationResponseProperties = ValidationInputResponse & { +export interface CreateOrderLimitForSubscriptionValidationResponseProperties + extends ValidationInputResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateCreateOrderLimit"; /** @@ -1733,10 +1914,11 @@ export type CreateOrderLimitForSubscriptionValidationResponseProperties = Valida * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: ValidationStatus; -}; +} /** Properties of data transfer details validation response. */ -export type DataTransferDetailsValidationResponseProperties = ValidationInputResponse & { +export interface DataTransferDetailsValidationResponseProperties + extends ValidationInputResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateDataTransferDetails"; /** @@ -1744,10 +1926,11 @@ export type DataTransferDetailsValidationResponseProperties = ValidationInputRes * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: ValidationStatus; -}; +} /** Properties of data center and transport preference validation response. */ -export type PreferencesValidationResponseProperties = ValidationInputResponse & { +export interface PreferencesValidationResponseProperties + extends ValidationInputResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidatePreferences"; /** @@ -1755,10 +1938,11 @@ export type PreferencesValidationResponseProperties = ValidationInputResponse & * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: ValidationStatus; -}; +} /** Properties of sku availability validation response. */ -export type SkuAvailabilityValidationResponseProperties = ValidationInputResponse & { +export interface SkuAvailabilityValidationResponseProperties + extends ValidationInputResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateSkuAvailability"; /** @@ -1766,10 +1950,11 @@ export type SkuAvailabilityValidationResponseProperties = ValidationInputRespons * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: ValidationStatus; -}; +} /** Properties of subscription permission to create job validation response. */ -export type SubscriptionIsAllowedToCreateJobValidationResponseProperties = ValidationInputResponse & { +export interface SubscriptionIsAllowedToCreateJobValidationResponseProperties + extends ValidationInputResponse { /** Polymorphic discriminator, which specifies the different types this object can be */ validationType: "ValidateSubscriptionIsAllowedToCreateJob"; /** @@ -1777,16 +1962,16 @@ export type SubscriptionIsAllowedToCreateJobValidationResponseProperties = Valid * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: ValidationStatus; -}; +} /** It does all pre-job creation validations. */ -export type CreateJobValidations = ValidationRequest & { +export interface CreateJobValidations extends ValidationRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ validationCategory: "JobCreationValidation"; -}; +} /** The secrets related to customer disk job. */ -export type CustomerDiskJobSecrets = JobSecrets & { +export interface CustomerDiskJobSecrets extends JobSecrets { /** Polymorphic discriminator, which specifies the different types this object can be */ jobSecretsType: "DataBoxCustomerDisk"; /** @@ -1799,10 +1984,10 @@ export type CustomerDiskJobSecrets = JobSecrets & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly carrierAccountNumber?: string; -}; +} /** The secrets related to disk job. */ -export type DataBoxDiskJobSecrets = JobSecrets & { +export interface DataBoxDiskJobSecrets extends JobSecrets { /** Polymorphic discriminator, which specifies the different types this object can be */ jobSecretsType: "DataBoxDisk"; /** @@ -1820,10 +2005,10 @@ export type DataBoxDiskJobSecrets = JobSecrets & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isPasskeyUserDefined?: boolean; -}; +} /** The secrets related to a databox heavy job. */ -export type DataBoxHeavyJobSecrets = JobSecrets & { +export interface DataBoxHeavyJobSecrets extends JobSecrets { /** Polymorphic discriminator, which specifies the different types this object can be */ jobSecretsType: "DataBoxHeavy"; /** @@ -1831,38 +2016,68 @@ export type DataBoxHeavyJobSecrets = JobSecrets & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly cabinetPodSecrets?: DataBoxHeavySecret[]; -}; +} /** The secrets related to a databox job. */ -export type DataboxJobSecrets = JobSecrets & { +export interface DataboxJobSecrets extends JobSecrets { /** Polymorphic discriminator, which specifies the different types this object can be */ jobSecretsType: "DataBox"; /** Contains the list of secret objects for a job. */ podSecrets?: DataBoxSecret[]; -}; +} /** Request body to get the availability for scheduling data box orders orders. */ -export type DataBoxScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { +export interface DataBoxScheduleAvailabilityRequest + extends ScheduleAvailabilityRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ skuName: "DataBox"; -}; +} /** Request body to get the availability for scheduling disk orders. */ -export type DiskScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { +export interface DiskScheduleAvailabilityRequest + extends ScheduleAvailabilityRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ skuName: "DataBoxDisk"; /** The expected size of the data, which needs to be transferred in this job, in terabytes. */ expectedDataSizeInTeraBytes: number; -}; +} /** Request body to get the availability for scheduling heavy orders. */ -export type HeavyScheduleAvailabilityRequest = ScheduleAvailabilityRequest & { +export interface HeavyScheduleAvailabilityRequest + extends ScheduleAvailabilityRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ skuName: "DataBoxHeavy"; -}; +} + +/** Granular Copy Log Details for customer disk */ +export interface DataBoxDiskGranularCopyLogDetails + extends GranularCopyLogDetails { + /** Polymorphic discriminator, which specifies the different types this object can be */ + copyLogDetailsType: "DataBoxCustomerDisk"; + /** + * Disk Serial Number. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serialNumber?: string; + /** + * Account id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accountId?: string; + /** + * Link for copy error logs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorLogLink?: string; + /** + * Link for copy verbose logs. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly verboseLogLink?: string; +} /** DataBox CustomerDisk Copy Progress */ -export type DataBoxCustomerDiskCopyProgress = CopyProgress & { +export interface DataBoxCustomerDiskCopyProgress extends CopyProgress { /** * Disk Serial Number. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1873,7 +2088,33 @@ export type DataBoxCustomerDiskCopyProgress = CopyProgress & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly copyStatus?: CopyStatus; -}; +} + +/** DataBox Disk Granular Copy Progress */ +export interface DataBoxDiskGranularCopyProgress extends GranularCopyProgress { + /** + * Disk Serial Number. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serialNumber?: string; + /** + * The Status of the copy + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly copyStatus?: CopyStatus; +} + +/** Defines headers for Jobs_delete operation. */ +export interface JobsDeleteHeaders { + /** The URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for Jobs_update operation. */ +export interface JobsUpdateHeaders { + /** The URI to poll for completion status. */ + location?: string; +} /** Known values of {@link StageName} that the service accepts. */ export enum KnownStageName { @@ -1988,56 +2229,124 @@ export type NotificationStageName = string; /** Known values of {@link DataCenterCode} that the service accepts. */ export enum KnownDataCenterCode { + /** Invalid */ Invalid = "Invalid", + /** BY2 */ BY2 = "BY2", + /** BY1 */ BY1 = "BY1", + /** ORK70 */ ORK70 = "ORK70", + /** AM2 */ AM2 = "AM2", + /** AMS20 */ AMS20 = "AMS20", + /** BY21 */ BY21 = "BY21", + /** BY24 */ BY24 = "BY24", + /** MWH01 */ MWH01 = "MWH01", + /** AMS06 */ AMS06 = "AMS06", + /** SSE90 */ SSE90 = "SSE90", + /** SYD03 */ SYD03 = "SYD03", + /** SYD23 */ SYD23 = "SYD23", + /** CBR20 */ CBR20 = "CBR20", + /** YTO20 */ YTO20 = "YTO20", + /** CWL20 */ CWL20 = "CWL20", + /** LON24 */ LON24 = "LON24", + /** BOM01 */ BOM01 = "BOM01", + /** BL20 */ BL20 = "BL20", + /** BL7 */ BL7 = "BL7", + /** SEL20 */ SEL20 = "SEL20", + /** TYO01 */ TYO01 = "TYO01", + /** BN1 */ BN1 = "BN1", + /** SN5 */ SN5 = "SN5", + /** CYS04 */ CYS04 = "CYS04", + /** TYO22 */ TYO22 = "TYO22", + /** YTO21 */ YTO21 = "YTO21", + /** YQB20 */ YQB20 = "YQB20", + /** FRA22 */ FRA22 = "FRA22", + /** MAA01 */ MAA01 = "MAA01", + /** CPQ02 */ CPQ02 = "CPQ02", + /** CPQ20 */ CPQ20 = "CPQ20", + /** SIN20 */ SIN20 = "SIN20", + /** HKG20 */ HKG20 = "HKG20", + /** SG2 */ SG2 = "SG2", + /** MEL23 */ MEL23 = "MEL23", + /** SEL21 */ SEL21 = "SEL21", + /** OSA20 */ OSA20 = "OSA20", + /** SHA03 */ SHA03 = "SHA03", + /** BJB */ BJB = "BJB", + /** JNB22 */ JNB22 = "JNB22", + /** JNB21 */ JNB21 = "JNB21", + /** MNZ21 */ MNZ21 = "MNZ21", + /** SN8 */ SN8 = "SN8", + /** AUH20 */ AUH20 = "AUH20", + /** ZRH20 */ ZRH20 = "ZRH20", + /** PUS20 */ PUS20 = "PUS20", + /** AdHoc */ AdHoc = "AdHoc", + /** CH1 */ CH1 = "CH1", - DSM05 = "DSM05" + /** DSM05 */ + DSM05 = "DSM05", + /** DUB07 */ + DUB07 = "DUB07", + /** PNQ01 */ + PNQ01 = "PNQ01", + /** SVG20 */ + SVG20 = "SVG20", + /** OSA02 */ + OSA02 = "OSA02", + /** OSA22 */ + OSA22 = "OSA22", + /** PAR22 */ + PAR22 = "PAR22", + /** BN7 */ + BN7 = "BN7", + /** SN6 */ + SN6 = "SN6", + /** BJS20 */ + BJS20 = "BJS20" } /** @@ -2094,7 +2403,16 @@ export enum KnownDataCenterCode { * **PUS20** \ * **AdHoc** \ * **CH1** \ - * **DSM05** + * **DSM05** \ + * **DUB07** \ + * **PNQ01** \ + * **SVG20** \ + * **OSA02** \ + * **OSA22** \ + * **PAR22** \ + * **BN7** \ + * **SN6** \ + * **BJS20** */ export type DataCenterCode = string; @@ -2134,7 +2452,7 @@ export enum KnownCopyStatus { DriveNotDetected = "DriveNotDetected", /** Copy failed due to corrupted drive. */ DriveCorrupted = "DriveCorrupted", - /** Copy failed due to modified or removed metadata files. */ + /** Copy failed due to modified or removed metadata files. */ MetadataFilesModifiedOrRemoved = "MetadataFilesModifiedOrRemoved" } @@ -2160,11 +2478,21 @@ export enum KnownCopyStatus { * **OtherUserError**: Copy failed due to user error. \ * **DriveNotDetected**: Copy failed due to disk detection error. \ * **DriveCorrupted**: Copy failed due to corrupted drive. \ - * **MetadataFilesModifiedOrRemoved**: Copy failed due to modified or removed metadata files. + * **MetadataFilesModifiedOrRemoved**: Copy failed due to modified or removed metadata files. */ export type CopyStatus = string; /** Defines values for TransferType. */ export type TransferType = "ImportToAzure" | "ExportFromAzure"; +/** Defines values for ReverseShippingDetailsEditStatus. */ +export type ReverseShippingDetailsEditStatus = + | "Enabled" + | "Disabled" + | "NotSupported"; +/** Defines values for ReverseTransportPreferenceEditStatus. */ +export type ReverseTransportPreferenceEditStatus = + | "Enabled" + | "Disabled" + | "NotSupported"; /** Defines values for StageStatus. */ export type StageStatus = | "None" @@ -2178,7 +2506,8 @@ export type StageStatus = | "SucceededWithWarnings" | "WaitingForCustomerActionForKek" | "WaitingForCustomerActionForCleanUp" - | "CustomerActionPerformedForCleanUp"; + | "CustomerActionPerformedForCleanUp" + | "CustomerActionPerformed"; /** Defines values for AddressType. */ export type AddressType = "None" | "Residential" | "Commercial"; /** Defines values for DataAccountType. */ @@ -2202,7 +2531,12 @@ export type DoubleEncryption = "Enabled" | "Disabled"; /** Defines values for KekType. */ export type KekType = "MicrosoftManaged" | "CustomerManaged"; /** Defines values for CustomerResolutionCode. */ -export type CustomerResolutionCode = "None" | "MoveToCleanUpDevice" | "Resume"; +export type CustomerResolutionCode = + | "None" + | "MoveToCleanUpDevice" + | "Resume" + | "Restart" + | "ReachOutToOperation"; /** Defines values for DatacenterAddressType. */ export type DatacenterAddressType = | "DatacenterAddressLocation" diff --git a/sdk/databox/arm-databox/src/models/mappers.ts b/sdk/databox/arm-databox/src/models/mappers.ts index a48a105ad0ce..013c185fb801 100644 --- a/sdk/databox/arm-databox/src/models/mappers.ts +++ b/sdk/databox/arm-databox/src/models/mappers.ts @@ -225,20 +225,21 @@ export const CloudError: coreClient.CompositeMapper = { name: "Composite", className: "CloudError", modelProperties: { - code: { - serializedName: "code", - type: { - name: "String" - } - }, - message: { - serializedName: "message", + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AdditionalErrorInfo" + } + } } }, - target: { - serializedName: "target", + code: { + serializedName: "code", type: { name: "String" } @@ -256,17 +257,16 @@ export const CloudError: coreClient.CompositeMapper = { } } }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, + message: { + serializedName: "message", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdditionalErrorInfo" - } - } + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" } } } @@ -278,18 +278,18 @@ export const AdditionalErrorInfo: coreClient.CompositeMapper = { name: "Composite", className: "AdditionalErrorInfo", modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, info: { serializedName: "info", type: { name: "Dictionary", value: { type: { name: "any" } } } + }, + type: { + serializedName: "type", + type: { + name: "String" + } } } } @@ -390,6 +390,13 @@ export const JobDetails: coreClient.CompositeMapper = { className: "Preferences" } }, + reverseShippingDetails: { + serializedName: "reverseShippingDetails", + type: { + name: "Composite", + className: "ReverseShippingDetails" + } + }, copyLogDetails: { serializedName: "copyLogDetails", readOnly: true, @@ -417,6 +424,13 @@ export const JobDetails: coreClient.CompositeMapper = { name: "String" } }, + deviceErasureDetails: { + serializedName: "deviceErasureDetails", + type: { + name: "Composite", + className: "DeviceErasureDetails" + } + }, keyEncryptionKey: { serializedName: "keyEncryptionKey", type: { @@ -438,7 +452,13 @@ export const JobDetails: coreClient.CompositeMapper = { element: { type: { name: "Enum", - allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume", + "Restart", + "ReachOutToOperation" + ] } } } @@ -504,7 +524,8 @@ export const JobStages: coreClient.CompositeMapper = { "SucceededWithWarnings", "WaitingForCustomerActionForKek", "WaitingForCustomerActionForCleanUp", - "CustomerActionPerformedForCleanUp" + "CustomerActionPerformedForCleanUp", + "CustomerActionPerformed" ] } }, @@ -1060,12 +1081,32 @@ export const Preferences: coreClient.CompositeMapper = { className: "TransportPreferences" } }, + reverseTransportPreferences: { + serializedName: "reverseTransportPreferences", + type: { + name: "Composite", + className: "TransportPreferences" + } + }, encryptionPreferences: { serializedName: "encryptionPreferences", type: { name: "Composite", className: "EncryptionPreferences" } + }, + storageAccountAccessTierPreferences: { + serializedName: "storageAccountAccessTierPreferences", + type: { + name: "Sequence", + element: { + defaultValue: "Archive", + isConstant: true, + type: { + name: "String" + } + } + } } } } @@ -1083,6 +1124,13 @@ export const TransportPreferences: coreClient.CompositeMapper = { name: "Enum", allowedValues: ["CustomerManaged", "MicrosoftManaged"] } + }, + isUpdated: { + serializedName: "isUpdated", + readOnly: true, + type: { + name: "Boolean" + } } } } @@ -1105,6 +1153,77 @@ export const EncryptionPreferences: coreClient.CompositeMapper = { } }; +export const ReverseShippingDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReverseShippingDetails", + modelProperties: { + contactDetails: { + serializedName: "contactDetails", + type: { + name: "Composite", + className: "ContactInfo" + } + }, + shippingAddress: { + serializedName: "shippingAddress", + type: { + name: "Composite", + className: "ShippingAddress" + } + }, + isUpdated: { + serializedName: "isUpdated", + readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const ContactInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContactInfo", + modelProperties: { + contactName: { + constraints: { + MinLength: 1 + }, + serializedName: "contactName", + required: true, + type: { + name: "String" + } + }, + phone: { + constraints: { + MinLength: 1 + }, + serializedName: "phone", + required: true, + type: { + name: "String" + } + }, + phoneExtension: { + serializedName: "phoneExtension", + type: { + name: "String" + } + }, + mobile: { + serializedName: "mobile", + type: { + name: "String" + } + } + } + } +}; + export const CopyLogDetails: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1132,6 +1251,44 @@ export const CopyLogDetails: coreClient.CompositeMapper = { } }; +export const DeviceErasureDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeviceErasureDetails", + modelProperties: { + deviceErasureStatus: { + serializedName: "deviceErasureStatus", + readOnly: true, + type: { + name: "Enum", + allowedValues: [ + "None", + "InProgress", + "Succeeded", + "Failed", + "Cancelled", + "Cancelling", + "SucceededWithErrors", + "WaitingForCustomerAction", + "SucceededWithWarnings", + "WaitingForCustomerActionForKek", + "WaitingForCustomerActionForCleanUp", + "CustomerActionPerformedForCleanUp", + "CustomerActionPerformed" + ] + } + }, + erasureOrDestructionCertificateSasKey: { + serializedName: "erasureOrDestructionCertificateSasKey", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const KeyEncryptionKey: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1227,7 +1384,13 @@ export const LastMitigationActionOnJob: coreClient.CompositeMapper = { serializedName: "customerResolution", type: { name: "Enum", - allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume", + "Restart", + "ReachOutToOperation" + ] } } } @@ -1487,7 +1650,13 @@ export const MitigateJobRequest: coreClient.CompositeMapper = { required: true, type: { name: "Enum", - allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume", + "Restart", + "ReachOutToOperation" + ] } } } @@ -1699,6 +1868,18 @@ export const SkuInformation: coreClient.CompositeMapper = { type: { name: "String" } + }, + countriesWithinCommerceBoundary: { + serializedName: "properties.countriesWithinCommerceBoundary", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -2014,6 +2195,20 @@ export const UpdateJobDetails: coreClient.CompositeMapper = { className: "ShippingAddress" } }, + reverseShippingDetails: { + serializedName: "reverseShippingDetails", + type: { + name: "Composite", + className: "ReverseShippingDetails" + } + }, + preferences: { + serializedName: "preferences", + type: { + name: "Composite", + className: "Preferences" + } + }, keyEncryptionKey: { serializedName: "keyEncryptionKey", type: { @@ -2605,6 +2800,33 @@ export const ArmBaseObject: coreClient.CompositeMapper = { } }; +export const GranularCopyLogDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GranularCopyLogDetails", + uberParent: "GranularCopyLogDetails", + polymorphicDiscriminator: { + serializedName: "copyLogDetailsType", + clientName: "copyLogDetailsType" + }, + modelProperties: { + copyLogDetailsType: { + serializedName: "copyLogDetailsType", + required: true, + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy", + "DataBoxCustomerDisk" + ] + } + } + } + } +}; + export const CopyProgress: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2721,6 +2943,122 @@ export const CopyProgress: coreClient.CompositeMapper = { } }; +export const GranularCopyProgress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GranularCopyProgress", + modelProperties: { + storageAccountName: { + serializedName: "storageAccountName", + readOnly: true, + type: { + name: "String" + } + }, + transferType: { + serializedName: "transferType", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["ImportToAzure", "ExportFromAzure"] + } + }, + dataAccountType: { + serializedName: "dataAccountType", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["StorageAccount", "ManagedDisk"] + } + }, + accountId: { + serializedName: "accountId", + readOnly: true, + type: { + name: "String" + } + }, + bytesProcessed: { + serializedName: "bytesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + totalBytesToProcess: { + serializedName: "totalBytesToProcess", + readOnly: true, + type: { + name: "Number" + } + }, + filesProcessed: { + serializedName: "filesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + totalFilesToProcess: { + serializedName: "totalFilesToProcess", + readOnly: true, + type: { + name: "Number" + } + }, + invalidFilesProcessed: { + serializedName: "invalidFilesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + invalidFileBytesUploaded: { + serializedName: "invalidFileBytesUploaded", + readOnly: true, + type: { + name: "Number" + } + }, + renamedContainerCount: { + serializedName: "renamedContainerCount", + readOnly: true, + type: { + name: "Number" + } + }, + filesErroredOut: { + serializedName: "filesErroredOut", + readOnly: true, + type: { + name: "Number" + } + }, + directoriesErroredOut: { + serializedName: "directoriesErroredOut", + readOnly: true, + type: { + name: "Number" + } + }, + invalidDirectoriesProcessed: { + serializedName: "invalidDirectoriesProcessed", + readOnly: true, + type: { + name: "Number" + } + }, + isEnumerationInProgress: { + serializedName: "isEnumerationInProgress", + readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + export const ImportDiskDetails: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3051,6 +3389,32 @@ export const DataBoxDiskJobDetails: coreClient.CompositeMapper = { } } }, + granularCopyProgress: { + serializedName: "granularCopyProgress", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataBoxDiskGranularCopyProgress" + } + } + } + }, + granularCopyLogDetails: { + serializedName: "granularCopyLogDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataBoxDiskGranularCopyLogDetails" + } + } + } + }, disksAndSizeDetails: { serializedName: "disksAndSizeDetails", readOnly: true, @@ -3515,6 +3879,22 @@ export const JobResource: coreClient.CompositeMapper = { name: "Boolean" } }, + reverseShippingDetailsUpdate: { + serializedName: "properties.reverseShippingDetailsUpdate", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled", "NotSupported"] + } + }, + reverseTransportPreferenceUpdate: { + serializedName: "properties.reverseTransportPreferenceUpdate", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled", "NotSupported"] + } + }, isPrepareToShipEnabled: { serializedName: "properties.isPrepareToShipEnabled", readOnly: true, @@ -4138,6 +4518,48 @@ export const HeavyScheduleAvailabilityRequest: coreClient.CompositeMapper = { } }; +export const DataBoxDiskGranularCopyLogDetails: coreClient.CompositeMapper = { + serializedName: "DataBoxCustomerDisk", + type: { + name: "Composite", + className: "DataBoxDiskGranularCopyLogDetails", + uberParent: "GranularCopyLogDetails", + polymorphicDiscriminator: + GranularCopyLogDetails.type.polymorphicDiscriminator, + modelProperties: { + ...GranularCopyLogDetails.type.modelProperties, + serialNumber: { + serializedName: "serialNumber", + readOnly: true, + type: { + name: "String" + } + }, + accountId: { + serializedName: "accountId", + readOnly: true, + type: { + name: "String" + } + }, + errorLogLink: { + serializedName: "errorLogLink", + readOnly: true, + type: { + name: "String" + } + }, + verboseLogLink: { + serializedName: "verboseLogLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const DataBoxCustomerDiskCopyProgress: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4162,6 +4584,60 @@ export const DataBoxCustomerDiskCopyProgress: coreClient.CompositeMapper = { } }; +export const DataBoxDiskGranularCopyProgress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataBoxDiskGranularCopyProgress", + modelProperties: { + ...GranularCopyProgress.type.modelProperties, + serialNumber: { + serializedName: "serialNumber", + readOnly: true, + type: { + name: "String" + } + }, + copyStatus: { + serializedName: "copyStatus", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const JobsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { JobDetails: JobDetails, DataAccountDetails: DataAccountDetails, @@ -4172,6 +4648,7 @@ export let discriminators = { ValidationRequest: ValidationRequest, JobSecrets: JobSecrets, ScheduleAvailabilityRequest: ScheduleAvailabilityRequest, + GranularCopyLogDetails: GranularCopyLogDetails, "JobDetails.DataBoxCustomerDisk": DataBoxCustomerDiskJobDetails, "JobDetails.DataBoxDisk": DataBoxDiskJobDetails, "JobDetails.DataBoxHeavy": DataBoxHeavyJobDetails, @@ -4203,5 +4680,6 @@ export let discriminators = { "JobSecrets.DataBox": DataboxJobSecrets, "ScheduleAvailabilityRequest.DataBox": DataBoxScheduleAvailabilityRequest, "ScheduleAvailabilityRequest.DataBoxDisk": DiskScheduleAvailabilityRequest, - "ScheduleAvailabilityRequest.DataBoxHeavy": HeavyScheduleAvailabilityRequest + "ScheduleAvailabilityRequest.DataBoxHeavy": HeavyScheduleAvailabilityRequest, + "GranularCopyLogDetails.DataBoxCustomerDisk": DataBoxDiskGranularCopyLogDetails }; diff --git a/sdk/databox/arm-databox/src/models/parameters.ts b/sdk/databox/arm-databox/src/models/parameters.ts index 71e340c9765a..625248c63fac 100644 --- a/sdk/databox/arm-databox/src/models/parameters.ts +++ b/sdk/databox/arm-databox/src/models/parameters.ts @@ -51,7 +51,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-08-01-preview", + defaultValue: "2022-09-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/databox/arm-databox/test/sampleTest.ts b/sdk/databox/arm-databox/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/databox/arm-databox/test/sampleTest.ts +++ b/sdk/databox/arm-databox/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() { diff --git a/sdk/databox/arm-databox/tsconfig.json b/sdk/databox/arm-databox/tsconfig.json index 7f0a11d9ac11..3e6ae96443f3 100644 --- a/sdk/databox/arm-databox/tsconfig.json +++ b/sdk/databox/arm-databox/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-databox": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"