From 89e9a2ad954b8124e7ec97d0118f74cc235f1d63 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 18 Nov 2020 05:26:47 +0000 Subject: [PATCH] CodeGen from PR 11717 in Azure/azure-rest-api-specs Merge 1069707be68c0cd7e976cb68bf44ec95b10afba8 into b47a32169e59378d8005aabb5358e3f4ddf10766 --- sdk/databox/arm-databox/README.md | 9 +- sdk/databox/arm-databox/rollup.config.js | 4 +- .../src/dataBoxManagementClient.ts | 5 +- .../src/dataBoxManagementClientContext.ts | 7 +- sdk/databox/arm-databox/src/models/index.ts | 945 +++++++++---- .../arm-databox/src/models/jobsMappers.ts | 34 +- sdk/databox/arm-databox/src/models/mappers.ts | 1165 +++++++++++++---- .../src/models/operationsMappers.ts | 8 +- .../arm-databox/src/models/parameters.ts | 5 +- .../arm-databox/src/models/serviceMappers.ts | 32 +- .../arm-databox/src/operations/index.ts | 5 +- .../arm-databox/src/operations/jobs.ts | 48 +- .../arm-databox/src/operations/operations.ts | 12 +- .../arm-databox/src/operations/service.ts | 148 +-- 14 files changed, 1774 insertions(+), 653 deletions(-) diff --git a/sdk/databox/arm-databox/README.md b/sdk/databox/arm-databox/README.md index 4a3b8f3d1504..556c7a896d34 100644 --- a/sdk/databox/arm-databox/README.md +++ b/sdk/databox/arm-databox/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-databox ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { DataBoxManagementClient, DataBoxManagementModels, DataBoxManagementMappers } from "@azure/arm-databox"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { DataBoxManagementClient } = require("@azure/arm-databox"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/databox/arm-databox/rollup.config.js b/sdk/databox/arm-databox/rollup.config.js index b5c16bd4ad21..621614ac8ec1 100644 --- a/sdk/databox/arm-databox/rollup.config.js +++ b/sdk/databox/arm-databox/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/databox/arm-databox/src/dataBoxManagementClient.ts b/sdk/databox/arm-databox/src/dataBoxManagementClient.ts index f602142b81a6..e3f74dbd6872 100644 --- a/sdk/databox/arm-databox/src/dataBoxManagementClient.ts +++ b/sdk/databox/arm-databox/src/dataBoxManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts b/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts index c96e85eca2a9..786b40218e85 100644 --- a/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts +++ b/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -44,7 +43,7 @@ export class DataBoxManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2019-09-01'; + this.apiVersion = '2020-11-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/databox/arm-databox/src/models/index.ts b/sdk/databox/arm-databox/src/models/index.ts index cb6886205c43..f9cce22883d8 100644 --- a/sdk/databox/arm-databox/src/models/index.ts +++ b/sdk/databox/arm-databox/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -22,7 +22,7 @@ export interface ShareCredentialDetails { readonly shareName?: string; /** * Type of the share. Possible values include: 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', - * 'AzureFile', 'ManagedDisk' + * 'AzureFile', 'ManagedDisk', 'AzurePremiumFiles' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly shareType?: ShareDestinationFormatType; @@ -53,10 +53,10 @@ export interface AccountCredentialDetails { */ readonly accountName?: string; /** - * Data Destination Type. Possible values include: 'StorageAccount', 'ManagedDisk' + * Type of the account. Possible values include: 'StorageAccount', 'ManagedDisk' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly dataDestinationType?: DataDestinationType; + readonly dataAccountType?: DataAccountType; /** * Connection string of the account endpoint to use the account as a storage endpoint on the * device. @@ -70,6 +70,20 @@ export interface AccountCredentialDetails { readonly shareCredentialDetails?: ShareCredentialDetails[]; } +/** + * Additional error info. + */ +export interface AdditionalErrorInfo { + /** + * Additional error type. + */ + type?: string; + /** + * Additional error info. + */ + info?: any; +} + /** * Shipping address where customer wishes to receive the device. */ @@ -124,7 +138,7 @@ export interface AddressValidationOutput { * Error code and message of validation response. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly error?: ErrorModel; + readonly error?: CloudError; /** * Polymorphic Discriminator */ @@ -141,6 +155,31 @@ export interface AddressValidationOutput { readonly alternateAddresses?: ShippingAddress[]; } +/** + * An interface representing Details. + */ +export interface Details { + code: string; + message: string; +} + +/** + * An interface representing ErrorDetail. + */ +export interface ErrorDetail { + code: string; + message: string; + details?: Details[]; + target?: string; +} + +/** + * An interface representing ApiError. + */ +export interface ApiError { + error: ErrorDetail; +} + /** * The Network Adapter configuration of a DataBox. */ @@ -182,6 +221,10 @@ export interface ArmBaseObject { * The filters for showing the available skus. */ export interface AvailableSkuRequest { + /** + * Type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure' + */ + transferType: TransferType; /** * ISO country code. Country for hardware shipment. For codes check: * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements @@ -217,14 +260,14 @@ export interface Sku { } /** - * Map of destination location to service location. + * Map of data location to service location */ -export interface DestinationToServiceLocationMap { +export interface DataLocationToServiceLocationMap { /** - * Location of the destination. + * Location of the data. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly destinationLocation?: string; + readonly dataLocation?: string; /** * Location of the service. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -262,6 +305,12 @@ export interface SkuCost { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterType?: string; + /** + * Multiplier specifies the region specific value to be multiplied with 1$ guid. Eg: Our new + * regions will be using 1$ shipping guid with appropriate multiplier specific to region. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly multiplier?: number; } /** @@ -279,10 +328,10 @@ export interface SkuInformation { */ readonly enabled?: boolean; /** - * The map of destination location to service location. + * The map of data location to service location. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly destinationToServiceLocationMap?: DestinationToServiceLocationMap[]; + readonly dataLocationToServiceLocationMap?: DataLocationToServiceLocationMap[]; /** * Capacity of the Sku. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -316,6 +365,42 @@ export interface SkuInformation { readonly requiredFeature?: string; } +/** + * Filter details to transfer Azure files + */ +export interface AzureFileFilterDetails { + /** + * Prefix list of the Azure files to be transferred. + */ + filePrefixList?: string[]; + /** + * List of full path of the files to be transferred. + */ + filePathList?: string[]; + /** + * List of file shares to be transferred. + */ + fileShareList?: string[]; +} + +/** + * Filter details to transfer Azure Blobs + */ +export interface BlobFilterDetails { + /** + * Prefix list of the Azure blobs to be transferred. + */ + blobPrefixList?: string[]; + /** + * List of full path of the blobs to be transferred. + */ + blobPathList?: string[]; + /** + * List of blob containers to be transferred. + */ + containerList?: string[]; +} + /** * Reason for cancellation. */ @@ -391,37 +476,43 @@ export interface CopyLogDetails { */ export interface CopyProgress { /** - * Name of the storage account where the data needs to be uploaded. + * 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; /** - * Data Destination Type. Possible values include: 'StorageAccount', 'ManagedDisk' + * Transfer type of data. Possible values include: 'ImportToAzure', 'ExportFromAzure' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly dataDestinationType?: DataDestinationType; + readonly transferType?: TransferType; + /** + * Data Account Type. Possible values include: 'StorageAccount', 'ManagedDisk' + * **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; /** - * Amount of data uploaded by the job as of now. + * To indicate bytes transferred. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly bytesSentToCloud?: number; + 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 by the job as of now. + * Number of files processed * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly filesProcessed?: number; /** - * Total number of files to be processed by the job. + * Total files to process * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalFilesToProcess?: number; @@ -448,12 +539,61 @@ export interface CopyProgress { * **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; +} + +/** + * Contains the possible cases for ValidationRequest. + */ +export type ValidationRequestUnion = ValidationRequest | CreateJobValidations; + +/** + * Minimum request requirement of any validation category. + */ +export interface ValidationRequest { + /** + * Polymorphic Discriminator + */ + validationCategory: "ValidationRequest"; + /** + * List of request details contain validationType and its request as key and value respectively. + */ + individualRequestDetails: ValidationInputRequestUnion[]; +} + +/** + * It does all pre-job creation validations. + */ +export interface CreateJobValidations { + /** + * Polymorphic Discriminator + */ + validationCategory: "JobCreationValidation"; + /** + * List of request details contain validationType and its request as key and value respectively. + */ + individualRequestDetails: ValidationInputRequestUnion[]; } /** * Contains the possible cases for ValidationInputRequest. */ -export type ValidationInputRequestUnion = ValidationInputRequest | CreateOrderLimitForSubscriptionValidationRequest | DataDestinationDetailsValidationRequest | PreferencesValidationRequest | SkuAvailabilityValidationRequest | SubscriptionIsAllowedToCreateJobValidationRequest | ValidateAddress; +export type ValidationInputRequestUnion = ValidationInputRequest | CreateOrderLimitForSubscriptionValidationRequest | DataTransferDetailsValidationRequest | PreferencesValidationRequest | SkuAvailabilityValidationRequest | SubscriptionIsAllowedToCreateJobValidationRequest | ValidateAddress; /** * Minimum fields that must be present in any type of validation request. @@ -483,7 +623,7 @@ export interface CreateOrderLimitForSubscriptionValidationRequest { /** * Contains the possible cases for ValidationInputResponse. */ -export type ValidationInputResponseUnion = ValidationInputResponse | CreateOrderLimitForSubscriptionValidationResponseProperties | DataDestinationDetailsValidationResponseProperties | PreferencesValidationResponseProperties | SkuAvailabilityValidationResponseProperties | SubscriptionIsAllowedToCreateJobValidationResponseProperties; +export type ValidationInputResponseUnion = ValidationInputResponse | CreateOrderLimitForSubscriptionValidationResponseProperties | DataTransferDetailsValidationResponseProperties | PreferencesValidationResponseProperties | SkuAvailabilityValidationResponseProperties | SubscriptionIsAllowedToCreateJobValidationResponseProperties; /** * Minimum properties that should be present in each individual validation response. @@ -497,7 +637,7 @@ export interface ValidationInputResponse { * Error code and message of validation response. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly error?: ErrorModel; + readonly error?: CloudError; } /** @@ -512,7 +652,7 @@ export interface CreateOrderLimitForSubscriptionValidationResponseProperties { * Error code and message of validation response. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly error?: ErrorModel; + readonly error?: CloudError; /** * Create order limit validation status. Possible values include: 'Valid', 'Invalid', 'Skipped' * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -520,6 +660,30 @@ export interface CreateOrderLimitForSubscriptionValidationResponseProperties { readonly status?: ValidationStatus; } +/** + * Contains the possible cases for DataAccountDetails. + */ +export type DataAccountDetailsUnion = DataAccountDetails | ManagedDiskDetails | StorageAccountDetails; + +/** + * Account details of the data to be transferred + */ +export interface DataAccountDetails { + /** + * Polymorphic Discriminator + */ + dataAccountType: "DataAccountDetails"; + /** + * Password for all the shares to be created on the device. Should not be passed for + * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + * itself. This will not be returned in Get Call. Password Requirements : Password must be + * minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + * alphabet, one number and one special character. Password cannot have the following characters + * : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+ + */ + sharePassword?: string; +} + /** * Copy log details for a storage account of a DataBox job */ @@ -529,7 +693,7 @@ export interface DataBoxAccountCopyLogDetails { */ copyLogDetailsType: "DataBox"; /** - * Destination account name. + * Account name. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly accountName?: string; @@ -538,6 +702,11 @@ export interface DataBoxAccountCopyLogDetails { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly copyLogLink?: string; + /** + * Link for copy verbose logs. This will be set only when LogCollectionLevel is set to Verbose. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly copyVerboseLogLink?: string; } /** @@ -606,10 +775,6 @@ export interface JobDetails { * Polymorphic Discriminator */ jobDetailsType: "JobDetails"; - /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. - */ - expectedDataSizeInTerabytes?: number; /** * List of stages that run in the job. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -622,7 +787,7 @@ export interface JobDetails { /** * Shipping address of the customer. */ - shippingAddress: ShippingAddress; + shippingAddress?: ShippingAddress; /** * Delivery package shipping details. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -634,14 +799,13 @@ export interface JobDetails { */ readonly returnPackage?: PackageShippingDetails; /** - * Destination account details. + * Details of the data to be imported into azure. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + dataImportDetails?: DataImportDetails[]; /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Details of the data to be exported from azure. */ - readonly errorDetails?: JobErrorDetails[]; + dataExportDetails?: DataExportDetails[]; /** * Preferences for the order. */ @@ -661,6 +825,15 @@ export interface JobDetails { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly chainOfCustodySasKey?: string; + /** + * Details about which key encryption type is being used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTerabytes?: number; } /** @@ -671,10 +844,6 @@ export interface DataBoxDiskJobDetails { * Polymorphic Discriminator */ jobDetailsType: "DataBoxDisk"; - /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. - */ - expectedDataSizeInTerabytes?: number; /** * List of stages that run in the job. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -687,7 +856,7 @@ export interface DataBoxDiskJobDetails { /** * Shipping address of the customer. */ - shippingAddress: ShippingAddress; + shippingAddress?: ShippingAddress; /** * Delivery package shipping details. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -699,14 +868,13 @@ export interface DataBoxDiskJobDetails { */ readonly returnPackage?: PackageShippingDetails; /** - * Destination account details. + * Details of the data to be imported into azure. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + dataImportDetails?: DataImportDetails[]; /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Details of the data to be exported from azure. */ - readonly errorDetails?: JobErrorDetails[]; + dataExportDetails?: DataExportDetails[]; /** * Preferences for the order. */ @@ -726,6 +894,15 @@ export interface DataBoxDiskJobDetails { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly chainOfCustodySasKey?: string; + /** + * Details about which key encryption type is being used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTerabytes?: number; /** * 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 @@ -780,8 +957,14 @@ export interface JobSecrets { jobSecretsType: "JobSecrets"; /** * Dc Access Security Code for Customer Managed Shipping + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - dcAccessSecurityCode?: DcAccessSecurityCode; + readonly dcAccessSecurityCode?: DcAccessSecurityCode; + /** + * Error while fetching the secrets. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly error?: CloudError; } /** @@ -794,8 +977,14 @@ export interface DataBoxDiskJobSecrets { jobSecretsType: "DataBoxDisk"; /** * Dc Access Security Code for Customer Managed Shipping + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - dcAccessSecurityCode?: DcAccessSecurityCode; + readonly dcAccessSecurityCode?: DcAccessSecurityCode; + /** + * Error while fetching the secrets. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly error?: CloudError; /** * Contains the list of secrets object for that device. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -822,7 +1011,7 @@ export interface DataBoxHeavyAccountCopyLogDetails { */ copyLogDetailsType: "DataBoxHeavy"; /** - * Destination account name. + * Account name. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly accountName?: string; @@ -831,6 +1020,12 @@ export interface DataBoxHeavyAccountCopyLogDetails { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly copyLogLink?: string[]; + /** + * Link for copy verbose logs. This will be set only when the LogCollectionLevel is set to + * verbose. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly copyVerboseLogLink?: string[]; } /** @@ -841,10 +1036,6 @@ export interface DataBoxHeavyJobDetails { * Polymorphic Discriminator */ jobDetailsType: "DataBoxHeavy"; - /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. - */ - expectedDataSizeInTerabytes?: number; /** * List of stages that run in the job. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -857,7 +1048,7 @@ export interface DataBoxHeavyJobDetails { /** * Shipping address of the customer. */ - shippingAddress: ShippingAddress; + shippingAddress?: ShippingAddress; /** * Delivery package shipping details. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -869,14 +1060,13 @@ export interface DataBoxHeavyJobDetails { */ readonly returnPackage?: PackageShippingDetails; /** - * Destination account details. + * Details of the data to be imported into azure. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + dataImportDetails?: DataImportDetails[]; /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Details of the data to be exported from azure. */ - readonly errorDetails?: JobErrorDetails[]; + dataExportDetails?: DataExportDetails[]; /** * Preferences for the order. */ @@ -896,13 +1086,27 @@ export interface DataBoxHeavyJobDetails { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly chainOfCustodySasKey?: string; + /** + * Details about which key encryption type is being used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTerabytes?: number; /** * Copy progress per account. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly copyProgress?: CopyProgress[]; /** - * Set Device password for unlocking Databox Heavy + * 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; } @@ -948,8 +1152,14 @@ export interface DataBoxHeavyJobSecrets { jobSecretsType: "DataBoxHeavy"; /** * Dc Access Security Code for Customer Managed Shipping + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - dcAccessSecurityCode?: DcAccessSecurityCode; + readonly dcAccessSecurityCode?: DcAccessSecurityCode; + /** + * Error while fetching the secrets. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly error?: CloudError; /** * Contains the list of secret objects for a databox heavy job. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -965,10 +1175,6 @@ export interface DataBoxJobDetails { * Polymorphic Discriminator */ jobDetailsType: "DataBox"; - /** - * The expected size of the data, which needs to be transferred in this job, in terabytes. - */ - expectedDataSizeInTerabytes?: number; /** * List of stages that run in the job. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -981,7 +1187,7 @@ export interface DataBoxJobDetails { /** * Shipping address of the customer. */ - shippingAddress: ShippingAddress; + shippingAddress?: ShippingAddress; /** * Delivery package shipping details. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -993,14 +1199,13 @@ export interface DataBoxJobDetails { */ readonly returnPackage?: PackageShippingDetails; /** - * Destination account details. + * Details of the data to be imported into azure. */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + dataImportDetails?: DataImportDetails[]; /** - * Error details for failure. This is optional. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Details of the data to be exported from azure. */ - readonly errorDetails?: JobErrorDetails[]; + dataExportDetails?: DataExportDetails[]; /** * Preferences for the order. */ @@ -1020,13 +1225,27 @@ export interface DataBoxJobDetails { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly chainOfCustodySasKey?: string; + /** + * Details about which key encryption type is being used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTerabytes?: number; /** * Copy progress per storage account. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly copyProgress?: CopyProgress[]; /** - * Set Device password for unlocking Databox + * 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; } @@ -1072,8 +1291,14 @@ export interface DataboxJobSecrets { jobSecretsType: "DataBox"; /** * Dc Access Security Code for Customer Managed Shipping + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dcAccessSecurityCode?: DcAccessSecurityCode; + /** + * Error while fetching the secrets. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - dcAccessSecurityCode?: DcAccessSecurityCode; + readonly error?: CloudError; /** * Contains the list of secret objects for a job. */ @@ -1094,11 +1319,14 @@ export interface ScheduleAvailabilityRequest { */ skuName: "ScheduleAvailabilityRequest"; /** - * Location for data transfer. - * For locations check: + * Location for data transfer. For locations check: * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ storageLocation: string; + /** + * Country in which storage location should be supported. + */ + country?: string; } /** @@ -1110,135 +1338,200 @@ export interface DataBoxScheduleAvailabilityRequest { */ skuName: "DataBox"; /** - * Location for data transfer. - * For locations check: + * Location for data transfer. For locations check: * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ storageLocation: string; + /** + * Country in which storage location should be supported. + */ + country?: string; } /** - * Contains the possible cases for DestinationAccountDetails. + * Details of the filter files to be used for data transfer. */ -export type DestinationAccountDetailsUnion = DestinationAccountDetails | DestinationManagedDiskDetails | DestinationStorageAccountDetails; +export interface FilterFileDetails { + /** + * Type of the filter file. Possible values include: 'AzureBlob', 'AzureFile' + */ + filterFileType: FilterFileType; + /** + * Path of the file that contains the details of all items to transfer. + */ + filterFilePath: string; +} /** - * Details of the destination storage accounts. + * Details of the filtering the transfer of data. */ -export interface DestinationAccountDetails { +export interface TransferFilterDetails { /** - * Polymorphic Discriminator + * Type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk' */ - dataDestinationType: "DestinationAccountDetails"; + dataAccountType: DataAccountType; /** - * Arm Id of the destination where the data has to be moved. + * Filter details to transfer blobs. */ - accountId?: string; + blobFilterDetails?: BlobFilterDetails; /** - * Share password to be shared by all shares in SA. + * Filter details to transfer Azure files. */ - sharePassword?: string; + azureFileFilterDetails?: AzureFileFilterDetails; + /** + * Details of the filter files to be used for data transfer. + */ + filterFileDetails?: FilterFileDetails[]; } /** - * Request to validate data destination details. + * Map of filter type and the details to filter. This field is required only if the + * TransferConfigurationType is given as TransferUsingFilter. */ -export interface DataDestinationDetailsValidationRequest { +export interface TransferConfigurationTransferFilterDetails { /** - * Polymorphic Discriminator + * Details of the filtering the transfer of data. */ - validationType: "ValidateDataDestinationDetails"; + include?: TransferFilterDetails; +} + +/** + * Details to transfer all data. + */ +export interface TransferAllDetails { /** - * Destination account details list. + * Type of the account of data. Possible values include: 'StorageAccount', 'ManagedDisk' */ - destinationAccountDetails: DestinationAccountDetailsUnion[]; + dataAccountType: DataAccountType; /** - * Location of stamp or geo. + * To indicate if all Azure blobs have to be transferred */ - location: string; + transferAllBlobs?: boolean; + /** + * To indicate if all Azure Files have to be transferred + */ + transferAllFiles?: boolean; } /** - * Properties of data destination details validation response. + * Map of filter type and the details to transfer all data. This field is required only if the + * TransferConfigurationType is given as TransferAll */ -export interface DataDestinationDetailsValidationResponseProperties { +export interface TransferConfigurationTransferAllDetails { /** - * Polymorphic Discriminator + * Details to transfer all data. */ - validationType: "ValidateDataDestinationDetails"; + include?: TransferAllDetails; +} + +/** + * Configuration for defining the transfer of data. + */ +export interface TransferConfiguration { /** - * Error code and message of validation response. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Type of the configuration for transfer. Possible values include: 'TransferAll', + * 'TransferUsingFilter' */ - readonly error?: ErrorModel; + transferConfigurationType: TransferConfigurationType; /** - * Data destination details validation status. Possible values include: 'Valid', 'Invalid', - * 'Skipped' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Map of filter type and the details to filter. This field is required only if the + * TransferConfigurationType is given as TransferUsingFilter. */ - readonly status?: ValidationStatus; + transferFilterDetails?: TransferConfigurationTransferFilterDetails; + /** + * Map of filter type and the details to transfer all data. This field is required only if the + * TransferConfigurationType is given as TransferAll + */ + transferAllDetails?: TransferConfigurationTransferAllDetails; } /** - * Dc Access Security code for device. + * Details of the data to be used for exporting data from azure. */ -export interface DcAccessSecurityCode { +export interface DataExportDetails { /** - * Dc Access Code for dispatching from DC. + * Configuration for the data transfer. */ - forwardDcAccessCode?: string; + transferConfiguration: TransferConfiguration; /** - * Dc Access code for dropping off at DC. + * Level of the logs to be collected. Possible values include: 'Error', 'Verbose' */ - reverseDcAccessCode?: string; + logCollectionLevel?: LogCollectionLevel; + /** + * Account details of the data to be transferred + */ + accountDetails: DataAccountDetailsUnion; } /** - * Details for the destination compute disks. + * Details of the data to be used for importing data to azure. */ -export interface DestinationManagedDiskDetails { +export interface DataImportDetails { + /** + * Account details of the data to be transferred + */ + accountDetails: DataAccountDetailsUnion; +} + +/** + * Request to validate export and import data details. + */ +export interface DataTransferDetailsValidationRequest { /** * Polymorphic Discriminator */ - dataDestinationType: "ManagedDisk"; + validationType: "ValidateDataTransferDetails"; /** - * Arm Id of the destination where the data has to be moved. + * List of DataTransfer details to be used to export data from azure. */ - accountId?: string; + dataExportDetails?: DataExportDetails[]; /** - * Share password to be shared by all shares in SA. + * List of DataTransfer details to be used to import data to azure. */ - sharePassword?: string; + dataImportDetails?: DataImportDetails[]; /** - * Destination Resource Group Id where the Compute disks should be created. + * Device type. Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' */ - resourceGroupId: string; + deviceType: SkuName; /** - * Arm Id of the storage account that can be used to copy the vhd for staging. + * Type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure' */ - stagingStorageAccountId: string; + transferType: TransferType; } /** - * Details for the destination storage account. + * Properties of data transfer details validation response. */ -export interface DestinationStorageAccountDetails { +export interface DataTransferDetailsValidationResponseProperties { /** * Polymorphic Discriminator */ - dataDestinationType: "StorageAccount"; + validationType: "ValidateDataTransferDetails"; /** - * Arm Id of the destination where the data has to be moved. + * Error code and message of validation response. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - accountId?: string; + readonly error?: CloudError; /** - * Share password to be shared by all shares in SA. + * Data transfer details validation status. Possible values include: 'Valid', 'Invalid', + * 'Skipped' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sharePassword?: string; + readonly status?: ValidationStatus; +} + +/** + * Dc access security code + */ +export interface DcAccessSecurityCode { /** - * Destination Storage Account Arm Id. + * Reverse Dc access security code. */ - storageAccountId: string; + reverseDcAccessCode?: string; + /** + * Forward Dc access security code. + */ + forwardDcAccessCode?: string; } /** @@ -1250,11 +1543,14 @@ export interface DiskScheduleAvailabilityRequest { */ skuName: "DataBoxDisk"; /** - * Location for data transfer. - * For locations check: + * Location for data transfer. For locations check: * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ storageLocation: string; + /** + * Country in which storage location should be supported. + */ + country?: string; /** * The expected size of the data, which needs to be transferred in this job, in terabytes. */ @@ -1262,19 +1558,14 @@ export interface DiskScheduleAvailabilityRequest { } /** - * Top level error for the job. + * Preferences related to the Encryption. */ -export interface ErrorModel { - /** - * Error code that can be used to programmatically identify the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; +export interface EncryptionPreferences { /** - * Describes the error in detail and provides debugging information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Defines secondary layer of software-based encryption enablement. Possible values include: + * 'Enabled', 'Disabled' */ - readonly message?: string; + doubleEncryption?: DoubleEncryption; } /** @@ -1286,47 +1577,48 @@ export interface HeavyScheduleAvailabilityRequest { */ skuName: "DataBoxHeavy"; /** - * Location for data transfer. - * For locations check: + * Location for data transfer. For locations check: * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 */ storageLocation: string; + /** + * Country in which storage location should be supported. + */ + country?: string; } /** - * Additional delivery info. + * User assigned identity properties. */ -export interface JobDeliveryInfo { +export interface UserAssignedProperties { /** - * Scheduled date time. + * Arm resource id for user assigned identity to be used to fetch MSI token. */ - scheduledDateTime?: Date; + resourceId?: string; } /** - * Job Error Details for providing the information and recommended action. + * Managed identity properties. */ -export interface JobErrorDetails { +export interface IdentityProperties { /** - * Message for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Managed service identity type. */ - readonly errorMessage?: string; + type?: string; /** - * Code for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * User assigned identity properties. */ - readonly errorCode?: number; - /** - * Recommended action for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly recommendedAction?: string; + userAssigned?: UserAssignedProperties; +} + +/** + * Additional delivery info. + */ +export interface JobDeliveryInfo { /** - * Contains the non localized exception message - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Scheduled date time. */ - readonly exceptionMessage?: string; + scheduledDateTime?: Date; } /** @@ -1349,7 +1641,8 @@ export interface JobStages { readonly displayName?: string; /** * Status of the job stage. Possible values include: 'None', 'InProgress', 'Succeeded', 'Failed', - * 'Cancelled', 'Cancelling', 'SucceededWithErrors' + * 'Cancelled', 'Cancelling', 'SucceededWithErrors', 'WaitingForCustomerAction', + * 'SucceededWithWarnings' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly stageStatus?: StageStatus; @@ -1363,11 +1656,6 @@ export interface JobStages { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly jobStageDetails?: any; - /** - * Error details for the stage. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly errorDetails?: JobErrorDetails[]; } /** @@ -1407,13 +1695,40 @@ export interface TransportPreferences { */ export interface Preferences { /** - * Preferred Data Center Region. + * Preferred data center region. */ preferredDataCenterRegion?: string[]; /** * Preferences related to the shipment logistics of the sku. */ transportPreferences?: TransportPreferences; + /** + * Preferences related to the Encryption. + */ + encryptionPreferences?: EncryptionPreferences; +} + +/** + * Encryption key containing details about key to encrypt different keys. + */ +export interface KeyEncryptionKey { + /** + * Type of encryption key used for key encryption. Possible values include: 'MicrosoftManaged', + * 'CustomerManaged' + */ + kekType: KekType; + /** + * Managed identity properties used for key encryption. + */ + identityProperties?: IdentityProperties; + /** + * Key encryption key. It is required in case of Customer managed KekType. + */ + kekUrl?: string; + /** + * Kek vault resource id. It is required in case of Customer managed KekType. + */ + kekVaultResourceID?: string; } /** @@ -1435,12 +1750,20 @@ export interface Resource extends BaseResource { * The sku type. */ sku: Sku; + /** + * Msi identity of the resource + */ + identity?: ResourceIdentity; } /** * Job Resource. */ export interface JobResource extends Resource { + /** + * Type of the data transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure' + */ + transferType: TransferType; /** * Describes whether the job is cancellable or not. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1456,6 +1779,11 @@ export interface JobResource extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isShippingAddressEditable?: boolean; + /** + * Is Prepare To Ship Enabled on this job + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isPrepareToShipEnabled?: boolean; /** * Name of the stage which is in progress. Possible values include: 'DeviceOrdered', * 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy', 'Completed', @@ -1474,7 +1802,7 @@ export interface JobResource extends Resource { * Top level error for the job. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly error?: ErrorModel; + readonly error?: CloudError; /** * Details of a job run. This field will only be sent for expand details filter. */ @@ -1526,6 +1854,50 @@ export interface UpdateJobDetails { * Shipping address of the customer. */ shippingAddress?: ShippingAddress; + /** + * Key encryption key for the job. + */ + keyEncryptionKey?: KeyEncryptionKey; +} + +/** + * Class defining User assigned identity details. + */ +export interface UserAssignedIdentity { + /** + * The principal id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The client id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; +} + +/** + * Msi identity details of the resource + */ +export interface ResourceIdentity { + /** + * Identity type + */ + type?: string; + /** + * Service Principal Id backing the Msi + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * Home Tenant Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * User Assigned Identities + */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; } /** @@ -1536,15 +1908,42 @@ export interface JobResourceUpdateParameter { * Details of a job to be updated. */ details?: UpdateJobDetails; - /** - * Destination account details. - */ - destinationAccountDetails?: DestinationAccountDetailsUnion[]; /** * The list of key value pairs that describe the resource. These tags can be used in viewing and * grouping this resource (across resource groups). */ tags?: { [propertyName: string]: string }; + /** + * Msi identity of the resource + */ + identity?: ResourceIdentity; +} + +/** + * Details of the managed disks. + */ +export interface ManagedDiskDetails { + /** + * Polymorphic Discriminator + */ + dataAccountType: "ManagedDisk"; + /** + * Password for all the shares to be created on the device. Should not be passed for + * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + * itself. This will not be returned in Get Call. Password Requirements : Password must be + * minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + * alphabet, one number and one special character. Password cannot have the following characters + * : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+ + */ + sharePassword?: string; + /** + * 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; } /** @@ -1594,6 +1993,10 @@ export interface Operation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly origin?: string; + /** + * Indicates whether the operation is a data action + */ + isDataAction?: boolean; } /** @@ -1605,7 +2008,7 @@ export interface PreferencesValidationRequest { */ validationType: "ValidatePreferences"; /** - * Preference requested with respect to transport type and data center + * Preference of transport and data center. */ preference?: Preferences; /** @@ -1627,7 +2030,7 @@ export interface PreferencesValidationResponseProperties { * Error code and message of validation response. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly error?: ErrorModel; + readonly error?: CloudError; /** * Validation status of requested data center and transport. Possible values include: 'Valid', * 'Invalid', 'Skipped' @@ -1661,7 +2064,7 @@ export interface RegionConfigurationRequest { } /** - * Schedule availability response for given sku in a region. + * Schedule availability for given sku in a region. */ export interface ScheduleAvailabilityResponse { /** @@ -1759,6 +2162,10 @@ export interface SkuAvailabilityValidationRequest { * 'DataBoxHeavy' */ deviceType: SkuName; + /** + * Type of the transfer. Possible values include: 'ImportToAzure', 'ExportFromAzure' + */ + transferType: TransferType; /** * ISO country code. Country for hardware shipment. For codes check: * https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements @@ -1783,7 +2190,7 @@ export interface SkuAvailabilityValidationResponseProperties { * Error code and message of validation response. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly error?: ErrorModel; + readonly error?: CloudError; /** * Sku availability validation status. Possible values include: 'Valid', 'Invalid', 'Skipped' * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1791,6 +2198,29 @@ export interface SkuAvailabilityValidationResponseProperties { readonly status?: ValidationStatus; } +/** + * Details for the storage account. + */ +export interface StorageAccountDetails { + /** + * Polymorphic Discriminator + */ + dataAccountType: "StorageAccount"; + /** + * Password for all the shares to be created on the device. Should not be passed for + * TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password + * itself. This will not be returned in Get Call. Password Requirements : Password must be + * minimum of 12 and maximum of 64 characters. Password must have at least one uppercase + * alphabet, one number and one special character. Password cannot have the following characters + * : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+ + */ + sharePassword?: string; + /** + * Storage Account Resource Id. + */ + storageAccountId: string; +} + /** * Request to validate subscription permission to create jobs. */ @@ -1813,7 +2243,7 @@ export interface SubscriptionIsAllowedToCreateJobValidationResponseProperties { * Error code and message of validation response. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly error?: ErrorModel; + readonly error?: CloudError; /** * Validation status of subscription permission to create job. Possible values include: 'Valid', * 'Invalid', 'Skipped' @@ -1861,39 +2291,6 @@ export interface ValidateAddress { transportPreferences?: TransportPreferences; } -/** - * Contains the possible cases for ValidationRequest. - */ -export type ValidationRequestUnion = ValidationRequest | CreateJobValidations; - -/** - * Input request for all pre job creation validation. - */ -export interface ValidationRequest { - /** - * Polymorphic Discriminator - */ - validationCategory: "ValidationRequest"; - /** - * List of request details contain validationType and its request as key and value respectively. - */ - individualRequestDetails: ValidationInputRequestUnion[]; -} - -/** - * It does all pre-job creation validations. - */ -export interface CreateJobValidations { - /** - * Polymorphic Discriminator - */ - validationCategory: "JobCreationValidation"; - /** - * List of request details contain validationType and its request as key and value respectively. - */ - individualRequestDetails: ValidationInputRequestUnion[]; -} - /** * Response of pre job creation validations. */ @@ -1964,6 +2361,26 @@ export interface JobsBeginUpdateOptionalParams extends msRest.RequestOptionsBase ifMatch?: string; } +/** + * Optional Parameters. + */ +export interface JobsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface JobsListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs. + */ + skipToken?: string; +} + /** * Optional Parameters. */ @@ -1978,6 +2395,20 @@ export interface ServiceRegionConfigurationOptionalParams extends msRest.Request transportAvailabilityRequest?: TransportAvailabilityRequest; } +/** + * Optional Parameters. + */ +export interface ServiceRegionConfigurationByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Request body to get the availability for scheduling orders. + */ + scheduleAvailabilityRequest?: ScheduleAvailabilityRequestUnion; + /** + * Request body to get the transport availability for given sku. + */ + transportAvailabilityRequest?: TransportAvailabilityRequest; +} + /** * An interface representing DataBoxManagementClientOptions. */ @@ -2034,21 +2465,21 @@ export interface AvailableSkusResult extends Array { } /** - * Defines values for DataDestinationType. + * Defines values for DataAccountType. * Possible values include: 'StorageAccount', 'ManagedDisk' * @readonly * @enum {string} */ -export type DataDestinationType = 'StorageAccount' | 'ManagedDisk'; +export type DataAccountType = 'StorageAccount' | 'ManagedDisk'; /** * Defines values for ShareDestinationFormatType. * Possible values include: 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', - * 'ManagedDisk' + * 'ManagedDisk', 'AzurePremiumFiles' * @readonly * @enum {string} */ -export type ShareDestinationFormatType = 'UnknownType' | 'HCS' | 'BlockBlob' | 'PageBlob' | 'AzureFile' | 'ManagedDisk'; +export type ShareDestinationFormatType = 'UnknownType' | 'HCS' | 'BlockBlob' | 'PageBlob' | 'AzureFile' | 'ManagedDisk' | 'AzurePremiumFiles'; /** * Defines values for AccessProtocol. @@ -2074,6 +2505,14 @@ export type AddressValidationStatus = 'Valid' | 'Invalid' | 'Ambiguous'; */ export type AddressType = 'None' | 'Residential' | 'Commercial'; +/** + * Defines values for TransferType. + * Possible values include: 'ImportToAzure', 'ExportFromAzure' + * @readonly + * @enum {string} + */ +export type TransferType = 'ImportToAzure' | 'ExportFromAzure'; + /** * Defines values for SkuName. * Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' @@ -2118,6 +2557,38 @@ export type ValidationStatus = 'Valid' | 'Invalid' | 'Skipped'; */ export type CopyStatus = 'NotStarted' | 'InProgress' | 'Completed' | 'CompletedWithErrors' | 'Failed' | 'NotReturned' | 'HardwareError' | 'DeviceFormatted' | 'DeviceMetadataModified' | 'StorageAccountNotAccessible' | 'UnsupportedData'; +/** + * Defines values for TransferConfigurationType. + * Possible values include: 'TransferAll', 'TransferUsingFilter' + * @readonly + * @enum {string} + */ +export type TransferConfigurationType = 'TransferAll' | 'TransferUsingFilter'; + +/** + * Defines values for FilterFileType. + * Possible values include: 'AzureBlob', 'AzureFile' + * @readonly + * @enum {string} + */ +export type FilterFileType = 'AzureBlob' | 'AzureFile'; + +/** + * Defines values for LogCollectionLevel. + * Possible values include: 'Error', 'Verbose' + * @readonly + * @enum {string} + */ +export type LogCollectionLevel = 'Error' | 'Verbose'; + +/** + * Defines values for DoubleEncryption. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type DoubleEncryption = 'Enabled' | 'Disabled'; + /** * Defines values for StageName. * Possible values include: 'DeviceOrdered', 'DevicePrepared', 'Dispatched', 'Delivered', @@ -2132,11 +2603,11 @@ export type StageName = 'DeviceOrdered' | 'DevicePrepared' | 'Dispatched' | 'Del /** * Defines values for StageStatus. * Possible values include: 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', - * 'SucceededWithErrors' + * 'SucceededWithErrors', 'WaitingForCustomerAction', 'SucceededWithWarnings' * @readonly * @enum {string} */ -export type StageStatus = 'None' | 'InProgress' | 'Succeeded' | 'Failed' | 'Cancelled' | 'Cancelling' | 'SucceededWithErrors'; +export type StageStatus = 'None' | 'InProgress' | 'Succeeded' | 'Failed' | 'Cancelled' | 'Cancelling' | 'SucceededWithErrors' | 'WaitingForCustomerAction' | 'SucceededWithWarnings'; /** * Defines values for TransportShipmentTypes. @@ -2146,6 +2617,14 @@ export type StageStatus = 'None' | 'InProgress' | 'Succeeded' | 'Failed' | 'Canc */ export type TransportShipmentTypes = 'CustomerManaged' | 'MicrosoftManaged'; +/** + * Defines values for KekType. + * Possible values include: 'MicrosoftManaged', 'CustomerManaged' + * @readonly + * @enum {string} + */ +export type KekType = 'MicrosoftManaged' | 'CustomerManaged'; + /** * Defines values for JobDeliveryType. * Possible values include: 'NonScheduled', 'Scheduled' @@ -2423,26 +2902,6 @@ export type JobsListByResourceGroupNextResponse = JobResourceList & { }; }; -/** - * Contains response data for the listAvailableSkus operation. - */ -export type ServiceListAvailableSkusResponse = AvailableSkusResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: AvailableSkusResult; - }; -}; - /** * Contains response data for the listAvailableSkusByResourceGroup operation. */ @@ -2544,9 +3003,9 @@ export type ServiceRegionConfigurationResponse = RegionConfigurationResponse & { }; /** - * Contains response data for the listAvailableSkusNext operation. + * Contains response data for the regionConfigurationByResourceGroup operation. */ -export type ServiceListAvailableSkusNextResponse = AvailableSkusResult & { +export type ServiceRegionConfigurationByResourceGroupResponse = RegionConfigurationResponse & { /** * The underlying HTTP response. */ @@ -2559,7 +3018,7 @@ export type ServiceListAvailableSkusNextResponse = AvailableSkusResult & { /** * The response body as parsed JSON or XML */ - parsedBody: AvailableSkusResult; + parsedBody: RegionConfigurationResponse; }; }; diff --git a/sdk/databox/arm-databox/src/models/jobsMappers.ts b/sdk/databox/arm-databox/src/models/jobsMappers.ts index 5aa3a445167f..862780489977 100644 --- a/sdk/databox/arm-databox/src/models/jobsMappers.ts +++ b/sdk/databox/arm-databox/src/models/jobsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -9,13 +9,18 @@ export { discriminators, AccountCredentialDetails, + AdditionalErrorInfo, + ApiError, ApplianceNetworkConfiguration, + AzureFileFilterDetails, BaseResource, + BlobFilterDetails, CancellationReason, CloudError, ContactDetails, CopyLogDetails, CopyProgress, + DataAccountDetails, DataBoxAccountCopyLogDetails, DataBoxDiskCopyLogDetails, DataBoxDiskCopyProgress, @@ -28,31 +33,44 @@ export { DataBoxJobDetails, DataboxJobSecrets, DataBoxSecret, + DataExportDetails, + DataImportDetails, DcAccessSecurityCode, - DestinationAccountDetails, - DestinationManagedDiskDetails, - DestinationStorageAccountDetails, + Details, DiskSecret, - ErrorModel, + EncryptionPreferences, + ErrorDetail, + FilterFileDetails, + IdentityProperties, JobDeliveryInfo, JobDetails, - JobErrorDetails, JobResource, JobResourceList, JobResourceUpdateParameter, JobSecrets, JobStages, + KeyEncryptionKey, + ManagedDiskDetails, NotificationPreference, PackageShippingDetails, Preferences, Resource, + ResourceIdentity, ShareCredentialDetails, ShipmentPickUpRequest, ShipmentPickUpResponse, ShippingAddress, Sku, + StorageAccountDetails, + TransferAllDetails, + TransferConfiguration, + TransferConfigurationTransferAllDetails, + TransferConfigurationTransferFilterDetails, + TransferFilterDetails, TransportPreferences, UnencryptedCredentials, UnencryptedCredentialsList, - UpdateJobDetails + UpdateJobDetails, + UserAssignedIdentity, + UserAssignedProperties } from "../models/mappers"; diff --git a/sdk/databox/arm-databox/src/models/mappers.ts b/sdk/databox/arm-databox/src/models/mappers.ts index b8820e4085a4..3ca27c414827 100644 --- a/sdk/databox/arm-databox/src/models/mappers.ts +++ b/sdk/databox/arm-databox/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -36,7 +36,8 @@ export const ShareCredentialDetails: msRest.CompositeMapper = { "BlockBlob", "PageBlob", "AzureFile", - "ManagedDisk" + "ManagedDisk", + "AzurePremiumFiles" ] } }, @@ -87,9 +88,9 @@ export const AccountCredentialDetails: msRest.CompositeMapper = { name: "String" } }, - dataDestinationType: { + dataAccountType: { readOnly: true, - serializedName: "dataDestinationType", + serializedName: "dataAccountType", type: { name: "Enum", allowedValues: [ @@ -122,6 +123,28 @@ export const AccountCredentialDetails: msRest.CompositeMapper = { } }; +export const AdditionalErrorInfo: msRest.CompositeMapper = { + serializedName: "AdditionalErrorInfo", + type: { + name: "Composite", + className: "AdditionalErrorInfo", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + info: { + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + export const ShippingAddress: msRest.CompositeMapper = { serializedName: "ShippingAddress", type: { @@ -211,7 +234,7 @@ export const AddressValidationOutput: msRest.CompositeMapper = { serializedName: "properties.error", type: { name: "Composite", - className: "ErrorModel" + className: "CloudError" } }, validationType: { @@ -250,6 +273,90 @@ export const AddressValidationOutput: msRest.CompositeMapper = { } }; +export const Details: msRest.CompositeMapper = { + serializedName: "Details", + type: { + name: "Composite", + className: "Details", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + required: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorDetail: msRest.CompositeMapper = { + serializedName: "ErrorDetail", + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + required: true, + serializedName: "message", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Details" + } + } + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const ApiError: msRest.CompositeMapper = { + serializedName: "ApiError", + type: { + name: "Composite", + className: "ApiError", + modelProperties: { + error: { + required: true, + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + export const ApplianceNetworkConfiguration: msRest.CompositeMapper = { serializedName: "ApplianceNetworkConfiguration", type: { @@ -313,11 +420,13 @@ export const AvailableSkuRequest: msRest.CompositeMapper = { modelProperties: { transferType: { required: true, - isConstant: true, serializedName: "transferType", - defaultValue: 'ImportToAzure', type: { - name: "String" + name: "Enum", + allowedValues: [ + "ImportToAzure", + "ExportFromAzure" + ] } }, country: { @@ -388,15 +497,15 @@ export const Sku: msRest.CompositeMapper = { } }; -export const DestinationToServiceLocationMap: msRest.CompositeMapper = { - serializedName: "DestinationToServiceLocationMap", +export const DataLocationToServiceLocationMap: msRest.CompositeMapper = { + serializedName: "DataLocationToServiceLocationMap", type: { name: "Composite", - className: "DestinationToServiceLocationMap", + className: "DataLocationToServiceLocationMap", modelProperties: { - destinationLocation: { + dataLocation: { readOnly: true, - serializedName: "destinationLocation", + serializedName: "dataLocation", type: { name: "String" } @@ -455,6 +564,13 @@ export const SkuCost: msRest.CompositeMapper = { type: { name: "String" } + }, + multiplier: { + readOnly: true, + serializedName: "multiplier", + type: { + name: "Number" + } } } } @@ -481,15 +597,15 @@ export const SkuInformation: msRest.CompositeMapper = { name: "Boolean" } }, - destinationToServiceLocationMap: { + dataLocationToServiceLocationMap: { readOnly: true, - serializedName: "properties.destinationToServiceLocationMap", + serializedName: "properties.dataLocationToServiceLocationMap", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DestinationToServiceLocationMap" + className: "DataLocationToServiceLocationMap" } } } @@ -560,6 +676,92 @@ export const SkuInformation: msRest.CompositeMapper = { } }; +export const AzureFileFilterDetails: msRest.CompositeMapper = { + serializedName: "AzureFileFilterDetails", + type: { + name: "Composite", + className: "AzureFileFilterDetails", + modelProperties: { + filePrefixList: { + serializedName: "filePrefixList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + filePathList: { + serializedName: "filePathList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + fileShareList: { + serializedName: "fileShareList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BlobFilterDetails: msRest.CompositeMapper = { + serializedName: "BlobFilterDetails", + type: { + name: "Composite", + className: "BlobFilterDetails", + modelProperties: { + blobPrefixList: { + serializedName: "blobPrefixList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + blobPathList: { + serializedName: "blobPathList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + containerList: { + serializedName: "containerList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const CancellationReason: msRest.CompositeMapper = { serializedName: "CancellationReason", type: { @@ -704,9 +906,20 @@ export const CopyProgress: msRest.CompositeMapper = { name: "String" } }, - dataDestinationType: { + transferType: { + readOnly: true, + serializedName: "transferType", + type: { + name: "Enum", + allowedValues: [ + "ImportToAzure", + "ExportFromAzure" + ] + } + }, + dataAccountType: { readOnly: true, - serializedName: "dataDestinationType", + serializedName: "dataAccountType", type: { name: "Enum", allowedValues: [ @@ -722,9 +935,9 @@ export const CopyProgress: msRest.CompositeMapper = { name: "String" } }, - bytesSentToCloud: { + bytesProcessed: { readOnly: true, - serializedName: "bytesSentToCloud", + serializedName: "bytesProcessed", type: { name: "Number" } @@ -777,11 +990,80 @@ export const CopyProgress: msRest.CompositeMapper = { type: { name: "Number" } + }, + directoriesErroredOut: { + readOnly: true, + serializedName: "directoriesErroredOut", + type: { + name: "Number" + } + }, + invalidDirectoriesProcessed: { + readOnly: true, + serializedName: "invalidDirectoriesProcessed", + type: { + name: "Number" + } + }, + isEnumerationInProgress: { + readOnly: true, + serializedName: "isEnumerationInProgress", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ValidationRequest: msRest.CompositeMapper = { + serializedName: "ValidationRequest", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "validationCategory", + clientName: "validationCategory" + }, + uberParent: "ValidationRequest", + className: "ValidationRequest", + modelProperties: { + individualRequestDetails: { + required: true, + serializedName: "individualRequestDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ValidationInputRequest" + } + } + } + }, + validationCategory: { + required: true, + serializedName: "validationCategory", + type: { + name: "String" + } } } } }; +export const CreateJobValidations: msRest.CompositeMapper = { + serializedName: "JobCreationValidation", + type: { + name: "Composite", + polymorphicDiscriminator: ValidationRequest.type.polymorphicDiscriminator, + uberParent: "ValidationRequest", + className: "CreateJobValidations", + modelProperties: { + ...ValidationRequest.type.modelProperties + } + } +}; + export const ValidationInputRequest: msRest.CompositeMapper = { serializedName: "ValidationInputRequest", type: { @@ -845,7 +1127,7 @@ export const ValidationInputResponse: msRest.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "ErrorModel" + className: "CloudError" } }, validationType: { @@ -884,25 +1166,26 @@ export const CreateOrderLimitForSubscriptionValidationResponseProperties: msRest } }; -export const DataBoxAccountCopyLogDetails: msRest.CompositeMapper = { - serializedName: "DataBox", +export const DataAccountDetails: msRest.CompositeMapper = { + serializedName: "DataAccountDetails", type: { name: "Composite", - polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, - uberParent: "CopyLogDetails", - className: "DataBoxAccountCopyLogDetails", + polymorphicDiscriminator: { + serializedName: "dataAccountType", + clientName: "dataAccountType" + }, + uberParent: "DataAccountDetails", + className: "DataAccountDetails", modelProperties: { - ...CopyLogDetails.type.modelProperties, - accountName: { - readOnly: true, - serializedName: "accountName", + sharePassword: { + serializedName: "sharePassword", type: { name: "String" } }, - copyLogLink: { - readOnly: true, - serializedName: "copyLogLink", + dataAccountType: { + required: true, + serializedName: "dataAccountType", type: { name: "String" } @@ -911,8 +1194,42 @@ export const DataBoxAccountCopyLogDetails: msRest.CompositeMapper = { } }; -export const DataBoxDiskCopyLogDetails: msRest.CompositeMapper = { - serializedName: "DataBoxDisk", +export const DataBoxAccountCopyLogDetails: msRest.CompositeMapper = { + serializedName: "DataBox", + type: { + name: "Composite", + polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, + uberParent: "CopyLogDetails", + className: "DataBoxAccountCopyLogDetails", + modelProperties: { + ...CopyLogDetails.type.modelProperties, + accountName: { + readOnly: true, + serializedName: "accountName", + type: { + name: "String" + } + }, + copyLogLink: { + readOnly: true, + serializedName: "copyLogLink", + type: { + name: "String" + } + }, + copyVerboseLogLink: { + readOnly: true, + serializedName: "copyVerboseLogLink", + type: { + name: "String" + } + } + } + } +}; + +export const DataBoxDiskCopyLogDetails: msRest.CompositeMapper = { + serializedName: "DataBoxDisk", type: { name: "Composite", polymorphicDiscriminator: CopyLogDetails.type.polymorphicDiscriminator, @@ -1007,12 +1324,6 @@ export const JobDetails: msRest.CompositeMapper = { uberParent: "JobDetails", className: "JobDetails", modelProperties: { - expectedDataSizeInTerabytes: { - serializedName: "expectedDataSizeInTerabytes", - type: { - name: "Number" - } - }, jobStages: { readOnly: true, serializedName: "jobStages", @@ -1035,7 +1346,6 @@ export const JobDetails: msRest.CompositeMapper = { } }, shippingAddress: { - required: true, serializedName: "shippingAddress", type: { name: "Composite", @@ -1058,28 +1368,26 @@ export const JobDetails: msRest.CompositeMapper = { className: "PackageShippingDetails" } }, - destinationAccountDetails: { - required: true, - serializedName: "destinationAccountDetails", + dataImportDetails: { + serializedName: "dataImportDetails", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DestinationAccountDetails" + className: "DataImportDetails" } } } }, - errorDetails: { - readOnly: true, - serializedName: "errorDetails", + dataExportDetails: { + serializedName: "dataExportDetails", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobErrorDetails" + className: "DataExportDetails" } } } @@ -1118,6 +1426,20 @@ export const JobDetails: msRest.CompositeMapper = { name: "String" } }, + keyEncryptionKey: { + readOnly: true, + serializedName: "keyEncryptionKey", + type: { + name: "Composite", + className: "KeyEncryptionKey" + } + }, + expectedDataSizeInTerabytes: { + serializedName: "expectedDataSizeInTerabytes", + type: { + name: "Number" + } + }, jobDetailsType: { required: true, serializedName: "jobDetailsType", @@ -1220,12 +1542,21 @@ export const JobSecrets: msRest.CompositeMapper = { className: "JobSecrets", modelProperties: { dcAccessSecurityCode: { + readOnly: true, serializedName: "dcAccessSecurityCode", type: { name: "Composite", className: "DcAccessSecurityCode" } }, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "CloudError" + } + }, jobSecretsType: { required: true, serializedName: "jobSecretsType", @@ -1304,6 +1635,18 @@ export const DataBoxHeavyAccountCopyLogDetails: msRest.CompositeMapper = { } } } + }, + copyVerboseLogLink: { + readOnly: true, + serializedName: "copyVerboseLogLink", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1556,6 +1899,12 @@ export const ScheduleAvailabilityRequest: msRest.CompositeMapper = { name: "String" } }, + country: { + serializedName: "country", + type: { + name: "String" + } + }, skuName: { required: true, serializedName: "skuName", @@ -1580,32 +1929,26 @@ export const DataBoxScheduleAvailabilityRequest: msRest.CompositeMapper = { } }; -export const DestinationAccountDetails: msRest.CompositeMapper = { - serializedName: "DestinationAccountDetails", +export const FilterFileDetails: msRest.CompositeMapper = { + serializedName: "FilterFileDetails", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "dataDestinationType", - clientName: "dataDestinationType" - }, - uberParent: "DestinationAccountDetails", - className: "DestinationAccountDetails", + className: "FilterFileDetails", modelProperties: { - accountId: { - serializedName: "accountId", - type: { - name: "String" - } - }, - sharePassword: { - serializedName: "sharePassword", + filterFileType: { + required: true, + serializedName: "filterFileType", type: { - name: "String" + name: "Enum", + allowedValues: [ + "AzureBlob", + "AzureFile" + ] } }, - dataDestinationType: { + filterFilePath: { required: true, - serializedName: "dataDestinationType", + serializedName: "filterFilePath", type: { name: "String" } @@ -1614,125 +1957,308 @@ export const DestinationAccountDetails: msRest.CompositeMapper = { } }; -export const DataDestinationDetailsValidationRequest: msRest.CompositeMapper = { - serializedName: "ValidateDataDestinationDetails", +export const TransferFilterDetails: msRest.CompositeMapper = { + serializedName: "TransferFilterDetails", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, - uberParent: "ValidationInputRequest", - className: "DataDestinationDetailsValidationRequest", + className: "TransferFilterDetails", modelProperties: { - ...ValidationInputRequest.type.modelProperties, - destinationAccountDetails: { + dataAccountType: { required: true, - serializedName: "destinationAccountDetails", + serializedName: "dataAccountType", + type: { + name: "Enum", + allowedValues: [ + "StorageAccount", + "ManagedDisk" + ] + } + }, + blobFilterDetails: { + serializedName: "blobFilterDetails", + type: { + name: "Composite", + className: "BlobFilterDetails" + } + }, + azureFileFilterDetails: { + serializedName: "azureFileFilterDetails", + type: { + name: "Composite", + className: "AzureFileFilterDetails" + } + }, + filterFileDetails: { + serializedName: "filterFileDetails", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DestinationAccountDetails" + className: "FilterFileDetails" } } } - }, - location: { - required: true, - serializedName: "location", + } + } + } +}; + +export const TransferConfigurationTransferFilterDetails: msRest.CompositeMapper = { + serializedName: "TransferConfiguration_transferFilterDetails", + type: { + name: "Composite", + className: "TransferConfigurationTransferFilterDetails", + modelProperties: { + include: { + serializedName: "include", type: { - name: "String" + name: "Composite", + className: "TransferFilterDetails" } } } } }; -export const DataDestinationDetailsValidationResponseProperties: msRest.CompositeMapper = { - serializedName: "ValidateDataDestinationDetails", +export const TransferAllDetails: msRest.CompositeMapper = { + serializedName: "TransferAllDetails", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, - uberParent: "ValidationInputResponse", - className: "DataDestinationDetailsValidationResponseProperties", + className: "TransferAllDetails", modelProperties: { - ...ValidationInputResponse.type.modelProperties, - status: { - readOnly: true, - serializedName: "status", + dataAccountType: { + required: true, + serializedName: "dataAccountType", type: { name: "Enum", allowedValues: [ - "Valid", - "Invalid", - "Skipped" + "StorageAccount", + "ManagedDisk" ] } + }, + transferAllBlobs: { + serializedName: "transferAllBlobs", + type: { + name: "Boolean" + } + }, + transferAllFiles: { + serializedName: "transferAllFiles", + type: { + name: "Boolean" + } } } } }; -export const DcAccessSecurityCode: msRest.CompositeMapper = { - serializedName: "DcAccessSecurityCode", +export const TransferConfigurationTransferAllDetails: msRest.CompositeMapper = { + serializedName: "TransferConfiguration_transferAllDetails", type: { name: "Composite", - className: "DcAccessSecurityCode", + className: "TransferConfigurationTransferAllDetails", modelProperties: { - forwardDcAccessCode: { - serializedName: "forwardDcAccessCode", + include: { + serializedName: "include", type: { - name: "String" + name: "Composite", + className: "TransferAllDetails" + } + } + } + } +}; + +export const TransferConfiguration: msRest.CompositeMapper = { + serializedName: "TransferConfiguration", + type: { + name: "Composite", + className: "TransferConfiguration", + modelProperties: { + transferConfigurationType: { + required: true, + serializedName: "transferConfigurationType", + type: { + name: "Enum", + allowedValues: [ + "TransferAll", + "TransferUsingFilter" + ] } }, - reverseDcAccessCode: { - serializedName: "reverseDcAccessCode", + transferFilterDetails: { + serializedName: "transferFilterDetails", type: { - name: "String" + name: "Composite", + className: "TransferConfigurationTransferFilterDetails" + } + }, + transferAllDetails: { + serializedName: "transferAllDetails", + type: { + name: "Composite", + className: "TransferConfigurationTransferAllDetails" } } } } }; -export const DestinationManagedDiskDetails: msRest.CompositeMapper = { - serializedName: "ManagedDisk", +export const DataExportDetails: msRest.CompositeMapper = { + serializedName: "DataExportDetails", type: { name: "Composite", - polymorphicDiscriminator: DestinationAccountDetails.type.polymorphicDiscriminator, - uberParent: "DestinationAccountDetails", - className: "DestinationManagedDiskDetails", + className: "DataExportDetails", modelProperties: { - ...DestinationAccountDetails.type.modelProperties, - resourceGroupId: { + transferConfiguration: { required: true, - serializedName: "resourceGroupId", + serializedName: "transferConfiguration", type: { - name: "String" + name: "Composite", + className: "TransferConfiguration" } }, - stagingStorageAccountId: { + logCollectionLevel: { + serializedName: "logCollectionLevel", + type: { + name: "Enum", + allowedValues: [ + "Error", + "Verbose" + ] + } + }, + accountDetails: { required: true, - serializedName: "stagingStorageAccountId", + serializedName: "accountDetails", type: { - name: "String" + name: "Composite", + className: "DataAccountDetails" } } } } }; -export const DestinationStorageAccountDetails: msRest.CompositeMapper = { - serializedName: "StorageAccount", +export const DataImportDetails: msRest.CompositeMapper = { + serializedName: "DataImportDetails", type: { name: "Composite", - polymorphicDiscriminator: DestinationAccountDetails.type.polymorphicDiscriminator, - uberParent: "DestinationAccountDetails", - className: "DestinationStorageAccountDetails", + className: "DataImportDetails", modelProperties: { - ...DestinationAccountDetails.type.modelProperties, - storageAccountId: { + accountDetails: { required: true, - serializedName: "storageAccountId", + serializedName: "accountDetails", + type: { + name: "Composite", + className: "DataAccountDetails" + } + } + } + } +}; + +export const DataTransferDetailsValidationRequest: msRest.CompositeMapper = { + serializedName: "ValidateDataTransferDetails", + type: { + name: "Composite", + polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, + uberParent: "ValidationInputRequest", + className: "DataTransferDetailsValidationRequest", + modelProperties: { + ...ValidationInputRequest.type.modelProperties, + dataExportDetails: { + serializedName: "dataExportDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataExportDetails" + } + } + } + }, + dataImportDetails: { + serializedName: "dataImportDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataImportDetails" + } + } + } + }, + deviceType: { + required: true, + serializedName: "deviceType", + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy" + ] + } + }, + transferType: { + required: true, + serializedName: "transferType", + type: { + name: "Enum", + allowedValues: [ + "ImportToAzure", + "ExportFromAzure" + ] + } + } + } + } +}; + +export const DataTransferDetailsValidationResponseProperties: msRest.CompositeMapper = { + serializedName: "ValidateDataTransferDetails", + type: { + name: "Composite", + polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, + uberParent: "ValidationInputResponse", + className: "DataTransferDetailsValidationResponseProperties", + modelProperties: { + ...ValidationInputResponse.type.modelProperties, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "Enum", + allowedValues: [ + "Valid", + "Invalid", + "Skipped" + ] + } + } + } + } +}; + +export const DcAccessSecurityCode: msRest.CompositeMapper = { + serializedName: "DcAccessSecurityCode", + type: { + name: "Composite", + className: "DcAccessSecurityCode", + modelProperties: { + reverseDcAccessCode: { + serializedName: "reverseDcAccessCode", + type: { + name: "String" + } + }, + forwardDcAccessCode: { + serializedName: "forwardDcAccessCode", type: { name: "String" } @@ -1761,24 +2287,20 @@ export const DiskScheduleAvailabilityRequest: msRest.CompositeMapper = { } }; -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", +export const EncryptionPreferences: msRest.CompositeMapper = { + serializedName: "EncryptionPreferences", type: { name: "Composite", - className: "ErrorModel", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "message", + className: "EncryptionPreferences", + modelProperties: { + doubleEncryption: { + serializedName: "doubleEncryption", type: { - name: "String" + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] } } } @@ -1798,54 +2320,55 @@ export const HeavyScheduleAvailabilityRequest: msRest.CompositeMapper = { } }; -export const JobDeliveryInfo: msRest.CompositeMapper = { - serializedName: "JobDeliveryInfo", +export const UserAssignedProperties: msRest.CompositeMapper = { + serializedName: "UserAssignedProperties", type: { name: "Composite", - className: "JobDeliveryInfo", + className: "UserAssignedProperties", modelProperties: { - scheduledDateTime: { - serializedName: "scheduledDateTime", + resourceId: { + serializedName: "resourceId", type: { - name: "DateTime" + name: "String" } } } } }; -export const JobErrorDetails: msRest.CompositeMapper = { - serializedName: "JobErrorDetails", +export const IdentityProperties: msRest.CompositeMapper = { + serializedName: "IdentityProperties", type: { name: "Composite", - className: "JobErrorDetails", + className: "IdentityProperties", modelProperties: { - errorMessage: { - readOnly: true, - serializedName: "errorMessage", + type: { + serializedName: "type", type: { name: "String" } }, - errorCode: { - readOnly: true, - serializedName: "errorCode", - type: { - name: "Number" - } - }, - recommendedAction: { - readOnly: true, - serializedName: "recommendedAction", + userAssigned: { + serializedName: "userAssigned", type: { - name: "String" + name: "Composite", + className: "UserAssignedProperties" } - }, - exceptionMessage: { - readOnly: true, - serializedName: "exceptionMessage", + } + } + } +}; + +export const JobDeliveryInfo: msRest.CompositeMapper = { + serializedName: "JobDeliveryInfo", + type: { + name: "Composite", + className: "JobDeliveryInfo", + modelProperties: { + scheduledDateTime: { + serializedName: "scheduledDateTime", type: { - name: "String" + name: "DateTime" } } } @@ -1902,7 +2425,9 @@ export const JobStages: msRest.CompositeMapper = { "Failed", "Cancelled", "Cancelling", - "SucceededWithErrors" + "SucceededWithErrors", + "WaitingForCustomerAction", + "SucceededWithWarnings" ] } }, @@ -1919,19 +2444,6 @@ export const JobStages: msRest.CompositeMapper = { type: { name: "Object" } - }, - errorDetails: { - readOnly: true, - serializedName: "errorDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobErrorDetails" - } - } - } } } } @@ -2012,6 +2524,53 @@ export const Preferences: msRest.CompositeMapper = { name: "Composite", className: "TransportPreferences" } + }, + encryptionPreferences: { + serializedName: "encryptionPreferences", + type: { + name: "Composite", + className: "EncryptionPreferences" + } + } + } + } +}; + +export const KeyEncryptionKey: msRest.CompositeMapper = { + serializedName: "KeyEncryptionKey", + type: { + name: "Composite", + className: "KeyEncryptionKey", + modelProperties: { + kekType: { + required: true, + serializedName: "kekType", + type: { + name: "Enum", + allowedValues: [ + "MicrosoftManaged", + "CustomerManaged" + ] + } + }, + identityProperties: { + serializedName: "identityProperties", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + kekUrl: { + serializedName: "kekUrl", + type: { + name: "String" + } + }, + kekVaultResourceID: { + serializedName: "kekVaultResourceID", + type: { + name: "String" + } } } } @@ -2048,6 +2607,13 @@ export const Resource: msRest.CompositeMapper = { name: "Composite", className: "Sku" } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } } } } @@ -2060,6 +2626,17 @@ export const JobResource: msRest.CompositeMapper = { className: "JobResource", modelProperties: { ...Resource.type.modelProperties, + transferType: { + required: true, + serializedName: "properties.transferType", + type: { + name: "Enum", + allowedValues: [ + "ImportToAzure", + "ExportFromAzure" + ] + } + }, isCancellable: { readOnly: true, serializedName: "properties.isCancellable", @@ -2081,6 +2658,13 @@ export const JobResource: msRest.CompositeMapper = { name: "Boolean" } }, + isPrepareToShipEnabled: { + readOnly: true, + serializedName: "properties.isPrepareToShipEnabled", + type: { + name: "Boolean" + } + }, status: { readOnly: true, serializedName: "properties.status", @@ -2118,7 +2702,7 @@ export const JobResource: msRest.CompositeMapper = { serializedName: "properties.error", type: { name: "Composite", - className: "ErrorModel" + className: "CloudError" } }, details: { @@ -2203,35 +2787,96 @@ export const UpdateJobDetails: msRest.CompositeMapper = { name: "Composite", className: "ShippingAddress" } + }, + keyEncryptionKey: { + serializedName: "keyEncryptionKey", + type: { + name: "Composite", + className: "KeyEncryptionKey" + } } } } }; -export const JobResourceUpdateParameter: msRest.CompositeMapper = { - serializedName: "JobResourceUpdateParameter", +export const UserAssignedIdentity: msRest.CompositeMapper = { + serializedName: "UserAssignedIdentity", type: { name: "Composite", - className: "JobResourceUpdateParameter", + className: "UserAssignedIdentity", modelProperties: { - details: { - serializedName: "properties.details", + principalId: { + readOnly: true, + serializedName: "principalId", type: { - name: "Composite", - className: "UpdateJobDetails" + name: "String" } }, - destinationAccountDetails: { - serializedName: "properties.destinationAccountDetails", + clientId: { + readOnly: true, + serializedName: "clientId", type: { - name: "Sequence", - element: { + name: "String" + } + } + } + } +}; + +export const ResourceIdentity: msRest.CompositeMapper = { + serializedName: "ResourceIdentity", + type: { + name: "Composite", + className: "ResourceIdentity", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { type: { name: "Composite", - className: "DestinationAccountDetails" + className: "UserAssignedIdentity" } } } + } + } + } +}; + +export const JobResourceUpdateParameter: msRest.CompositeMapper = { + serializedName: "JobResourceUpdateParameter", + type: { + name: "Composite", + className: "JobResourceUpdateParameter", + modelProperties: { + details: { + serializedName: "properties.details", + type: { + name: "Composite", + className: "UpdateJobDetails" + } }, tags: { serializedName: "tags", @@ -2243,6 +2888,40 @@ export const JobResourceUpdateParameter: msRest.CompositeMapper = { } } } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + } + } + } +}; + +export const ManagedDiskDetails: msRest.CompositeMapper = { + serializedName: "ManagedDisk", + type: { + name: "Composite", + polymorphicDiscriminator: DataAccountDetails.type.polymorphicDiscriminator, + uberParent: "DataAccountDetails", + className: "ManagedDiskDetails", + modelProperties: { + ...DataAccountDetails.type.modelProperties, + resourceGroupId: { + required: true, + serializedName: "resourceGroupId", + type: { + name: "String" + } + }, + stagingStorageAccountId: { + required: true, + serializedName: "stagingStorageAccountId", + type: { + name: "String" + } } } } @@ -2316,6 +2995,12 @@ export const Operation: msRest.CompositeMapper = { type: { name: "String" } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } } } } @@ -2593,11 +3278,13 @@ export const SkuAvailabilityValidationRequest: msRest.CompositeMapper = { }, transferType: { required: true, - isConstant: true, serializedName: "transferType", - defaultValue: 'ImportToAzure', type: { - name: "String" + name: "Enum", + allowedValues: [ + "ImportToAzure", + "ExportFromAzure" + ] } }, country: { @@ -2643,6 +3330,26 @@ export const SkuAvailabilityValidationResponseProperties: msRest.CompositeMapper } }; +export const StorageAccountDetails: msRest.CompositeMapper = { + serializedName: "StorageAccount", + type: { + name: "Composite", + polymorphicDiscriminator: DataAccountDetails.type.polymorphicDiscriminator, + uberParent: "DataAccountDetails", + className: "StorageAccountDetails", + modelProperties: { + ...DataAccountDetails.type.modelProperties, + storageAccountId: { + required: true, + serializedName: "storageAccountId", + type: { + name: "String" + } + } + } + } +}; + export const SubscriptionIsAllowedToCreateJobValidationRequest: msRest.CompositeMapper = { serializedName: "ValidateSubscriptionIsAllowedToCreateJob", type: { @@ -2746,54 +3453,6 @@ export const ValidateAddress: msRest.CompositeMapper = { } }; -export const ValidationRequest: msRest.CompositeMapper = { - serializedName: "ValidationRequest", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "validationCategory", - clientName: "validationCategory" - }, - uberParent: "ValidationRequest", - className: "ValidationRequest", - modelProperties: { - individualRequestDetails: { - required: true, - serializedName: "individualRequestDetails", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ValidationInputRequest" - } - } - } - }, - validationCategory: { - required: true, - serializedName: "validationCategory", - type: { - name: "String" - } - } - } - } -}; - -export const CreateJobValidations: msRest.CompositeMapper = { - serializedName: "JobCreationValidation", - type: { - name: "Composite", - polymorphicDiscriminator: ValidationRequest.type.polymorphicDiscriminator, - uberParent: "ValidationRequest", - className: "CreateJobValidations", - modelProperties: { - ...ValidationRequest.type.modelProperties - } - } -}; - export const ValidationResponse: msRest.CompositeMapper = { serializedName: "ValidationResponse", type: { @@ -2939,8 +3598,10 @@ export const AvailableSkusResult: msRest.CompositeMapper = { export const discriminators = { 'CopyLogDetails' : CopyLogDetails, + 'ValidationRequest.JobCreationValidation' : CreateJobValidations, 'ValidationInputRequest.ValidateCreateOrderLimit' : CreateOrderLimitForSubscriptionValidationRequest, 'ValidationInputResponse.ValidateCreateOrderLimit' : CreateOrderLimitForSubscriptionValidationResponseProperties, + 'DataAccountDetails' : DataAccountDetails, 'CopyLogDetails.DataBox' : DataBoxAccountCopyLogDetails, 'CopyLogDetails.DataBoxDisk' : DataBoxDiskCopyLogDetails, 'JobDetails.DataBoxDisk' : DataBoxDiskJobDetails, @@ -2951,26 +3612,24 @@ export const discriminators = { 'JobDetails.DataBox' : DataBoxJobDetails, 'JobSecrets.DataBox' : DataboxJobSecrets, 'ScheduleAvailabilityRequest.DataBox' : DataBoxScheduleAvailabilityRequest, - 'DestinationAccountDetails' : DestinationAccountDetails, - 'ValidationInputRequest.ValidateDataDestinationDetails' : DataDestinationDetailsValidationRequest, - 'ValidationInputResponse.ValidateDataDestinationDetails' : DataDestinationDetailsValidationResponseProperties, - 'DestinationAccountDetails.ManagedDisk' : DestinationManagedDiskDetails, - 'DestinationAccountDetails.StorageAccount' : DestinationStorageAccountDetails, + 'ValidationInputRequest.ValidateDataTransferDetails' : DataTransferDetailsValidationRequest, + 'ValidationInputResponse.ValidateDataTransferDetails' : DataTransferDetailsValidationResponseProperties, 'ScheduleAvailabilityRequest.DataBoxDisk' : DiskScheduleAvailabilityRequest, 'ScheduleAvailabilityRequest.DataBoxHeavy' : HeavyScheduleAvailabilityRequest, 'JobDetails' : JobDetails, 'JobSecrets' : JobSecrets, + 'DataAccountDetails.ManagedDisk' : ManagedDiskDetails, 'ValidationInputRequest.ValidatePreferences' : PreferencesValidationRequest, 'ValidationInputResponse.ValidatePreferences' : PreferencesValidationResponseProperties, 'ScheduleAvailabilityRequest' : ScheduleAvailabilityRequest, 'ValidationInputRequest.ValidateSkuAvailability' : SkuAvailabilityValidationRequest, 'ValidationInputResponse.ValidateSkuAvailability' : SkuAvailabilityValidationResponseProperties, + 'DataAccountDetails.StorageAccount' : StorageAccountDetails, 'ValidationInputRequest.ValidateSubscriptionIsAllowedToCreateJob' : SubscriptionIsAllowedToCreateJobValidationRequest, 'ValidationInputResponse.ValidateSubscriptionIsAllowedToCreateJob' : SubscriptionIsAllowedToCreateJobValidationResponseProperties, 'ValidationInputRequest.ValidateAddress' : ValidateAddress, 'ValidationInputRequest' : ValidationInputRequest, 'ValidationInputResponse' : ValidationInputResponse, - 'ValidationRequest' : ValidationRequest, - 'ValidationRequest.JobCreationValidation' : CreateJobValidations + 'ValidationRequest' : ValidationRequest }; diff --git a/sdk/databox/arm-databox/src/models/operationsMappers.ts b/sdk/databox/arm-databox/src/models/operationsMappers.ts index 786d9130f59f..92301bd37dbf 100644 --- a/sdk/databox/arm-databox/src/models/operationsMappers.ts +++ b/sdk/databox/arm-databox/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,7 +8,9 @@ export { discriminators, - CloudError, + ApiError, + Details, + ErrorDetail, Operation, OperationDisplay, OperationList diff --git a/sdk/databox/arm-databox/src/models/parameters.ts b/sdk/databox/arm-databox/src/models/parameters.ts index fd0c31593682..4844dd3f84e6 100644 --- a/sdk/databox/arm-databox/src/models/parameters.ts +++ b/sdk/databox/arm-databox/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/databox/arm-databox/src/models/serviceMappers.ts b/sdk/databox/arm-databox/src/models/serviceMappers.ts index 42db69bd2f00..500704e5ba4e 100644 --- a/sdk/databox/arm-databox/src/models/serviceMappers.ts +++ b/sdk/databox/arm-databox/src/models/serviceMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -8,23 +8,31 @@ export { discriminators, + AdditionalErrorInfo, AddressValidationOutput, + ApiError, AvailableSkuRequest, AvailableSkusResult, + AzureFileFilterDetails, + BlobFilterDetails, CloudError, CreateJobValidations, CreateOrderLimitForSubscriptionValidationRequest, CreateOrderLimitForSubscriptionValidationResponseProperties, + DataAccountDetails, DataBoxScheduleAvailabilityRequest, - DataDestinationDetailsValidationRequest, - DataDestinationDetailsValidationResponseProperties, - DestinationAccountDetails, - DestinationManagedDiskDetails, - DestinationStorageAccountDetails, - DestinationToServiceLocationMap, + DataExportDetails, + DataImportDetails, + DataLocationToServiceLocationMap, + DataTransferDetailsValidationRequest, + DataTransferDetailsValidationResponseProperties, + Details, DiskScheduleAvailabilityRequest, - ErrorModel, + EncryptionPreferences, + ErrorDetail, + FilterFileDetails, HeavyScheduleAvailabilityRequest, + ManagedDiskDetails, Preferences, PreferencesValidationRequest, PreferencesValidationResponseProperties, @@ -39,8 +47,14 @@ export { SkuCapacity, SkuCost, SkuInformation, + StorageAccountDetails, SubscriptionIsAllowedToCreateJobValidationRequest, SubscriptionIsAllowedToCreateJobValidationResponseProperties, + TransferAllDetails, + TransferConfiguration, + TransferConfigurationTransferAllDetails, + TransferConfigurationTransferFilterDetails, + TransferFilterDetails, TransportAvailabilityDetails, TransportAvailabilityRequest, TransportAvailabilityResponse, diff --git a/sdk/databox/arm-databox/src/operations/index.ts b/sdk/databox/arm-databox/src/operations/index.ts index 795e0da39869..36e4cd427ff8 100644 --- a/sdk/databox/arm-databox/src/operations/index.ts +++ b/sdk/databox/arm-databox/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/databox/arm-databox/src/operations/jobs.ts b/sdk/databox/arm-databox/src/operations/jobs.ts index e54ed30dd8b2..49c847d50ad4 100644 --- a/sdk/databox/arm-databox/src/operations/jobs.ts +++ b/sdk/databox/arm-databox/src/operations/jobs.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -337,7 +336,7 @@ export class Jobs { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.JobsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -348,8 +347,8 @@ export class Jobs { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.JobsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.JobsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -365,7 +364,7 @@ export class Jobs { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: Models.JobsListByResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -376,8 +375,8 @@ export class Jobs { * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: Models.JobsListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.JobsListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -408,7 +407,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -433,7 +432,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -459,7 +458,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.JobResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -491,7 +490,7 @@ const bookShipmentPickUpOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ShipmentPickUpResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -523,7 +522,7 @@ const cancelOperationSpec: msRest.OperationSpec = { responses: { 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -548,7 +547,7 @@ const listCredentialsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.UnencryptedCredentialsList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -581,7 +580,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { }, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -602,10 +601,11 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -639,7 +639,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { }, 202: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -652,6 +652,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], headerParameters: [ Parameters.acceptLanguage ], @@ -660,7 +664,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -673,6 +677,10 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skipToken + ], headerParameters: [ Parameters.acceptLanguage ], @@ -681,7 +689,7 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.JobResourceList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer diff --git a/sdk/databox/arm-databox/src/operations/operations.ts b/sdk/databox/arm-databox/src/operations/operations.ts index 800bafca8a60..82b2b601181e 100644 --- a/sdk/databox/arm-databox/src/operations/operations.ts +++ b/sdk/databox/arm-databox/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -95,7 +94,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -116,7 +118,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer diff --git a/sdk/databox/arm-databox/src/operations/service.ts b/sdk/databox/arm-databox/src/operations/service.ts index 8ccece21381d..8e28020c35c3 100644 --- a/sdk/databox/arm-databox/src/operations/service.ts +++ b/sdk/databox/arm-databox/src/operations/service.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -26,38 +25,6 @@ export class Service { this.client = client; } - /** - * This method provides the list of available skus for the given subscription and location. - * @param location The location of the resource - * @param availableSkuRequest Filters for showing the available skus. - * @param [options] The optional parameters - * @returns Promise - */ - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The location of the resource - * @param availableSkuRequest Filters for showing the available skus. - * @param callback The callback - */ - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, callback: msRest.ServiceCallback): void; - /** - * @param location The location of the resource - * @param availableSkuRequest Filters for showing the available skus. - * @param options The optional parameters - * @param callback The callback - */ - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableSkus(location: string, availableSkuRequest: Models.AvailableSkuRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - location, - availableSkuRequest, - options - }, - listAvailableSkusOperationSpec, - callback) as Promise; - } - /** * This method provides the list of available skus for the given subscription, resource group and * location. @@ -96,7 +63,7 @@ export class Service { } /** - * [DEPRECATED NOTICE: This operation will soon be removed] This method validates the customer + * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer * shipping address and provide alternate addresses if any. * @param location The location of the resource * @param validateAddress Shipping address of the customer. @@ -200,7 +167,7 @@ export class Service { } /** - * This API provides configuration details specific to given region/location. + * This API provides configuration details specific to given region/location at Subscription level. * @param location The location of the resource * @param [options] The optional parameters * @returns Promise @@ -228,31 +195,36 @@ export class Service { } /** - * This method provides the list of available skus for the given subscription and location. - * @param nextPageLink The NextLink from the previous successful call to List operation. + * This API provides configuration details specific to given region/location at Resource group + * level. + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listAvailableSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + regionConfigurationByResourceGroup(resourceGroupName: string, location: string, options?: Models.ServiceRegionConfigurationByResourceGroupOptionalParams): Promise; /** - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource * @param callback The callback */ - listAvailableSkusNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + regionConfigurationByResourceGroup(resourceGroupName: string, location: string, callback: msRest.ServiceCallback): void; /** - * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param resourceGroupName The Resource Group Name + * @param location The location of the resource * @param options The optional parameters * @param callback The callback */ - listAvailableSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAvailableSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + regionConfigurationByResourceGroup(resourceGroupName: string, location: string, options: Models.ServiceRegionConfigurationByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + regionConfigurationByResourceGroup(resourceGroupName: string, location: string, options?: Models.ServiceRegionConfigurationByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - nextPageLink, + resourceGroupName, + location, options }, - listAvailableSkusNextOperationSpec, - callback) as Promise; + regionConfigurationByResourceGroupOperationSpec, + callback) as Promise; } /** @@ -287,37 +259,6 @@ export class Service { // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listAvailableSkusOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/availableSkus", - urlParameters: [ - Parameters.subscriptionId, - Parameters.location - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "availableSkuRequest", - mapper: { - ...Mappers.AvailableSkuRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.AvailableSkusResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const listAvailableSkusByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus", @@ -344,7 +285,7 @@ const listAvailableSkusByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AvailableSkusResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -375,7 +316,7 @@ const validateAddressMethodOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AddressValidationOutput }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -407,7 +348,7 @@ const validateInputsByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ValidationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -438,7 +379,7 @@ const validateInputsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ValidationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -478,28 +419,48 @@ const regionConfigurationOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RegionConfigurationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer }; -const listAvailableSkusNextOperationSpec: msRest.OperationSpec = { +const regionConfigurationByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - baseUrl: "https://management.azure.com", - path: "{nextLink}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration", urlParameters: [ - Parameters.nextPageLink + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: { + scheduleAvailabilityRequest: [ + "options", + "scheduleAvailabilityRequest" + ], + transportAvailabilityRequest: [ + "options", + "transportAvailabilityRequest" + ] + }, + mapper: { + ...Mappers.RegionConfigurationRequest, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.AvailableSkusResult + bodyMapper: Mappers.RegionConfigurationResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer @@ -512,6 +473,9 @@ const listAvailableSkusByResourceGroupNextOperationSpec: msRest.OperationSpec = urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -520,7 +484,7 @@ const listAvailableSkusByResourceGroupNextOperationSpec: msRest.OperationSpec = bodyMapper: Mappers.AvailableSkusResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ApiError } }, serializer