From 0a287960672173de28e385dc07221ccd83cdf2cc Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 20 Sep 2022 04:48:40 +0000 Subject: [PATCH] CodeGen from PR 20779 in Azure/azure-rest-api-specs Merge 768472b52ec477ce9434fe5ff0f6b9e7bd9ce1c5 into 3751f321654db00858e70649291af5c81e94611e --- common/config/rush/pnpm-lock.yaml | 11 +- sdk/databox/arm-databox/CHANGELOG.md | 16 +- sdk/databox/arm-databox/README.md | 4 +- sdk/databox/arm-databox/_meta.json | 10 +- sdk/databox/arm-databox/package.json | 27 +- .../arm-databox/review/arm-databox.api.md | 373 +++++++-------- .../src/dataBoxManagementClient.ts | 38 +- sdk/databox/arm-databox/src/models/index.ts | 436 ++++++++++++++---- sdk/databox/arm-databox/src/models/mappers.ts | 378 +++++++++++++-- .../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, 968 insertions(+), 376 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 682c9963b532..a16ac1b8ed74 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3951,7 +3951,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.9.0-dev.20220916 + typescript: 4.9.0-dev.20220919 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8883,8 +8883,8 @@ packages: hasBin: true dev: false - /typescript/4.9.0-dev.20220916: - resolution: {integrity: sha512-UuHLjqwsPLARYlNFwXEblQsiPFPRbZEx8dbitbfbx5l++DCAL2/HZdZ3VMWAS84KRFCwUxpYXdD0EvBU5S79KQ==} + /typescript/4.9.0-dev.20220919: + resolution: {integrity: sha512-W+bcsHdefNwUVjTzmimk/I3GuYjC8ubm1RKBI097N6iEBwoc/vPMAoCArc24Zc2cbuFc01TKO75240wCXNYAkA==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11321,7 +11321,7 @@ packages: dev: false file:projects/arm-databox.tgz: - resolution: {integrity: sha512-KYAF7nM4Jg3NRQFKe8+g4qIT3ai7ltTLdgY/K8jPVQXJcLuRKM3jRnxR8e8dJywVA0MraKWiKkUtggF8jNUoZA==, tarball: file:projects/arm-databox.tgz} + resolution: {integrity: sha512-fkl61OccIaah/DKtjSw4b7WS6GHCxhOwPtFgqWG/Atj74FLXt4Z6Dvf4GCQHUMfXYeh29fF1Ocz4qpb91+qOLw==, tarball: file:projects/arm-databox.tgz} name: '@rush-temp/arm-databox' version: 0.0.0 dependencies: @@ -11332,6 +11332,8 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.79.0 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.0 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.0 + '@types/chai': 4.3.3 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -11343,7 +11345,6 @@ packages: uglify-js: 3.17.0 transitivePeerDependencies: - '@types/node' - - encoding - supports-color dev: false diff --git a/sdk/databox/arm-databox/CHANGELOG.md b/sdk/databox/arm-databox/CHANGELOG.md index 86bd3fbd23a3..b3a2c6017cd3 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-09-20) -## 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..25a6b9057879 100644 --- a/sdk/databox/arm-databox/README.md +++ b/sdk/databox/arm-databox/README.md @@ -6,14 +6,14 @@ 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 ### Currently supported environments -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) +- [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. diff --git a/sdk/databox/arm-databox/_meta.json b/sdk/databox/arm-databox/_meta.json index a796f10dd9fc..de3119d2c2a1 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": "a2b5256d83dec2aaaceddf711a023d023118a950", + "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.1", "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.4.2", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/databox/arm-databox/package.json b/sdk/databox/arm-databox/package.json index a070b259d0ce..ce4fd9b11935 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": ">=12.0.0" }, @@ -40,9 +40,13 @@ "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..a5ddc76dc2da 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"; @@ -153,31 +153,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 +192,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 +245,63 @@ export interface DataBoxDiskCopyProgress { } // @public -export type DataBoxDiskJobDetails = JobDetails & { - jobDetailsType: "DataBoxDisk"; - preferredDisks?: { - [propertyName: string]: number; - }; +export interface DataBoxDiskGranularCopyLogDetails extends GranularCopyLogDetails { + readonly accountName?: 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 +313,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 +351,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 +365,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 +430,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 +459,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 +513,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 +577,7 @@ export interface JobDetails { dataExportDetails?: DataExportDetails[]; dataImportDetails?: DataImportDetails[]; readonly deliveryPackage?: PackageShippingDetails; + readonly deviceErasureDetails?: DeviceErasureDetails; expectedDataSizeInTeraBytes?: number; jobDetailsType: "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy" | "DataBox"; readonly jobStages?: JobStages[]; @@ -542,25 +593,25 @@ 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 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 { @@ -735,105 +786,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 +895,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 +993,22 @@ export interface PackageShippingDetails { export interface Preferences { encryptionPreferences?: EncryptionPreferences; preferredDataCenterRegion?: string[]; + 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 { @@ -1154,19 +1165,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 { @@ -1204,24 +1215,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 { @@ -1326,12 +1337,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..d474c1165837 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}` @@ -98,10 +103,39 @@ export class DataBoxManagementClient extends coreClient.ServiceClient { // 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-02-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..49ed814e57b5 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. */ @@ -206,6 +209,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. */ @@ -434,6 +442,8 @@ export interface Preferences { transportPreferences?: 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 */ @@ -458,6 +468,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. */ @@ -1098,6 +1122,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 +1208,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 +1419,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 +1445,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 +1458,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 +1475,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 +1488,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 +1501,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 +1540,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 +1561,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 +1582,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 +1603,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 +1615,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 +1687,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. @@ -1642,10 +1764,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 +1776,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 +1800,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 +1825,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 +1848,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 +1860,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 +1872,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 +1884,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 +1896,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 +1908,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 +1930,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 +1951,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 +1962,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 name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accountName?: 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 +2034,21 @@ 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; +} /** Known values of {@link StageName} that the service accepts. */ export enum KnownStageName { @@ -1988,56 +2163,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 +2337,16 @@ export enum KnownDataCenterCode { * **PUS20** \ * **AdHoc** \ * **CH1** \ - * **DSM05** + * **DSM05** \ + * **DUB07** \ + * **PNQ01** \ + * **SVG20** \ + * **OSA02** \ + * **OSA22** \ + * **PAR22** \ + * **BN7** \ + * **SN6** \ + * **BJS20** */ export type DataCenterCode = string; @@ -2134,7 +2386,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,7 +2412,7 @@ 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. */ @@ -2178,7 +2430,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 +2455,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..bcb66e64446e 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" + } } } } @@ -417,6 +417,13 @@ export const JobDetails: coreClient.CompositeMapper = { name: "String" } }, + deviceErasureDetails: { + serializedName: "deviceErasureDetails", + type: { + name: "Composite", + className: "DeviceErasureDetails" + } + }, keyEncryptionKey: { serializedName: "keyEncryptionKey", type: { @@ -438,7 +445,13 @@ export const JobDetails: coreClient.CompositeMapper = { element: { type: { name: "Enum", - allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume", + "Restart", + "ReachOutToOperation" + ] } } } @@ -504,7 +517,8 @@ export const JobStages: coreClient.CompositeMapper = { "SucceededWithWarnings", "WaitingForCustomerActionForKek", "WaitingForCustomerActionForCleanUp", - "CustomerActionPerformedForCleanUp" + "CustomerActionPerformedForCleanUp", + "CustomerActionPerformed" ] } }, @@ -1066,6 +1080,19 @@ export const Preferences: coreClient.CompositeMapper = { name: "Composite", className: "EncryptionPreferences" } + }, + storageAccountAccessTierPreferences: { + serializedName: "storageAccountAccessTierPreferences", + type: { + name: "Sequence", + element: { + defaultValue: "Archive", + isConstant: true, + type: { + name: "String" + } + } + } } } } @@ -1132,6 +1159,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 +1292,13 @@ export const LastMitigationActionOnJob: coreClient.CompositeMapper = { serializedName: "customerResolution", type: { name: "Enum", - allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume", + "Restart", + "ReachOutToOperation" + ] } } } @@ -1487,7 +1558,13 @@ export const MitigateJobRequest: coreClient.CompositeMapper = { required: true, type: { name: "Enum", - allowedValues: ["None", "MoveToCleanUpDevice", "Resume"] + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume", + "Restart", + "ReachOutToOperation" + ] } } } @@ -2605,6 +2682,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 +2825,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 +3271,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, @@ -4138,6 +4384,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" + } + }, + accountName: { + serializedName: "accountName", + 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 +4450,30 @@ 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 let discriminators = { JobDetails: JobDetails, DataAccountDetails: DataAccountDetails, @@ -4172,6 +4484,7 @@ export let discriminators = { ValidationRequest: ValidationRequest, JobSecrets: JobSecrets, ScheduleAvailabilityRequest: ScheduleAvailabilityRequest, + GranularCopyLogDetails: GranularCopyLogDetails, "JobDetails.DataBoxCustomerDisk": DataBoxCustomerDiskJobDetails, "JobDetails.DataBoxDisk": DataBoxDiskJobDetails, "JobDetails.DataBoxHeavy": DataBoxHeavyJobDetails, @@ -4203,5 +4516,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..97c8aed1c546 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-02-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"