From d28a8fcc65172de3685a5d226dc2ef0aa339977c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 16 Aug 2021 02:16:04 +0000 Subject: [PATCH] CodeGen from PR 15655 in Azure/azure-rest-api-specs Merge 3e780a61d1d5cf8ee9847efc1a0f8e238656ac33 into 9593dd087d60017b83cfc590ffea5d7374a3f734 --- sdk/databox/arm-databox/LICENSE.txt | 2 +- sdk/databox/arm-databox/README.md | 9 +- sdk/databox/arm-databox/package.json | 2 +- sdk/databox/arm-databox/rollup.config.js | 4 +- .../src/dataBoxManagementClient.ts | 80 +- .../src/dataBoxManagementClientContext.ts | 9 +- sdk/databox/arm-databox/src/models/index.ts | 1072 ++++++++++--- .../arm-databox/src/models/jobsMappers.ts | 36 +- sdk/databox/arm-databox/src/models/mappers.ts | 1384 +++++++++++++---- .../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 +- 16 files changed, 2162 insertions(+), 694 deletions(-) diff --git a/sdk/databox/arm-databox/LICENSE.txt b/sdk/databox/arm-databox/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/databox/arm-databox/LICENSE.txt +++ b/sdk/databox/arm-databox/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/databox/arm-databox/README.md b/sdk/databox/arm-databox/README.md index da15b9671dab..f8fcc30937ea 100644 --- a/sdk/databox/arm-databox/README.md +++ b/sdk/databox/arm-databox/README.md @@ -1,11 +1,11 @@ ## Azure DataBoxManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for DataBoxManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for DataBoxManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-databox @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new DataBoxManagementClient(creds, subscriptionId); - client.operations.list().then((result) => { console.log("The result is:"); console.log(result); @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmDatabox.DataBoxManagementClient(creds, subscriptionId); client.operations.list().then((result) => { diff --git a/sdk/databox/arm-databox/package.json b/sdk/databox/arm-databox/package.json index 3f474e86ade1..87119f917cdc 100644 --- a/sdk/databox/arm-databox/package.json +++ b/sdk/databox/arm-databox/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/databox/arm-databox", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/databox/arm-databox", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" 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 ef58e9ba9067..de2b66b03678 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 @@ -12,6 +11,7 @@ import * as msRest from "@azure/ms-rest-js"; import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { DataBoxManagementClientContext } from "./dataBoxManagementClientContext"; @@ -39,9 +39,83 @@ class DataBoxManagementClient extends DataBoxManagementClientContext { this.jobs = new operations.Jobs(this); this.service = new operations.Service(this); } + + /** + * Request to mitigate for a given job + * @param jobName The name of the job Resource within the specified resource group. job names must + * be between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param resourceGroupName The Resource Group Name + * @param customerResolutionCode Resolution code for the job. Possible values include: 'None', + * 'MoveToCleanUpDevice', 'Resume' + * @param [options] The optional parameters + * @returns Promise + */ + mitigate(jobName: string, resourceGroupName: string, customerResolutionCode: Models.CustomerResolutionCode, options?: msRest.RequestOptionsBase): Promise; + /** + * @param jobName The name of the job Resource within the specified resource group. job names must + * be between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param resourceGroupName The Resource Group Name + * @param customerResolutionCode Resolution code for the job. Possible values include: 'None', + * 'MoveToCleanUpDevice', 'Resume' + * @param callback The callback + */ + mitigate(jobName: string, resourceGroupName: string, customerResolutionCode: Models.CustomerResolutionCode, callback: msRest.ServiceCallback): void; + /** + * @param jobName The name of the job Resource within the specified resource group. job names must + * be between 3 and 24 characters in length and use any alphanumeric and underscore only + * @param resourceGroupName The Resource Group Name + * @param customerResolutionCode Resolution code for the job. Possible values include: 'None', + * 'MoveToCleanUpDevice', 'Resume' + * @param options The optional parameters + * @param callback The callback + */ + mitigate(jobName: string, resourceGroupName: string, customerResolutionCode: Models.CustomerResolutionCode, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + mitigate(jobName: string, resourceGroupName: string, customerResolutionCode: Models.CustomerResolutionCode, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + jobName, + resourceGroupName, + customerResolutionCode, + options + }, + mitigateOperationSpec, + callback); + } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const mitigateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate", + urlParameters: [ + Parameters.jobName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + customerResolutionCode: "customerResolutionCode" + }, + mapper: { + ...Mappers.MitigateJobRequest, + required: true + } + }, + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ApiError + } + }, + serializer +}; export { DataBoxManagementClient, diff --git a/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts b/sdk/databox/arm-databox/src/dataBoxManagementClientContext.ts index a7435663e889..660978e9b6d8 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 @@ -10,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-databox"; const packageVersion = "4.1.1"; @@ -50,7 +49,7 @@ export class DataBoxManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2019-09-01'; + this.apiVersion = '2021-05-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..327030e94d19 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. @@ -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. */ @@ -101,7 +115,7 @@ export interface ShippingAddress { /** * Postal code. */ - postalCode: string; + postalCode?: string; /** * Extended Zip Code. */ @@ -111,7 +125,8 @@ export interface ShippingAddress { */ companyName?: string; /** - * Type of address. Possible values include: 'None', 'Residential', 'Commercial' + * Type of address. Possible values include: 'None', 'Residential', 'Commercial'. Default value: + * 'None'. */ addressType?: AddressType; } @@ -124,7 +139,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 +156,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 +222,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 +261,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 +306,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 +329,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 +366,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. */ @@ -336,7 +422,7 @@ export interface NotificationPreference { */ stageName: NotificationStageName; /** - * Notification is required or not. + * Notification is required or not. Default value: true. */ sendNotification: boolean; } @@ -391,37 +477,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 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 dataDestinationType?: DataDestinationType; + 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 +540,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 +624,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 +638,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 +653,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 +661,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 +694,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 +703,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 +776,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 +788,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 +800,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 +826,24 @@ 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. + */ + keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTeraBytes?: number; + /** + * Available actions on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actions?: CustomerResolutionCode[]; + /** + * Last mitigation action performed on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastMitigationActionOnJob?: LastMitigationActionOnJob; } /** @@ -671,10 +854,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 +866,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 +878,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 +904,24 @@ 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. + */ + keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTeraBytes?: number; + /** + * Available actions on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actions?: CustomerResolutionCode[]; + /** + * Last mitigation action performed on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastMitigationActionOnJob?: LastMitigationActionOnJob; /** * 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 +976,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 +996,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 +1030,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 +1039,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 +1055,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 +1067,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 +1079,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 +1105,36 @@ 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. + */ + keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTeraBytes?: number; + /** + * Available actions on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actions?: CustomerResolutionCode[]; + /** + * Last mitigation action performed on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastMitigationActionOnJob?: LastMitigationActionOnJob; /** * 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 +1180,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.** + */ + 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 databox heavy job. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -965,10 +1203,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 +1215,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 +1227,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 +1253,36 @@ 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. + */ + keyEncryptionKey?: KeyEncryptionKey; + /** + * The expected size of the data, which needs to be transferred in this job, in terabytes. + */ + expectedDataSizeInTeraBytes?: number; + /** + * Available actions on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actions?: CustomerResolutionCode[]; + /** + * Last mitigation action performed on the job. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastMitigationActionOnJob?: LastMitigationActionOnJob; /** * 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 +1328,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 +1356,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 +1375,203 @@ 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'. Default + * value: 'StorageAccount'. */ - 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'. Default + * value: 'StorageAccount'. */ - 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 { + /** + * Configuration for the data transfer. + */ + transferConfiguration: TransferConfiguration; /** - * Dc Access Code for dispatching from DC. + * Level of the logs to be collected. Possible values include: 'Error', 'Verbose'. Default value: + * 'Error'. */ - forwardDcAccessCode?: string; + logCollectionLevel?: LogCollectionLevel; /** - * Dc Access code for dropping off at DC. + * Account details of the data to be transferred */ - reverseDcAccessCode?: string; + 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,31 +1583,29 @@ 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. */ - expectedDataSizeInTerabytes: number; + expectedDataSizeInTeraBytes: number; } /** - * Top level error for the job. + * Preferences related to the Encryption. */ -export interface ErrorModel { +export interface EncryptionPreferences { /** - * 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.** + * Defines secondary layer of software-based encryption enablement. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Disabled'. */ - readonly code?: string; - /** - * Describes the error in detail and provides debugging information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; + doubleEncryption?: DoubleEncryption; } /** @@ -1286,47 +1617,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.** - */ - readonly errorMessage?: string; - /** - * Code for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Managed service identity type. */ - readonly errorCode?: number; + type?: string; /** - * Recommended action for the error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * User assigned identity properties. */ - 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 +1681,9 @@ 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', 'WaitingForCustomerActionForKek', + * 'WaitingForCustomerActionForCleanUp', 'CustomerActionPerformedForCleanUp' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly stageStatus?: StageStatus; @@ -1363,11 +1697,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 +1736,96 @@ 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'. Default value: 'MicrosoftManaged'. + */ + 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; +} + +/** + * Last Mitigation Action Performed On Job + */ +export interface LastMitigationActionOnJob { + /** + * Action performed date time + */ + actionDateTimeInUtc?: Date; + /** + * Action performed by customer, + * possibility is that mitigation might happen by customer or service or by ops + */ + isPerformedByCustomer?: boolean; + /** + * Resolution code provided by customer. Possible values include: 'None', 'MoveToCleanUpDevice', + * 'Resume' + */ + customerResolution?: CustomerResolutionCode; +} + +/** + * Provides details about resource creation and update time + */ +export interface SystemData { + /** + * A string identifier for the identity that created the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdBy?: string; + /** + * The type of identity that created the resource: user, application, managedIdentity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdByType?: string; + /** + * The timestamp of resource creation (UTC) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdAt?: Date; + /** + * A string identifier for the identity that last modified the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedBy?: string; + /** + * The type of identity that last modified the resource: user, application, managedIdentity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedByType?: string; + /** + * The timestamp of resource last modification (UTC) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastModifiedAt?: Date; } /** @@ -1435,12 +1847,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 +1876,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 +1899,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. */ @@ -1485,7 +1910,8 @@ export interface JobResource extends Resource { */ readonly cancellationReason?: string; /** - * Delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled' + * Delivery type of Job. Possible values include: 'NonScheduled', 'Scheduled'. Default value: + * 'NonScheduled'. */ deliveryType?: JobDeliveryType; /** @@ -1512,6 +1938,11 @@ export interface JobResource extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; + /** + * Metadata pertaining to creation and last modification of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; } /** @@ -1526,6 +1957,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. Default value: 'None'. + */ + 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 +2011,52 @@ 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; +} + +/** + * The Mitigate Job captured from request body for Mitigate API + */ +export interface MitigateJobRequest { + /** + * Resolution code for the job. Possible values include: 'None', 'MoveToCleanUpDevice', 'Resume' + */ + customerResolutionCode: CustomerResolutionCode; } /** @@ -1594,6 +2106,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 +2121,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 +2143,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 +2177,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 +2275,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 +2303,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 +2311,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 +2356,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 +2404,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 +2474,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 +2508,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,12 +2578,12 @@ 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. @@ -2074,6 +2618,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 +2670,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 +2716,13 @@ export type StageName = 'DeviceOrdered' | 'DevicePrepared' | 'Dispatched' | 'Del /** * Defines values for StageStatus. * Possible values include: 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', - * 'SucceededWithErrors' + * 'SucceededWithErrors', 'WaitingForCustomerAction', 'SucceededWithWarnings', + * 'WaitingForCustomerActionForKek', 'WaitingForCustomerActionForCleanUp', + * 'CustomerActionPerformedForCleanUp' * @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' | 'WaitingForCustomerActionForKek' | 'WaitingForCustomerActionForCleanUp' | 'CustomerActionPerformedForCleanUp'; /** * Defines values for TransportShipmentTypes. @@ -2146,6 +2732,22 @@ 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 CustomerResolutionCode. + * Possible values include: 'None', 'MoveToCleanUpDevice', 'Resume' + * @readonly + * @enum {string} + */ +export type CustomerResolutionCode = 'None' | 'MoveToCleanUpDevice' | 'Resume'; + /** * Defines values for JobDeliveryType. * Possible values include: 'NonScheduled', 'Scheduled' @@ -2423,26 +3025,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 +3126,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 +3141,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..9430e2bfe425 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,46 @@ 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, + LastMitigationActionOnJob, + ManagedDiskDetails, NotificationPreference, PackageShippingDetails, Preferences, Resource, + ResourceIdentity, ShareCredentialDetails, ShipmentPickUpRequest, ShipmentPickUpResponse, ShippingAddress, Sku, + StorageAccountDetails, + SystemData, + 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..7ee0e5ceaeee 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. @@ -87,9 +87,9 @@ export const AccountCredentialDetails: msRest.CompositeMapper = { name: "String" } }, - dataDestinationType: { + dataAccountType: { readOnly: true, - serializedName: "dataDestinationType", + serializedName: "dataAccountType", type: { name: "Enum", allowedValues: [ @@ -122,6 +122,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: { @@ -167,7 +189,6 @@ export const ShippingAddress: msRest.CompositeMapper = { } }, postalCode: { - required: true, serializedName: "postalCode", type: { name: "String" @@ -187,6 +208,7 @@ export const ShippingAddress: msRest.CompositeMapper = { }, addressType: { serializedName: "addressType", + defaultValue: 'None', type: { name: "Enum", allowedValues: [ @@ -211,7 +233,7 @@ export const AddressValidationOutput: msRest.CompositeMapper = { serializedName: "properties.error", type: { name: "Composite", - className: "ErrorModel" + className: "CloudError" } }, validationType: { @@ -250,6 +272,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 +419,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 +496,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 +563,13 @@ export const SkuCost: msRest.CompositeMapper = { type: { name: "String" } + }, + multiplier: { + readOnly: true, + serializedName: "multiplier", + type: { + name: "Number" + } } } } @@ -481,15 +596,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 +675,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: { @@ -601,6 +802,7 @@ export const NotificationPreference: msRest.CompositeMapper = { sendNotification: { required: true, serializedName: "sendNotification", + defaultValue: true, type: { name: "Boolean" } @@ -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,44 @@ export const JobDetails: msRest.CompositeMapper = { name: "String" } }, + keyEncryptionKey: { + serializedName: "keyEncryptionKey", + type: { + name: "Composite", + className: "KeyEncryptionKey" + } + }, + expectedDataSizeInTeraBytes: { + serializedName: "expectedDataSizeInTeraBytes", + type: { + name: "Number" + } + }, + actions: { + readOnly: true, + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume" + ] + } + } + } + }, + lastMitigationActionOnJob: { + readOnly: true, + serializedName: "lastMitigationActionOnJob", + type: { + name: "Composite", + className: "LastMitigationActionOnJob" + } + }, jobDetailsType: { required: true, serializedName: "jobDetailsType", @@ -1220,12 +1566,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 +1659,18 @@ export const DataBoxHeavyAccountCopyLogDetails: msRest.CompositeMapper = { } } } + }, + copyVerboseLogLink: { + readOnly: true, + serializedName: "copyVerboseLogLink", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1556,6 +1923,12 @@ export const ScheduleAvailabilityRequest: msRest.CompositeMapper = { name: "String" } }, + country: { + serializedName: "country", + type: { + name: "String" + } + }, skuName: { required: true, serializedName: "skuName", @@ -1580,32 +1953,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,236 +1981,311 @@ 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", + defaultValue: 'StorageAccount', + 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", - type: { - name: "String" - } } } } }; -export const DataDestinationDetailsValidationResponseProperties: msRest.CompositeMapper = { - serializedName: "ValidateDataDestinationDetails", +export const TransferConfigurationTransferFilterDetails: msRest.CompositeMapper = { + serializedName: "TransferConfiguration_transferFilterDetails", type: { name: "Composite", - polymorphicDiscriminator: ValidationInputResponse.type.polymorphicDiscriminator, - uberParent: "ValidationInputResponse", - className: "DataDestinationDetailsValidationResponseProperties", + className: "TransferConfigurationTransferFilterDetails", modelProperties: { - ...ValidationInputResponse.type.modelProperties, - status: { - readOnly: true, - serializedName: "status", + include: { + serializedName: "include", type: { - name: "Enum", - allowedValues: [ - "Valid", - "Invalid", - "Skipped" - ] + name: "Composite", + className: "TransferFilterDetails" } } } } }; -export const DcAccessSecurityCode: msRest.CompositeMapper = { - serializedName: "DcAccessSecurityCode", +export const TransferAllDetails: msRest.CompositeMapper = { + serializedName: "TransferAllDetails", type: { name: "Composite", - className: "DcAccessSecurityCode", + className: "TransferAllDetails", modelProperties: { - forwardDcAccessCode: { - serializedName: "forwardDcAccessCode", + dataAccountType: { + required: true, + serializedName: "dataAccountType", + defaultValue: 'StorageAccount', type: { - name: "String" + name: "Enum", + allowedValues: [ + "StorageAccount", + "ManagedDisk" + ] } }, - reverseDcAccessCode: { - serializedName: "reverseDcAccessCode", - type: { - name: "String" - } - } - } - } -}; - -export const DestinationManagedDiskDetails: msRest.CompositeMapper = { - serializedName: "ManagedDisk", - type: { - name: "Composite", - polymorphicDiscriminator: DestinationAccountDetails.type.polymorphicDiscriminator, - uberParent: "DestinationAccountDetails", - className: "DestinationManagedDiskDetails", - modelProperties: { - ...DestinationAccountDetails.type.modelProperties, - resourceGroupId: { - required: true, - serializedName: "resourceGroupId", + transferAllBlobs: { + serializedName: "transferAllBlobs", type: { - name: "String" + name: "Boolean" } }, - stagingStorageAccountId: { - required: true, - serializedName: "stagingStorageAccountId", + transferAllFiles: { + serializedName: "transferAllFiles", type: { - name: "String" + name: "Boolean" } } } } }; -export const DestinationStorageAccountDetails: msRest.CompositeMapper = { - serializedName: "StorageAccount", +export const TransferConfigurationTransferAllDetails: msRest.CompositeMapper = { + serializedName: "TransferConfiguration_transferAllDetails", type: { name: "Composite", - polymorphicDiscriminator: DestinationAccountDetails.type.polymorphicDiscriminator, - uberParent: "DestinationAccountDetails", - className: "DestinationStorageAccountDetails", + className: "TransferConfigurationTransferAllDetails", modelProperties: { - ...DestinationAccountDetails.type.modelProperties, - storageAccountId: { - required: true, - serializedName: "storageAccountId", + include: { + serializedName: "include", type: { - name: "String" + name: "Composite", + className: "TransferAllDetails" } } } } }; -export const DiskScheduleAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "DataBoxDisk", +export const TransferConfiguration: msRest.CompositeMapper = { + serializedName: "TransferConfiguration", type: { name: "Composite", - polymorphicDiscriminator: ScheduleAvailabilityRequest.type.polymorphicDiscriminator, - uberParent: "ScheduleAvailabilityRequest", - className: "DiskScheduleAvailabilityRequest", + className: "TransferConfiguration", modelProperties: { - ...ScheduleAvailabilityRequest.type.modelProperties, - expectedDataSizeInTerabytes: { + transferConfigurationType: { required: true, - serializedName: "expectedDataSizeInTerabytes", + serializedName: "transferConfigurationType", type: { - name: "Number" + name: "Enum", + allowedValues: [ + "TransferAll", + "TransferUsingFilter" + ] + } + }, + transferFilterDetails: { + serializedName: "transferFilterDetails", + type: { + name: "Composite", + className: "TransferConfigurationTransferFilterDetails" + } + }, + transferAllDetails: { + serializedName: "transferAllDetails", + type: { + name: "Composite", + className: "TransferConfigurationTransferAllDetails" } } } } }; -export const ErrorModel: msRest.CompositeMapper = { - serializedName: "Error", +export const DataExportDetails: msRest.CompositeMapper = { + serializedName: "DataExportDetails", type: { name: "Composite", - className: "ErrorModel", + className: "DataExportDetails", modelProperties: { - code: { - readOnly: true, - serializedName: "code", + transferConfiguration: { + required: true, + serializedName: "transferConfiguration", type: { - name: "String" + name: "Composite", + className: "TransferConfiguration" } }, - message: { - readOnly: true, - serializedName: "message", + logCollectionLevel: { + serializedName: "logCollectionLevel", + defaultValue: 'Error', type: { - name: "String" + name: "Enum", + allowedValues: [ + "Error", + "Verbose" + ] + } + }, + accountDetails: { + required: true, + serializedName: "accountDetails", + type: { + name: "Composite", + className: "DataAccountDetails" } } } } }; -export const HeavyScheduleAvailabilityRequest: msRest.CompositeMapper = { - serializedName: "DataBoxHeavy", - type: { - name: "Composite", - polymorphicDiscriminator: ScheduleAvailabilityRequest.type.polymorphicDiscriminator, - uberParent: "ScheduleAvailabilityRequest", - className: "HeavyScheduleAvailabilityRequest", - modelProperties: { - ...ScheduleAvailabilityRequest.type.modelProperties - } - } -}; - -export const JobDeliveryInfo: msRest.CompositeMapper = { - serializedName: "JobDeliveryInfo", +export const DataImportDetails: msRest.CompositeMapper = { + serializedName: "DataImportDetails", type: { name: "Composite", - className: "JobDeliveryInfo", + className: "DataImportDetails", modelProperties: { - scheduledDateTime: { - serializedName: "scheduledDateTime", + accountDetails: { + required: true, + serializedName: "accountDetails", type: { - name: "DateTime" + name: "Composite", + className: "DataAccountDetails" } } } } }; -export const JobErrorDetails: msRest.CompositeMapper = { - serializedName: "JobErrorDetails", +export const DataTransferDetailsValidationRequest: msRest.CompositeMapper = { + serializedName: "ValidateDataTransferDetails", type: { name: "Composite", - className: "JobErrorDetails", + polymorphicDiscriminator: ValidationInputRequest.type.polymorphicDiscriminator, + uberParent: "ValidationInputRequest", + className: "DataTransferDetailsValidationRequest", modelProperties: { - errorMessage: { - readOnly: true, - serializedName: "errorMessage", - type: { - name: "String" - } - }, - errorCode: { - readOnly: true, - serializedName: "errorCode", + ...ValidationInputRequest.type.modelProperties, + dataExportDetails: { + serializedName: "dataExportDetails", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataExportDetails" + } + } } }, - recommendedAction: { - readOnly: true, - serializedName: "recommendedAction", + dataImportDetails: { + serializedName: "dataImportDetails", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataImportDetails" + } + } + } + }, + deviceType: { + required: true, + serializedName: "deviceType", + type: { + name: "Enum", + allowedValues: [ + "DataBox", + "DataBoxDisk", + "DataBoxHeavy" + ] } }, - exceptionMessage: { + 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: "exceptionMessage", + 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" } @@ -1852,6 +2294,115 @@ export const JobErrorDetails: msRest.CompositeMapper = { } }; +export const DiskScheduleAvailabilityRequest: msRest.CompositeMapper = { + serializedName: "DataBoxDisk", + type: { + name: "Composite", + polymorphicDiscriminator: ScheduleAvailabilityRequest.type.polymorphicDiscriminator, + uberParent: "ScheduleAvailabilityRequest", + className: "DiskScheduleAvailabilityRequest", + modelProperties: { + ...ScheduleAvailabilityRequest.type.modelProperties, + expectedDataSizeInTeraBytes: { + required: true, + serializedName: "expectedDataSizeInTeraBytes", + type: { + name: "Number" + } + } + } + } +}; + +export const EncryptionPreferences: msRest.CompositeMapper = { + serializedName: "EncryptionPreferences", + type: { + name: "Composite", + className: "EncryptionPreferences", + modelProperties: { + doubleEncryption: { + serializedName: "doubleEncryption", + defaultValue: 'Disabled', + type: { + name: "Enum", + allowedValues: [ + "Enabled", + "Disabled" + ] + } + } + } + } +}; + +export const HeavyScheduleAvailabilityRequest: msRest.CompositeMapper = { + serializedName: "DataBoxHeavy", + type: { + name: "Composite", + polymorphicDiscriminator: ScheduleAvailabilityRequest.type.polymorphicDiscriminator, + uberParent: "ScheduleAvailabilityRequest", + className: "HeavyScheduleAvailabilityRequest", + modelProperties: { + ...ScheduleAvailabilityRequest.type.modelProperties + } + } +}; + +export const UserAssignedProperties: msRest.CompositeMapper = { + serializedName: "UserAssignedProperties", + type: { + name: "Composite", + className: "UserAssignedProperties", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const IdentityProperties: msRest.CompositeMapper = { + serializedName: "IdentityProperties", + type: { + name: "Composite", + className: "IdentityProperties", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "String" + } + }, + userAssigned: { + serializedName: "userAssigned", + type: { + name: "Composite", + className: "UserAssignedProperties" + } + } + } + } +}; + +export const JobDeliveryInfo: msRest.CompositeMapper = { + serializedName: "JobDeliveryInfo", + type: { + name: "Composite", + className: "JobDeliveryInfo", + modelProperties: { + scheduledDateTime: { + serializedName: "scheduledDateTime", + type: { + name: "DateTime" + } + } + } + } +}; + export const JobStages: msRest.CompositeMapper = { serializedName: "JobStages", type: { @@ -1902,7 +2453,12 @@ export const JobStages: msRest.CompositeMapper = { "Failed", "Cancelled", "Cancelling", - "SucceededWithErrors" + "SucceededWithErrors", + "WaitingForCustomerAction", + "SucceededWithWarnings", + "WaitingForCustomerActionForKek", + "WaitingForCustomerActionForCleanUp", + "CustomerActionPerformedForCleanUp" ] } }, @@ -1919,19 +2475,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 +2555,139 @@ 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", + defaultValue: 'MicrosoftManaged', + 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" + } + } + } + } +}; + +export const LastMitigationActionOnJob: msRest.CompositeMapper = { + serializedName: "LastMitigationActionOnJob", + type: { + name: "Composite", + className: "LastMitigationActionOnJob", + modelProperties: { + actionDateTimeInUtc: { + serializedName: "actionDateTimeInUtc", + type: { + name: "DateTime" + } + }, + isPerformedByCustomer: { + serializedName: "isPerformedByCustomer", + type: { + name: "Boolean" + } + }, + customerResolution: { + serializedName: "customerResolution", + type: { + name: "Enum", + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume" + ] + } + } + } + } +}; + +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + readOnly: true, + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + readOnly: true, + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + readOnly: true, + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + readOnly: true, + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + readOnly: true, + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + readOnly: true, + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -2048,6 +2724,13 @@ export const Resource: msRest.CompositeMapper = { name: "Composite", className: "Sku" } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } } } } @@ -2060,6 +2743,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 +2775,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 +2819,7 @@ export const JobResource: msRest.CompositeMapper = { serializedName: "properties.error", type: { name: "Composite", - className: "ErrorModel" + className: "CloudError" } }, details: { @@ -2137,6 +2838,7 @@ export const JobResource: msRest.CompositeMapper = { }, deliveryType: { serializedName: "properties.deliveryType", + defaultValue: 'NonScheduled', type: { name: "Enum", allowedValues: [ @@ -2179,6 +2881,14 @@ export const JobResource: msRest.CompositeMapper = { type: { name: "String" } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -2203,35 +2913,97 @@ 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", + defaultValue: 'None', + 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 +3015,62 @@ 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" + } + } + } + } +}; + +export const MitigateJobRequest: msRest.CompositeMapper = { + serializedName: "MitigateJobRequest", + type: { + name: "Composite", + className: "MitigateJobRequest", + modelProperties: { + customerResolutionCode: { + required: true, + serializedName: "customerResolutionCode", + type: { + name: "Enum", + allowedValues: [ + "None", + "MoveToCleanUpDevice", + "Resume" + ] + } } } } @@ -2316,6 +3144,12 @@ export const Operation: msRest.CompositeMapper = { type: { name: "String" } + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean" + } } } } @@ -2593,11 +3427,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 +3479,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 +3602,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 +3747,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 +3761,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