From c08a68bbc1a454d89a45a44a570d0cfeeb746120 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 2 Jan 2019 07:47:45 +0000 Subject: [PATCH] Generated from 9fd537119a0fa74ec60d08f5b16facaf32c15b08 Corrected typo in swagger file name --- packages/@azure/arm-edgedateway/LICENSE.txt | 21 + packages/@azure/arm-edgedateway/README.md | 96 + .../lib/dataBoxEdgeManagementClient.ts | 62 + .../lib/dataBoxEdgeManagementClientContext.ts | 62 + .../lib/models/alertsMappers.ts | 57 + .../lib/models/bandwidthSchedulesMappers.ts | 57 + .../lib/models/devicesMappers.ts | 60 + .../arm-edgedateway/lib/models/index.ts | 3497 +++++++++++++++++ .../arm-edgedateway/lib/models/mappers.ts | 2583 ++++++++++++ .../lib/models/operationsMappers.ts | 21 + .../lib/models/operationsStatusMappers.ts | 20 + .../lib/models/ordersMappers.ts | 57 + .../arm-edgedateway/lib/models/parameters.ts | 95 + .../lib/models/rolesMappers.ts | 57 + .../lib/models/sharesMappers.ts | 57 + .../storageAccountCredentialsMappers.ts | 57 + .../lib/models/triggersMappers.ts | 57 + .../lib/models/usersMappers.ts | 57 + .../arm-edgedateway/lib/operations/alerts.ts | 198 + .../lib/operations/bandwidthSchedules.ts | 328 ++ .../arm-edgedateway/lib/operations/devices.ts | 1024 +++++ .../arm-edgedateway/lib/operations/index.ts | 21 + .../lib/operations/operations.ts | 123 + .../lib/operations/operationsStatus.ts | 92 + .../arm-edgedateway/lib/operations/orders.ts | 315 ++ .../arm-edgedateway/lib/operations/roles.ts | 328 ++ .../arm-edgedateway/lib/operations/shares.ts | 386 ++ .../operations/storageAccountCredentials.ts | 328 ++ .../lib/operations/triggers.ts | 328 ++ .../arm-edgedateway/lib/operations/users.ts | 334 ++ packages/@azure/arm-edgedateway/package.json | 56 + .../@azure/arm-edgedateway/rollup.config.js | 37 + packages/@azure/arm-edgedateway/tsconfig.json | 19 + 33 files changed, 10890 insertions(+) create mode 100644 packages/@azure/arm-edgedateway/LICENSE.txt create mode 100644 packages/@azure/arm-edgedateway/README.md create mode 100644 packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClient.ts create mode 100644 packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClientContext.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/alertsMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/bandwidthSchedulesMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/devicesMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/index.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/mappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/operationsMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/operationsStatusMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/ordersMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/parameters.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/rolesMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/sharesMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/storageAccountCredentialsMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/triggersMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/models/usersMappers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/alerts.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/bandwidthSchedules.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/devices.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/index.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/operations.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/operationsStatus.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/orders.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/roles.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/shares.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/storageAccountCredentials.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/triggers.ts create mode 100644 packages/@azure/arm-edgedateway/lib/operations/users.ts create mode 100644 packages/@azure/arm-edgedateway/package.json create mode 100644 packages/@azure/arm-edgedateway/rollup.config.js create mode 100644 packages/@azure/arm-edgedateway/tsconfig.json diff --git a/packages/@azure/arm-edgedateway/LICENSE.txt b/packages/@azure/arm-edgedateway/LICENSE.txt new file mode 100644 index 000000000000..8f3d856145c5 --- /dev/null +++ b/packages/@azure/arm-edgedateway/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-edgedateway/README.md b/packages/@azure/arm-edgedateway/README.md new file mode 100644 index 000000000000..b251b5e0104a --- /dev/null +++ b/packages/@azure/arm-edgedateway/README.md @@ -0,0 +1,96 @@ +## Azure DataBoxEdgeManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for DataBoxEdgeManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-edgedateway +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { DataBoxEdgeManagementClient, DataBoxEdgeManagementModels, DataBoxEdgeManagementMappers } from "@azure/arm-edgedateway"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new DataBoxEdgeManagementClient(creds, subscriptionId); + client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list operations as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-edgedateway sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClient.ts b/packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClient.ts new file mode 100644 index 000000000000..b752935c8d5e --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClient.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as operations from "./operations"; +import { DataBoxEdgeManagementClientContext } from "./dataBoxEdgeManagementClientContext"; + + +class DataBoxEdgeManagementClient extends DataBoxEdgeManagementClientContext { + // Operation groups + operations: operations.Operations; + devices: operations.Devices; + alerts: operations.Alerts; + bandwidthSchedules: operations.BandwidthSchedules; + operationsStatus: operations.OperationsStatus; + orders: operations.Orders; + roles: operations.Roles; + shares: operations.Shares; + storageAccountCredentials: operations.StorageAccountCredentials; + triggers: operations.Triggers; + users: operations.Users; + + /** + * Initializes a new instance of the DataBoxEdgeManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription ID. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataBoxEdgeManagementClientOptions) { + super(credentials, subscriptionId, options); + this.operations = new operations.Operations(this); + this.devices = new operations.Devices(this); + this.alerts = new operations.Alerts(this); + this.bandwidthSchedules = new operations.BandwidthSchedules(this); + this.operationsStatus = new operations.OperationsStatus(this); + this.orders = new operations.Orders(this); + this.roles = new operations.Roles(this); + this.shares = new operations.Shares(this); + this.storageAccountCredentials = new operations.StorageAccountCredentials(this); + this.triggers = new operations.Triggers(this); + this.users = new operations.Users(this); + } +} + +// Operation Specifications + +export { + DataBoxEdgeManagementClient, + DataBoxEdgeManagementClientContext, + Models as DataBoxEdgeManagementModels, + Mappers as DataBoxEdgeManagementMappers +}; +export * from "./operations"; diff --git a/packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClientContext.ts b/packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClientContext.ts new file mode 100644 index 000000000000..d44de29c0465 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/dataBoxEdgeManagementClientContext.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-edgedateway"; +const packageVersion = "1.0.0"; + +export class DataBoxEdgeManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + apiVersion?: string; + subscriptionId: string; + + /** + * Initializes a new instance of the DataBoxEdgeManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription ID. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.DataBoxEdgeManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2018-07-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/packages/@azure/arm-edgedateway/lib/models/alertsMappers.ts b/packages/@azure/arm-edgedateway/lib/models/alertsMappers.ts new file mode 100644 index 000000000000..946edc4f7577 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/alertsMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + AlertList, + Alert, + ARMBaseModel, + BaseResource, + AlertErrorDetails, + CloudError, + BandwidthSchedule, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + Role, + SecuritySettings, + AsymmetricEncryptedSecret, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + StorageAccountCredential, + Trigger, + UpdateSummary, + User, + ShareAccessRight, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/bandwidthSchedulesMappers.ts b/packages/@azure/arm-edgedateway/lib/models/bandwidthSchedulesMappers.ts new file mode 100644 index 000000000000..c8df8c4c6215 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/bandwidthSchedulesMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + BandwidthSchedulesList, + BandwidthSchedule, + ARMBaseModel, + BaseResource, + CloudError, + Alert, + AlertErrorDetails, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + Role, + SecuritySettings, + AsymmetricEncryptedSecret, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + StorageAccountCredential, + Trigger, + UpdateSummary, + User, + ShareAccessRight, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/devicesMappers.ts b/packages/@azure/arm-edgedateway/lib/models/devicesMappers.ts new file mode 100644 index 000000000000..2249bca4a5d1 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/devicesMappers.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + DataBoxEdgeDeviceList, + DataBoxEdgeDevice, + ARMBaseModel, + BaseResource, + Sku, + CloudError, + DataBoxEdgeDevicePatch, + DataBoxEdgeDeviceExtendedInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + SecuritySettings, + AsymmetricEncryptedSecret, + UpdateSummary, + UploadCertificateRequest, + UploadCertificateResponse, + Alert, + AlertErrorDetails, + BandwidthSchedule, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + Role, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + StorageAccountCredential, + Trigger, + User, + ShareAccessRight, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/index.ts b/packages/@azure/arm-edgedateway/lib/models/index.ts new file mode 100644 index 000000000000..36cfaf1c4501 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/index.ts @@ -0,0 +1,3497 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export { BaseResource, CloudError }; + + +/** + * @interface + * An interface representing Address. + * The shipping address of the customer. + * + */ +export interface Address { + /** + * @member {string} addressLine1 The address line1. + */ + addressLine1: string; + /** + * @member {string} addressLine2 The address line2. + */ + addressLine2: string; + /** + * @member {string} addressLine3 The address line3. + */ + addressLine3: string; + /** + * @member {string} postalCode The postal code. + */ + postalCode: string; + /** + * @member {string} city The city name. + */ + city: string; + /** + * @member {string} state The state name. + */ + state: string; + /** + * @member {string} country The country name. + */ + country: string; +} + +/** + * @interface + * An interface representing AlertErrorDetails. + * Error details for the alert. + * + */ +export interface AlertErrorDetails { + /** + * @member {string} [errorCode] Error code. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorCode?: string; + /** + * @member {string} [errorMessage] Error Message. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorMessage?: string; + /** + * @member {number} [occurrences] Number of occurrences. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly occurrences?: number; +} + +/** + * @interface + * An interface representing ARMBaseModel. + * Represents the base class for all object models. + * + * @extends BaseResource + */ +export interface ARMBaseModel extends BaseResource { + /** + * @member {string} [id] The path ID that uniquely identifies the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The hierarchical type of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing Alert. + * Alert on the data box edge/gateway device. + * + * @extends ARMBaseModel + */ +export interface Alert extends ARMBaseModel { + /** + * @member {string} [title] Title of the alert. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly title?: string; + /** + * @member {string} [alertType] Type of the alert. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly alertType?: string; + /** + * @member {Date} [appearedAtDateTime] UTC time at which the alert appeared. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly appearedAtDateTime?: Date; + /** + * @member {string} [recommendation] Recommendation for acting on the alert. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly recommendation?: string; + /** + * @member {AlertSeverity} [severity] Severity of the alert. Possible values + * include: 'Informational', 'Warning', 'Critical' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly severity?: AlertSeverity; + /** + * @member {AlertErrorDetails} [errorDetails] Error details of the alert. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorDetails?: AlertErrorDetails; + /** + * @member {{ [propertyName: string]: string }} [detailedInformation] + * Detailed information about the alert. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly detailedInformation?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing AsymmetricEncryptedSecret. + * Represent the secrets intended for encryption with asymmetric key pair. + * + */ +export interface AsymmetricEncryptedSecret { + /** + * @member {string} value The value of the secret. + */ + value: string; + /** + * @member {string} [encryptionCertThumbprint] Thumbprint certificate that + * was used to encrypt "Value". If the value in unencrypted, it will be null. + */ + encryptionCertThumbprint?: string; + /** + * @member {EncryptionAlgorithm} encryptionAlgorithm The algorithm used to + * encrypt "Value". Possible values include: 'None', 'AES256', + * 'RSAES_PKCS1_v_1_5' + */ + encryptionAlgorithm: EncryptionAlgorithm; +} + +/** + * @interface + * An interface representing SymmetricKey. + * Symmetric Key for authentication. + * + */ +export interface SymmetricKey { + /** + * @member {AsymmetricEncryptedSecret} [connectionString] Connection string + * based on symmetric key. + */ + connectionString?: AsymmetricEncryptedSecret; +} + +/** + * @interface + * An interface representing Authentication. + * Authentication mechanism for IoT devices. + * + */ +export interface Authentication { + /** + * @member {SymmetricKey} [symmetricKey] Symmetric key for authentication. + */ + symmetricKey?: SymmetricKey; +} + +/** + * @interface + * An interface representing AzureContainerInfo. + * Azure container mapping of the endpoint. + * + */ +export interface AzureContainerInfo { + /** + * @member {string} storageAccountCredentialId ID of the Storage account + * credential to be used for accessing storage. + */ + storageAccountCredentialId: string; + /** + * @member {string} containerName Container name (Based on the data format + * specified, represents the name of Azure file/ Page blob / Block blob). + */ + containerName: string; + /** + * @member {AzureContainerDataFormat} dataFormat Storage format used for the + * file represented by the share. Possible values include: 'BlockBlob', + * 'PageBlob', 'AzureFile' + */ + dataFormat: AzureContainerDataFormat; +} + +/** + * @interface + * An interface representing BandwidthSchedule. + * The bandwidth schedule details. + * + * @extends ARMBaseModel + */ +export interface BandwidthSchedule extends ARMBaseModel { + /** + * @member {string} start The start time of the schedule in UTC. + */ + start: string; + /** + * @member {string} stop The stop time of the schedule in UTC. + */ + stop: string; + /** + * @member {number} rateInMbps The bandwidth rate in Mbps. + */ + rateInMbps: number; + /** + * @member {DayOfWeek[]} days The days of the week when this schedule is + * applicable. + */ + days: DayOfWeek[]; +} + +/** + * @interface + * An interface representing ClientAccessRight. + * The mapping between a particular client ip and the type of access client has + * on the NFS share. + * + */ +export interface ClientAccessRight { + /** + * @member {string} client Ip of the client. + */ + client: string; + /** + * @member {ClientPermissionType} accessPermission Type of access to be + * allowed for the client. Possible values include: 'NoAccess', 'ReadOnly', + * 'ReadWrite' + */ + accessPermission: ClientPermissionType; +} + +/** + * @interface + * An interface representing ContactDetails. + * Contains all the contact details of the customer. + * + */ +export interface ContactDetails { + /** + * @member {string} contactPerson Gets or sets the contact person. + */ + contactPerson: string; + /** + * @member {string} companyName Gets or sets the name of the company. + */ + companyName: string; + /** + * @member {string} phone Gets or sets the phone number. + */ + phone: string; + /** + * @member {string[]} emailList Gets or sets the email list. + */ + emailList: string[]; +} + +/** + * @interface + * An interface representing Sku. + * The SKU type. + * + */ +export interface Sku { + /** + * @member {SkuName} [name] Sku name. Possible values include: 'Gateway', + * 'Edge' + */ + name?: SkuName; + /** + * @member {SkuTier} [tier] The SKU tier. This is based on the SKU name. + * Possible values include: 'Standard' + */ + tier?: SkuTier; +} + +/** + * @interface + * An interface representing DataBoxEdgeDevice. + * The Data Box Edge/Gateway device. + * + * @extends ARMBaseModel + */ +export interface DataBoxEdgeDevice extends ARMBaseModel { + /** + * @member {string} location The location of the device. This will be one of + * the supported and registered Azure Geo Regions (e.g. West US, East US, + * Southeast Asia, etc.). The geo region of a device cannot be changed once + * it is created, but if an identical geo region is specified on update the + * request will succeed. + */ + location: string; + /** + * @member {{ [propertyName: string]: string }} [tags] The list of tags that + * describe the device. These tags can be used in viewing and grouping this + * device (across resource groups). + */ + tags?: { [propertyName: string]: string }; + /** + * @member {Sku} [sku] The sku type. + */ + sku?: Sku; + /** + * @member {string} [etag] The etag of the devices. + */ + etag?: string; + /** + * @member {DataBoxEdgeDeviceStatus} [dataBoxEdgeDeviceStatus] The status of + * the Data Box Edge/Gateway device. Possible values include: 'ReadyToSetup', + * 'Online', 'Offline', 'NeedsAttention', 'Disconnected', + * 'PartiallyDisconnected' + */ + dataBoxEdgeDeviceStatus?: DataBoxEdgeDeviceStatus; + /** + * @member {string} [serialNumber] The Serial Number of Data Box Edge/Gateway + * device. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serialNumber?: string; + /** + * @member {string} [description] The Description of the Data Box + * Edge/Gateway device. + */ + description?: string; + /** + * @member {string} [modelDescription] The description of the Data Box + * Edge/Gateway device model. + */ + modelDescription?: string; + /** + * @member {DeviceType} [deviceType] The type of the Data Box Edge/Gateway + * device. Possible values include: 'DataBoxEdgeDevice' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deviceType?: DeviceType; + /** + * @member {string} [friendlyName] The Data Box Edge/Gateway device name. + */ + friendlyName?: string; + /** + * @member {string} [culture] The Data Box Edge/Gateway device culture. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly culture?: string; + /** + * @member {string} [deviceModel] The Data Box Edge/Gateway device model. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deviceModel?: string; + /** + * @member {string} [deviceSoftwareVersion] The Data Box Edge/Gateway device + * software version. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deviceSoftwareVersion?: string; + /** + * @member {number} [deviceLocalCapacity] The Data Box Edge/Gateway device + * local capacity in MB. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deviceLocalCapacity?: number; + /** + * @member {string} [timeZone] The Data Box Edge/Gateway device timezone. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly timeZone?: string; + /** + * @member {string} [deviceHcsVersion] The device software version number of + * the device (eg: 1.2.18105.6). + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deviceHcsVersion?: string; + /** + * @member {RoleTypes[]} [configuredRoleTypes] Type of compute roles + * configured. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly configuredRoleTypes?: RoleTypes[]; +} + +/** + * @interface + * An interface representing DataBoxEdgeDeviceExtendedInfo. + * The extended Info of the Data Box Edge/Gateway device. + * + * @extends ARMBaseModel + */ +export interface DataBoxEdgeDeviceExtendedInfo extends ARMBaseModel { + /** + * @member {string} integrityKey The Channel Integrity Key (CIK) of the + * device. + */ + integrityKey: string; + /** + * @member {string} [encryptionKeyThumbprint] The certificate thumbprint that + * was used to encrypt the Channel Integrity Key (CIK). + */ + encryptionKeyThumbprint?: string; + /** + * @member {string} [encryptionKey] The Channel Integrity Key (CIK) of the + * device. + */ + encryptionKey?: string; + /** + * @member {string} [resourceKey] The Resource Id of the Resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly resourceKey?: string; +} + +/** + * @interface + * An interface representing DataBoxEdgeDevicePatch. + * The Data Box Edge/Gateway device patch. + * + */ +export interface DataBoxEdgeDevicePatch { + /** + * @member {{ [propertyName: string]: string }} [tags] The tags attached to + * the Data Box Edge/Gateway resource. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing FileSourceInfo. + * File source details. + * + */ +export interface FileSourceInfo { + /** + * @member {string} shareId File share ID. + */ + shareId: string; +} + +/** + * @interface + * An interface representing RoleSinkInfo. + * Compute role against which events will be raised. + * + */ +export interface RoleSinkInfo { + /** + * @member {string} roleId Compute role ID. + */ + roleId: string; +} + +/** + * Contains the possible cases for Trigger. + */ +export type TriggerUnion = Trigger | FileEventTrigger | PeriodicTimerEventTrigger; + +/** + * @interface + * An interface representing Trigger. + * Trigger details. + * + */ +export interface Trigger { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "Trigger"; + /** + * @member {string} [id] The path ID that uniquely identifies the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The hierarchical type of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing FileEventTrigger. + * Trigger details. + * + */ +export interface FileEventTrigger { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "FileEvent"; + /** + * @member {string} [id] The path ID that uniquely identifies the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The hierarchical type of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {FileSourceInfo} [sourceInfo] File event source details. + */ + sourceInfo?: FileSourceInfo; + /** + * @member {RoleSinkInfo} [sinkInfo] Role Sink info. + */ + sinkInfo?: RoleSinkInfo; + /** + * @member {string} [customContextTag] Custom context tag, typically used to + * co-relate the trigger against its usage. Eg. If a PeriodicTimer trigger + * may be intended for certain specific IOT modules in device, the tag can be + * the name/image url of the module. + */ + customContextTag?: string; +} + +/** + * @interface + * An interface representing IoTDeviceInfo. + * Metadata of IoT device/IoT edge device to be configured. + * + */ +export interface IoTDeviceInfo { + /** + * @member {string} deviceId Id of the IoT device/edge device. + */ + deviceId: string; + /** + * @member {string} ioTHostHub Host name for IoT hub which is associated to + * the device. + */ + ioTHostHub: string; + /** + * @member {Authentication} [authentication] IoT device authentication info. + */ + authentication?: Authentication; +} + +/** + * @interface + * An interface representing MountPointMap. + * The share mount point. + * + */ +export interface MountPointMap { + /** + * @member {string} shareId ID of the share which is mounted to role VM. + */ + shareId: string; + /** + * @member {string} [roleId] ID of the role to which share is mounted. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly roleId?: string; + /** + * @member {string} [mountPoint] Mount point for the share. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly mountPoint?: string; + /** + * @member {RoleTypes} [roleType] Role type. Possible values include: 'IOT', + * 'ASA', 'Functions', 'Cognitive' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly roleType?: RoleTypes; +} + +/** + * Contains the possible cases for Role. + */ +export type RoleUnion = Role | IoTRole; + +/** + * @interface + * An interface representing Role. + * Compute role. + * + */ +export interface Role { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "Role"; + /** + * @member {string} [id] The path ID that uniquely identifies the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The hierarchical type of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} + +/** + * @interface + * An interface representing IoTRole. + * Compute role. + * + */ +export interface IoTRole { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "IOT"; + /** + * @member {string} [id] The path ID that uniquely identifies the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The hierarchical type of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {PlatformType} hostPlatform Host OS which IoT role support. + * Possible values include: 'Windows', 'Linux' + */ + hostPlatform: PlatformType; + /** + * @member {IoTDeviceInfo} ioTDeviceDetails IoT device metadata to which data + * box edge device needs to be connected. + */ + ioTDeviceDetails: IoTDeviceInfo; + /** + * @member {IoTDeviceInfo} ioTEdgeDeviceDetails IoT edge device to which the + * IoT role needs to be configured. + */ + ioTEdgeDeviceDetails: IoTDeviceInfo; + /** + * @member {MountPointMap[]} [shareMappings] Mount points of shares in + * role(s). + */ + shareMappings?: MountPointMap[]; + /** + * @member {RoleStatus} roleStatus Role status. Possible values include: + * 'Enabled', 'Disabled' + */ + roleStatus: RoleStatus; +} + +/** + * @interface + * An interface representing Ipv4Config. + * Details related to the IPv4 address configuration. + * + */ +export interface Ipv4Config { + /** + * @member {string} [ipAddress] The IPv4 address of the network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly ipAddress?: string; + /** + * @member {string} [subnet] The IPv4 subnet of the network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly subnet?: string; + /** + * @member {string} [gateway] The IPv4 gateway of the network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly gateway?: string; +} + +/** + * @interface + * An interface representing Ipv6Config. + * Details related to the IPv6 address configuration. + * + */ +export interface Ipv6Config { + /** + * @member {string} [ipAddress] The IPv6 address of the network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly ipAddress?: string; + /** + * @member {number} [prefixLength] The IPv6 prefix of the network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly prefixLength?: number; + /** + * @member {string} [gateway] The IPv6 gateway of the network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly gateway?: string; +} + +/** + * @interface + * An interface representing JobErrorItem. + * The job error items. + * + */ +export interface JobErrorItem { + /** + * @member {string[]} [recommendations] The recommended actions. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly recommendations?: string[]; + /** + * @member {string} [code] The code intended for programmatic access. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly code?: string; + /** + * @member {string} [message] The message intended to describe the error in + * detail. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; +} + +/** + * @interface + * An interface representing JobErrorDetails. + * The job error information containing List of JobErrorItem. + * + */ +export interface JobErrorDetails { + /** + * @member {JobErrorItem[]} [errorDetails] The error details. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorDetails?: JobErrorItem[]; + /** + * @member {string} [code] The code intended for programmatic access. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly code?: string; + /** + * @member {string} [message] The message intended to describe the error in + * detail. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly message?: string; +} + +/** + * @interface + * An interface representing UpdateDownloadProgress. + * Details about the download progress of update. + * + */ +export interface UpdateDownloadProgress { + /** + * @member {DownloadPhase} [downloadPhase] The download phase. Possible + * values include: 'Unknown', 'Initializing', 'Downloading', 'Verifying' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly downloadPhase?: DownloadPhase; + /** + * @member {number} [percentComplete] Percentage of completion. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {number} [totalBytesToDownload] Total bytes to download. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalBytesToDownload?: number; + /** + * @member {number} [totalBytesDownloaded] Total bytes downloaded. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalBytesDownloaded?: number; + /** + * @member {number} [numberOfUpdatesToDownload] Number of updates to + * download. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfUpdatesToDownload?: number; + /** + * @member {number} [numberOfUpdatesDownloaded] Number of updates downloaded. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfUpdatesDownloaded?: number; +} + +/** + * @interface + * An interface representing UpdateInstallProgress. + * Details about the progress during installation of updates. + * + */ +export interface UpdateInstallProgress { + /** + * @member {number} [percentComplete] Percentage of completion. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {number} [numberOfUpdatesToInstall] Number of updates to install. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfUpdatesToInstall?: number; + /** + * @member {number} [numberOfUpdatesInstalled] Number of updates installed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly numberOfUpdatesInstalled?: number; +} + +/** + * @interface + * An interface representing Job. + * A device job. + * + */ +export interface Job { + /** + * @member {string} [id] The path ID that uniquely identifies the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The hierarchical type of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {JobStatus} [status] The current status of the job. Possible + * values include: 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', + * 'Paused', 'Scheduled' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: JobStatus; + /** + * @member {Date} [startTime] The UTC datetime at which the job was started. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly startTime?: Date; + /** + * @member {Date} [endTime] The UTC datetime at which the job completed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly endTime?: Date; + /** + * @member {number} [percentComplete] The percentage of the job that is + * already complete. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly percentComplete?: number; + /** + * @member {JobErrorDetails} [error] The Error details. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly error?: JobErrorDetails; + /** + * @member {JobType} [jobType] The type of the job. Possible values include: + * 'Invalid', 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', + * 'RefreshShare' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly jobType?: JobType; + /** + * @member {UpdateOperationStage} [currentStage] Current stage of the update + * operation. Possible values include: 'Unknown', 'Initial', 'ScanStarted', + * 'ScanComplete', 'ScanFailed', 'DownloadStarted', 'DownloadComplete', + * 'DownloadFailed', 'InstallStarted', 'InstallComplete', 'InstallFailed', + * 'RebootInitiated', 'Success', 'Failure', 'RescanStarted', + * 'RescanComplete', 'RescanFailed' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly currentStage?: UpdateOperationStage; + /** + * @member {UpdateDownloadProgress} [downloadProgress] The download progress. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly downloadProgress?: UpdateDownloadProgress; + /** + * @member {UpdateInstallProgress} [installProgress] The install progress. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly installProgress?: UpdateInstallProgress; + /** + * @member {number} [totalRefreshErrors] Total number of errors encountered + * during the refresh process. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalRefreshErrors?: number; + /** + * @member {string} [errorManifestFile] Local Share/Remote Container relative + * path to the error manifest file of the refresh. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly errorManifestFile?: string; + /** + * @member {string} [shareId] ARM id of the Share on which the Refresh + * operation was done. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly shareId?: string; + /** + * @member {string} [folder] If only subfolders need to be refreshed, then + * the sub folder path inside the share. Empty otherwise. + */ + folder?: string; +} + +/** + * @interface + * An interface representing MetricDimensionV1. + * Metric Dimension v1. + * + */ +export interface MetricDimensionV1 { + /** + * @member {string} [name] Name of the metrics dimension. + */ + name?: string; + /** + * @member {string} [displayName] Display name of the metrics dimension. + */ + displayName?: string; + /** + * @member {boolean} [toBeExportedForShoebox] To be exported to shoe box. + */ + toBeExportedForShoebox?: boolean; +} + +/** + * @interface + * An interface representing MetricSpecificationV1. + * Metric specification version 1. + * + */ +export interface MetricSpecificationV1 { + /** + * @member {string} [name] Name of the metric. + */ + name?: string; + /** + * @member {string} [displayName] Display name of the metric. + */ + displayName?: string; + /** + * @member {string} [displayDescription] Description of the metric to be + * displayed. + */ + displayDescription?: string; + /** + * @member {MetricUnit} [unit] Metric units. Possible values include: + * 'NotSpecified', 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', + * 'BytesPerSecond', 'CountPerSecond' + */ + unit?: MetricUnit; + /** + * @member {MetricAggregationType} [aggregationType] Metric aggregation type. + * Possible values include: 'NotSpecified', 'None', 'Average', 'Minimum', + * 'Maximum', 'Total', 'Count' + */ + aggregationType?: MetricAggregationType; + /** + * @member {MetricDimensionV1[]} [dimensions] Metric dimensions, other than + * default dimension which is resource. + */ + dimensions?: MetricDimensionV1[]; + /** + * @member {boolean} [fillGapWithZero] set true to fill the gaps with zero. + */ + fillGapWithZero?: boolean; + /** + * @member {MetricCategory} [category] Metric category. Possible values + * include: 'Capacity', 'Transaction' + */ + category?: MetricCategory; + /** + * @member {string} [resourceIdDimensionNameOverride] Resource name override. + */ + resourceIdDimensionNameOverride?: string; + /** + * @member {TimeGrain[]} [supportedTimeGrainTypes] Support granularity of + * metrics. + */ + supportedTimeGrainTypes?: TimeGrain[]; + /** + * @member {MetricAggregationType[]} [supportedAggregationTypes] Support + * metric aggregation type. + */ + supportedAggregationTypes?: MetricAggregationType[]; +} + +/** + * @interface + * An interface representing NetworkAdapterPosition. + * The network adapter position. + * + */ +export interface NetworkAdapterPosition { + /** + * @member {NetworkGroup} [networkGroup] The network group. Possible values + * include: 'None', 'NonRDMA', 'RDMA' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly networkGroup?: NetworkGroup; + /** + * @member {number} [port] The port. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly port?: number; +} + +/** + * @interface + * An interface representing NetworkAdapter. + * Represents the networkAdapter on a device. + * + */ +export interface NetworkAdapter { + /** + * @member {string} [adapterId] Instance ID of network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly adapterId?: string; + /** + * @member {NetworkAdapterPosition} [adapterPosition] Hardware position of + * network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly adapterPosition?: NetworkAdapterPosition; + /** + * @member {number} [index] Logical index of the adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly index?: number; + /** + * @member {string} [nodeId] Node ID of the network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nodeId?: string; + /** + * @member {string} [networkAdapterName] Network Adapter Name. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly networkAdapterName?: string; + /** + * @member {string} [label] Hardware label for the adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly label?: string; + /** + * @member {string} [macAddress] MAC Address. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly macAddress?: string; + /** + * @member {number} [linkSpeed] Link Speed. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly linkSpeed?: number; + /** + * @member {NetworkAdapterStatus} [status] Value indicating whether this + * adapter is valid. Possible values include: 'Inactive', 'Active' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly status?: NetworkAdapterStatus; + /** + * @member {NetworkAdapterRDMAStatus} [rdmaStatus] Value indicating whether + * this adapter is RDMA Capable. Possible values include: 'Incapable', + * 'Capable' + */ + rdmaStatus?: NetworkAdapterRDMAStatus; + /** + * @member {NetworkAdapterDHCPStatus} [dhcpStatus] Value indicating whether + * this adapter has DHCP Enabled. Possible values include: 'Disabled', + * 'Enabled' + */ + dhcpStatus?: NetworkAdapterDHCPStatus; + /** + * @member {Ipv4Config} [ipv4Configuration] The IPv4 configuration of the + * network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly ipv4Configuration?: Ipv4Config; + /** + * @member {Ipv6Config} [ipv6Configuration] The IPv6 configuration of the + * network adapter. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly ipv6Configuration?: Ipv6Config; + /** + * @member {string} [ipv6LinkLocalAddress] The IPv6 local address. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly ipv6LinkLocalAddress?: string; + /** + * @member {string[]} [dnsServers] The list DNS Servers of the device. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly dnsServers?: string[]; +} + +/** + * @interface + * An interface representing NetworkSettings. + * The NetworkSettings of a device. + * + * @extends ARMBaseModel + */ +export interface NetworkSettings extends ARMBaseModel { + /** + * @member {NetworkAdapter[]} [networkAdapters] The network adapter list on + * the device. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly networkAdapters?: NetworkAdapter[]; +} + +/** + * @interface + * An interface representing OperationDisplay. + * Operation display properties. + * + */ +export interface OperationDisplay { + /** + * @member {string} [provider] Provider name. + */ + provider?: string; + /** + * @member {string} [resource] The type of resource in which the operation is + * performed. + */ + resource?: string; + /** + * @member {string} [operation] Operation to be performed on the resource. + */ + operation?: string; + /** + * @member {string} [description] Description of the operation to be + * performed. + */ + description?: string; +} + +/** + * @interface + * An interface representing ServiceSpecification. + * Service specification. + * + */ +export interface ServiceSpecification { + /** + * @member {MetricSpecificationV1[]} [metricSpecifications] Metric + * specification as defined by shoebox. + */ + metricSpecifications?: MetricSpecificationV1[]; +} + +/** + * @interface + * An interface representing Operation. + * Operations. + * + */ +export interface Operation { + /** + * @member {string} [name] Name of the operation. + */ + name?: string; + /** + * @member {OperationDisplay} [display] Properties to displayed for the + * operation. + */ + display?: OperationDisplay; + /** + * @member {string} [origin] Origin of the operation. + */ + origin?: string; + /** + * @member {ServiceSpecification} [serviceSpecification] Service + * specification. + */ + serviceSpecification?: ServiceSpecification; +} + +/** + * @interface + * An interface representing OrderStatus. + * Represents a single status change. + * + */ +export interface OrderStatus { + /** + * @member {StatusTypes} status Status of the order pertaining to the allowed + * StatusTypes. Possible values include: 'Untracked', 'AwaitingFulfilment', + * 'AwaitingPreparation', 'AwaitingShipment', 'Shipped', 'Arriving', + * 'Delivered', 'ReplacementRequested', 'LostDevice', 'Declined', + * 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', + * 'CollectedAtMicrosoft' + */ + status: StatusTypes; + /** + * @member {Date} [updateDateTime] Time of status update. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly updateDateTime?: Date; + /** + * @member {string} [comments] Comments related to this status change. + */ + comments?: string; +} + +/** + * @interface + * An interface representing TrackingInfo. + * Tracking courier information. + * + */ +export interface TrackingInfo { + /** + * @member {string} [serialNumber] Serial number of the device being tracked. + */ + serialNumber?: string; + /** + * @member {string} [carrierName] Name of the carrier used in the delivery. + */ + carrierName?: string; + /** + * @member {string} [trackingId] Tracking ID of the shipment. + */ + trackingId?: string; + /** + * @member {string} [trackingUrl] Tracking URL of the shipment. + */ + trackingUrl?: string; +} + +/** + * @interface + * An interface representing Order. + * The order details. + * + * @extends ARMBaseModel + */ +export interface Order extends ARMBaseModel { + /** + * @member {ContactDetails} [contactInformation] The contact details. + */ + contactInformation?: ContactDetails; + /** + * @member {Address} [shippingAddress] The shipping address. + */ + shippingAddress?: Address; + /** + * @member {OrderStatus} [changeStatusTo] Current status of the Order. + */ + changeStatusTo?: OrderStatus; + /** + * @member {OrderStatus[]} [orderHistory] List of status changes in the + * order. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly orderHistory?: OrderStatus[]; + /** + * @member {string} [serialNumber] Serial number of the device. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly serialNumber?: string; + /** + * @member {TrackingInfo[]} [deliveryTrackingInfo] Tracking information + * related to the packages being delivered to the customer whether original + * or replacement devices. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly deliveryTrackingInfo?: TrackingInfo[]; + /** + * @member {TrackingInfo[]} [returnTrackingInfo] Tracking information related + * to the package being returned from the customer whether original or + * replacement devices. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly returnTrackingInfo?: TrackingInfo[]; +} + +/** + * @interface + * An interface representing PeriodicTimerSourceInfo. + * Periodic timer event source. + * + */ +export interface PeriodicTimerSourceInfo { + /** + * @member {Date} startTime Time time [UTC] of the day, from which the + * trigger will be valid. Schedule will be computed with reference to the + * time specified. + */ + startTime: Date; + /** + * @member {string} schedule Periodic frequency at which timer event needs to + * be raised. Supports Daily, Hourly, Minutes and seconds. + */ + schedule: string; + /** + * @member {string} [topic] Topic with which periodic events needs to be + * published to IOT device. + */ + topic?: string; +} + +/** + * @interface + * An interface representing PeriodicTimerEventTrigger. + * Trigger details. + * + */ +export interface PeriodicTimerEventTrigger { + /** + * @member {string} kind Polymorphic Discriminator + */ + kind: "PeriodicTimerEvent"; + /** + * @member {string} [id] The path ID that uniquely identifies the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [name] The name of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [type] The hierarchical type of the object. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; + /** + * @member {PeriodicTimerSourceInfo} [sourceInfo] Periodic timer details. + */ + sourceInfo?: PeriodicTimerSourceInfo; + /** + * @member {RoleSinkInfo} [sinkInfo] Role Sink info. + */ + sinkInfo?: RoleSinkInfo; + /** + * @member {string} [customContextTag] Custom context tag, typically used to + * co-relate the trigger against its usage. Eg. If a PeriodicTimer trigger + * may be intended for certain specific IOT modules in device, the tag can be + * the name/image url of the module. + */ + customContextTag?: string; +} + +/** + * @interface + * An interface representing RefreshDetails. + * Fields for tracking refresh job on the share. + * + */ +export interface RefreshDetails { + /** + * @member {string} [inProgressRefreshJobId] If a RefreshShare job is + * currently inprogress on this share - this field indicates the ArmId of + * that job. Empty otherwise. + */ + inProgressRefreshJobId?: string; + /** + * @member {Date} [lastCompletedRefreshJobTimeInUTC] Indicates the job + * completed time of the last refresh job on this particular share, if any. + * This could be a failed job or a successful job. + */ + lastCompletedRefreshJobTimeInUTC?: Date; + /** + * @member {string} [errorManifestFile] Indicates the relative path of the + * error xml for the last refresh job on this particular share, if any. + * This could be a failed job or a successful job. + */ + errorManifestFile?: string; + /** + * @member {string} [lastJob] Indicates the id of the last refresh job on + * this particular share,if any. + * This could be a failed job or a successful job. + */ + lastJob?: string; +} + +/** + * @interface + * An interface representing SecuritySettings. + * The security settings of a device. + * + * @extends ARMBaseModel + */ +export interface SecuritySettings extends ARMBaseModel { + /** + * @member {AsymmetricEncryptedSecret} deviceAdminPassword Device + * administrator password as an encrypted string (encrypted using RSA PKCS + * #1) is used to log into the local web UI of the device. Actual password + * could have at least 8 characters that are a combination of uppercase, + * lowercase, numeric, and special characters. + */ + deviceAdminPassword: AsymmetricEncryptedSecret; +} + +/** + * @interface + * An interface representing UserAccessRight. + * The mapping between a particular user and the type of access they have on + * the SMB share. + * + */ +export interface UserAccessRight { + /** + * @member {string} userId Id of the user (already existing in the device). + */ + userId: string; + /** + * @member {ShareAccessType} accessType Type of access to be allowed for the + * user. Possible values include: 'Change', 'Read', 'Custom' + */ + accessType: ShareAccessType; +} + +/** + * @interface + * An interface representing Share. + * Represents a share on the Data Box Edge/Gateway device. + * + * @extends ARMBaseModel + */ +export interface Share extends ARMBaseModel { + /** + * @member {string} [description] Description for the share. + */ + description?: string; + /** + * @member {ShareStatus} shareStatus Current status of the share. Possible + * values include: 'Online', 'Offline' + */ + shareStatus: ShareStatus; + /** + * @member {MonitoringStatus} monitoringStatus Current monitoring status of + * the share. Possible values include: 'Enabled', 'Disabled' + */ + monitoringStatus: MonitoringStatus; + /** + * @member {AzureContainerInfo} [azureContainerInfo] Azure container mapping + * for the share. + */ + azureContainerInfo?: AzureContainerInfo; + /** + * @member {ShareAccessProtocol} accessProtocol Access protocol to be used by + * the share. Possible values include: 'SMB', 'NFS' + */ + accessProtocol: ShareAccessProtocol; + /** + * @member {UserAccessRight[]} [userAccessRights] Mapping of Users and + * corresponding access rights on the share (mandatory for SMB protocol). + */ + userAccessRights?: UserAccessRight[]; + /** + * @member {ClientAccessRight[]} [clientAccessRights] List of IP addresses + * and corresponding access rights on the share(mandatory for NFS protocol). + */ + clientAccessRights?: ClientAccessRight[]; + /** + * @member {RefreshDetails} [refreshDetails] Details of the refresh job on + * this share. + */ + refreshDetails?: RefreshDetails; + /** + * @member {MountPointMap[]} [shareMappings] Share mount point to the role. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly shareMappings?: MountPointMap[]; + /** + * @member {DataPolicy} [dataPolicy] Data policy of the share. Possible + * values include: 'Cloud', 'Local' + */ + dataPolicy?: DataPolicy; +} + +/** + * @interface + * An interface representing ShareAccessRight. + * Specifies the mapping between this particular user and the type of access he + * has on shares on this device. + * + */ +export interface ShareAccessRight { + /** + * @member {string} shareId Id of the share. + */ + shareId: string; + /** + * @member {ShareAccessType} accessType Type of access to be allowed on the + * share for this user. Possible values include: 'Change', 'Read', 'Custom' + */ + accessType: ShareAccessType; +} + +/** + * @interface + * An interface representing StorageAccountCredential. + * The storage account credential. + * + * @extends ARMBaseModel + */ +export interface StorageAccountCredential extends ARMBaseModel { + /** + * @member {string} alias Alias for the storage account. + */ + alias: string; + /** + * @member {string} [userName] UserName for the storage account. + */ + userName?: string; + /** + * @member {AsymmetricEncryptedSecret} [accountKey] Encrypted storage key. + */ + accountKey?: AsymmetricEncryptedSecret; + /** + * @member {string} [connectionString] ConnectionString for the storage + * account. This needs to be specified if UserName/AccountKey are not + * specified. + */ + connectionString?: string; + /** + * @member {SSLStatus} sslStatus Signifies whether SSL needs to be enabled or + * not. Possible values include: 'Enabled', 'Disabled' + */ + sslStatus: SSLStatus; + /** + * @member {string} [blobDomainName] Blob end point for private clouds. + */ + blobDomainName?: string; + /** + * @member {AccountType} accountType Type of storage accessed on the storage + * account. Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + */ + accountType: AccountType; +} + +/** + * @interface + * An interface representing UpdateSummary. + * Details about ongoing updates and availability of updates on the device. + * + * @extends ARMBaseModel + */ +export interface UpdateSummary extends ARMBaseModel { + /** + * @member {string} [deviceVersionNumber] The current version of the device, + * of format: 1.2.17312.13. + */ + deviceVersionNumber?: string; + /** + * @member {string} [friendlyDeviceVersionName] The current version of the + * device represented in text format. + */ + friendlyDeviceVersionName?: string; + /** + * @member {Date} [deviceLastScannedDateTime] The last time when a scan was + * done on the device. + */ + deviceLastScannedDateTime?: Date; + /** + * @member {Date} [lastCompletedScanJobDateTime] The time when the last scan + * job was completed (success/cancelled/failed) on the appliance. + */ + lastCompletedScanJobDateTime?: Date; + /** + * @member {Date} [lastCompletedDownloadJobDateTime] The time when the last + * Download job was completed (success/cancelled/failed) on the appliance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastCompletedDownloadJobDateTime?: Date; + /** + * @member {Date} [lastCompletedInstallJobDateTime] The time when the last + * Install job was completed (success/cancelled/failed) on the appliance. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly lastCompletedInstallJobDateTime?: Date; + /** + * @member {number} [totalNumberOfUpdatesAvailable] Count of updates that are + * available for the current device version as per the last scan on the + * device. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalNumberOfUpdatesAvailable?: number; + /** + * @member {number} [totalNumberOfUpdatesPendingDownload] The total number of + * items pending download. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalNumberOfUpdatesPendingDownload?: number; + /** + * @member {number} [totalNumberOfUpdatesPendingInstall] The total number of + * items pending install. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalNumberOfUpdatesPendingInstall?: number; + /** + * @member {InstallRebootBehavior} [rebootBehavior] Indicates if updates are + * available and at least one of the update items detected needs a reboot. + * Possible values include: 'NeverReboots', 'RequiresReboot', 'RequestReboot' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly rebootBehavior?: InstallRebootBehavior; + /** + * @member {UpdateOperation} [ongoingUpdateOperation] The current update + * operation. Possible values include: 'None', 'Scan', 'Download', 'Install' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly ongoingUpdateOperation?: UpdateOperation; + /** + * @member {string} [inProgressDownloadJobId] The Job ID of the download job + * if a download is in progress. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly inProgressDownloadJobId?: string; + /** + * @member {string} [inProgressInstallJobId] The Job ID of the install job if + * an install is in progress. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly inProgressInstallJobId?: string; + /** + * @member {Date} [inProgressDownloadJobStartedDateTime] The time when the + * currently running download (if any) started. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly inProgressDownloadJobStartedDateTime?: Date; + /** + * @member {Date} [inProgressInstallJobStartedDateTime] The time when the + * currently running install (if any) started. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly inProgressInstallJobStartedDateTime?: Date; + /** + * @member {string[]} [updateTitles] The list of update titles which are + * available for install. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly updateTitles?: string[]; + /** + * @member {number} [totalUpdateSizeInBytes] The total size of updates + * available for download in bytes. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly totalUpdateSizeInBytes?: number; +} + +/** + * @interface + * An interface representing UploadCertificateRequest. + * The Upload certificate request. + * + */ +export interface UploadCertificateRequest { + /** + * @member {AuthenticationType} [authenticationType] The authentication type. + * Possible values include: 'Invalid', 'AzureActiveDirectory' + */ + authenticationType?: AuthenticationType; + /** + * @member {string} certificate The base64 encoded certificate raw data. + */ + certificate: string; +} + +/** + * @interface + * An interface representing UploadCertificateResponse. + * The upload registration certificate response. + * + */ +export interface UploadCertificateResponse { + /** + * @member {AuthenticationType} [authType] Specifies the Authentication type. + * Possible values include: 'Invalid', 'AzureActiveDirectory' + */ + authType?: AuthenticationType; + /** + * @member {string} resourceId The resource ID of the edge device. + */ + resourceId: string; + /** + * @member {string} aadAuthority Azure Active Directory tenant authority. + */ + aadAuthority: string; + /** + * @member {string} aadTenantId Azure Active Directory tenant ID. + */ + aadTenantId: string; + /** + * @member {string} servicePrincipalClientId Azure Active Directory service + * principal client ID. + */ + servicePrincipalClientId: string; + /** + * @member {string} servicePrincipalObjectId Azure Active Directory service + * principal Object ID. + */ + servicePrincipalObjectId: string; + /** + * @member {string} azureManagementEndpointAudience The Azure Management + * Endpoint Audience. + */ + azureManagementEndpointAudience: string; +} + +/** + * @interface + * An interface representing User. + * Represents a user who has access to one or more shares on the Edge storage + * device. + * + * @extends ARMBaseModel + */ +export interface User extends ARMBaseModel { + /** + * @member {AsymmetricEncryptedSecret} [encryptedPassword] The details of the + * password specified for the user. + */ + encryptedPassword?: AsymmetricEncryptedSecret; + /** + * @member {ShareAccessRight[]} [shareAccessRights] List of shares that the + * user has rights on. This field should not be specified during user + * creation. + */ + shareAccessRights?: ShareAccessRight[]; +} + +/** + * @interface + * An interface representing DevicesListBySubscriptionOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface DevicesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] Specify $expand=details to populate additional + * fields related to the resource or Specify $skipToken= to populate + * the next page in the list. + */ + expand?: string; +} + +/** + * @interface + * An interface representing DevicesListByResourceGroupOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface DevicesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {string} [expand] Specify $expand=details to populate additional + * fields related to the resource or Specify $skipToken= to populate + * the next page in the list. + */ + expand?: string; +} + +/** + * @interface + * An interface representing DevicesUpdateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface DevicesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {{ [propertyName: string]: string }} [tags] The tags attached to + * the Data Box Edge/Gateway resource. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing DevicesUploadCertificateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface DevicesUploadCertificateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {AuthenticationType} [authenticationType] The authentication type. + * Possible values include: 'Invalid', 'AzureActiveDirectory' + */ + authenticationType?: AuthenticationType; +} + +/** + * @interface + * An interface representing UsersCreateOrUpdateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface UsersCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {AsymmetricEncryptedSecret} [encryptedPassword] The details of the + * password specified for the user. + */ + encryptedPassword?: AsymmetricEncryptedSecret; + /** + * @member {ShareAccessRight[]} [shareAccessRights] List of shares that the + * user has rights on. This field should not be specified during user + * creation. + */ + shareAccessRights?: ShareAccessRight[]; +} + +/** + * @interface + * An interface representing UsersBeginCreateOrUpdateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase + */ +export interface UsersBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * @member {AsymmetricEncryptedSecret} [encryptedPassword] The details of the + * password specified for the user. + */ + encryptedPassword?: AsymmetricEncryptedSecret; + /** + * @member {ShareAccessRight[]} [shareAccessRights] List of shares that the + * user has rights on. This field should not be specified during user + * creation. + */ + shareAccessRights?: ShareAccessRight[]; +} + +/** + * @interface + * An interface representing DataBoxEdgeManagementClientOptions. + * @extends AzureServiceClientOptions + */ +export interface DataBoxEdgeManagementClientOptions extends AzureServiceClientOptions { + /** + * @member {string} [baseUri] + */ + baseUri?: string; +} + + +/** + * @interface + * An interface representing the OperationsList. + * Class for set of operations used for discovery of available provider + * operations. + * + * @extends Array + */ +export interface OperationsList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + */ + nextLink?: string; +} + +/** + * @interface + * An interface representing the DataBoxEdgeDeviceList. + * The collection of Data Box Edge/Gateway devices. + * + * @extends Array + */ +export interface DataBoxEdgeDeviceList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the AlertList. + * Collection of Alerts. + * + * @extends Array + */ +export interface AlertList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the BandwidthSchedulesList. + * The collection of bandwidth schedules. + * + * @extends Array + */ +export interface BandwidthSchedulesList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the OrderList. + * List of order entities. + * + * @extends Array + */ +export interface OrderList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the RoleList. + * Collection of all role on the data box edge device. + * + * @extends Array + */ +export interface RoleList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the ShareList. + * Collection of all shares on the Data Box Edge/Gateway device. + * + * @extends Array + */ +export interface ShareList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the StorageAccountCredentialList. + * The collection of storage account credential entities. + * + * @extends Array + */ +export interface StorageAccountCredentialList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the TriggerList. + * Collection of all trigger on the data box edge device. + * + * @extends Array + */ +export interface TriggerList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * An interface representing the UserList. + * Collection of users. + * + * @extends Array + */ +export interface UserList extends Array { + /** + * @member {string} [nextLink] Link to the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for AlertSeverity. + * Possible values include: 'Informational', 'Warning', 'Critical' + * @readonly + * @enum {string} + */ +export type AlertSeverity = 'Informational' | 'Warning' | 'Critical'; + +/** + * Defines values for EncryptionAlgorithm. + * Possible values include: 'None', 'AES256', 'RSAES_PKCS1_v_1_5' + * @readonly + * @enum {string} + */ +export type EncryptionAlgorithm = 'None' | 'AES256' | 'RSAES_PKCS1_v_1_5'; + +/** + * Defines values for AzureContainerDataFormat. + * Possible values include: 'BlockBlob', 'PageBlob', 'AzureFile' + * @readonly + * @enum {string} + */ +export type AzureContainerDataFormat = 'BlockBlob' | 'PageBlob' | 'AzureFile'; + +/** + * Defines values for DayOfWeek. + * Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + * 'Saturday' + * @readonly + * @enum {string} + */ +export type DayOfWeek = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday'; + +/** + * Defines values for ClientPermissionType. + * Possible values include: 'NoAccess', 'ReadOnly', 'ReadWrite' + * @readonly + * @enum {string} + */ +export type ClientPermissionType = 'NoAccess' | 'ReadOnly' | 'ReadWrite'; + +/** + * Defines values for SkuName. + * Possible values include: 'Gateway', 'Edge' + * @readonly + * @enum {string} + */ +export type SkuName = 'Gateway' | 'Edge'; + +/** + * Defines values for SkuTier. + * Possible values include: 'Standard' + * @readonly + * @enum {string} + */ +export type SkuTier = 'Standard'; + +/** + * Defines values for DataBoxEdgeDeviceStatus. + * Possible values include: 'ReadyToSetup', 'Online', 'Offline', 'NeedsAttention', 'Disconnected', + * 'PartiallyDisconnected' + * @readonly + * @enum {string} + */ +export type DataBoxEdgeDeviceStatus = 'ReadyToSetup' | 'Online' | 'Offline' | 'NeedsAttention' | 'Disconnected' | 'PartiallyDisconnected'; + +/** + * Defines values for DeviceType. + * Possible values include: 'DataBoxEdgeDevice' + * @readonly + * @enum {string} + */ +export type DeviceType = 'DataBoxEdgeDevice'; + +/** + * Defines values for RoleTypes. + * Possible values include: 'IOT', 'ASA', 'Functions', 'Cognitive' + * @readonly + * @enum {string} + */ +export type RoleTypes = 'IOT' | 'ASA' | 'Functions' | 'Cognitive'; + +/** + * Defines values for PlatformType. + * Possible values include: 'Windows', 'Linux' + * @readonly + * @enum {string} + */ +export type PlatformType = 'Windows' | 'Linux'; + +/** + * Defines values for RoleStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type RoleStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for JobStatus. + * Possible values include: 'Invalid', 'Running', 'Succeeded', 'Failed', 'Canceled', 'Paused', + * 'Scheduled' + * @readonly + * @enum {string} + */ +export type JobStatus = 'Invalid' | 'Running' | 'Succeeded' | 'Failed' | 'Canceled' | 'Paused' | 'Scheduled'; + +/** + * Defines values for JobType. + * Possible values include: 'Invalid', 'ScanForUpdates', 'DownloadUpdates', 'InstallUpdates', + * 'RefreshShare' + * @readonly + * @enum {string} + */ +export type JobType = 'Invalid' | 'ScanForUpdates' | 'DownloadUpdates' | 'InstallUpdates' | 'RefreshShare'; + +/** + * Defines values for UpdateOperationStage. + * Possible values include: 'Unknown', 'Initial', 'ScanStarted', 'ScanComplete', 'ScanFailed', + * 'DownloadStarted', 'DownloadComplete', 'DownloadFailed', 'InstallStarted', 'InstallComplete', + * 'InstallFailed', 'RebootInitiated', 'Success', 'Failure', 'RescanStarted', 'RescanComplete', + * 'RescanFailed' + * @readonly + * @enum {string} + */ +export type UpdateOperationStage = 'Unknown' | 'Initial' | 'ScanStarted' | 'ScanComplete' | 'ScanFailed' | 'DownloadStarted' | 'DownloadComplete' | 'DownloadFailed' | 'InstallStarted' | 'InstallComplete' | 'InstallFailed' | 'RebootInitiated' | 'Success' | 'Failure' | 'RescanStarted' | 'RescanComplete' | 'RescanFailed'; + +/** + * Defines values for DownloadPhase. + * Possible values include: 'Unknown', 'Initializing', 'Downloading', 'Verifying' + * @readonly + * @enum {string} + */ +export type DownloadPhase = 'Unknown' | 'Initializing' | 'Downloading' | 'Verifying'; + +/** + * Defines values for MetricUnit. + * Possible values include: 'NotSpecified', 'Percent', 'Count', 'Seconds', 'Milliseconds', 'Bytes', + * 'BytesPerSecond', 'CountPerSecond' + * @readonly + * @enum {string} + */ +export type MetricUnit = 'NotSpecified' | 'Percent' | 'Count' | 'Seconds' | 'Milliseconds' | 'Bytes' | 'BytesPerSecond' | 'CountPerSecond'; + +/** + * Defines values for MetricAggregationType. + * Possible values include: 'NotSpecified', 'None', 'Average', 'Minimum', 'Maximum', 'Total', + * 'Count' + * @readonly + * @enum {string} + */ +export type MetricAggregationType = 'NotSpecified' | 'None' | 'Average' | 'Minimum' | 'Maximum' | 'Total' | 'Count'; + +/** + * Defines values for MetricCategory. + * Possible values include: 'Capacity', 'Transaction' + * @readonly + * @enum {string} + */ +export type MetricCategory = 'Capacity' | 'Transaction'; + +/** + * Defines values for TimeGrain. + * Possible values include: 'PT1M', 'PT5M', 'PT15M', 'PT30M', 'PT1H', 'PT6H', 'PT12H', 'PT1D' + * @readonly + * @enum {string} + */ +export type TimeGrain = 'PT1M' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'PT1D'; + +/** + * Defines values for NetworkGroup. + * Possible values include: 'None', 'NonRDMA', 'RDMA' + * @readonly + * @enum {string} + */ +export type NetworkGroup = 'None' | 'NonRDMA' | 'RDMA'; + +/** + * Defines values for NetworkAdapterStatus. + * Possible values include: 'Inactive', 'Active' + * @readonly + * @enum {string} + */ +export type NetworkAdapterStatus = 'Inactive' | 'Active'; + +/** + * Defines values for NetworkAdapterRDMAStatus. + * Possible values include: 'Incapable', 'Capable' + * @readonly + * @enum {string} + */ +export type NetworkAdapterRDMAStatus = 'Incapable' | 'Capable'; + +/** + * Defines values for NetworkAdapterDHCPStatus. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type NetworkAdapterDHCPStatus = 'Disabled' | 'Enabled'; + +/** + * Defines values for StatusTypes. + * Possible values include: 'Untracked', 'AwaitingFulfilment', 'AwaitingPreparation', + * 'AwaitingShipment', 'Shipped', 'Arriving', 'Delivered', 'ReplacementRequested', 'LostDevice', + * 'Declined', 'ReturnInitiated', 'AwaitingReturnShipment', 'ShippedBack', 'CollectedAtMicrosoft' + * @readonly + * @enum {string} + */ +export type StatusTypes = 'Untracked' | 'AwaitingFulfilment' | 'AwaitingPreparation' | 'AwaitingShipment' | 'Shipped' | 'Arriving' | 'Delivered' | 'ReplacementRequested' | 'LostDevice' | 'Declined' | 'ReturnInitiated' | 'AwaitingReturnShipment' | 'ShippedBack' | 'CollectedAtMicrosoft'; + +/** + * Defines values for AuthenticationType. + * Possible values include: 'Invalid', 'AzureActiveDirectory' + * @readonly + * @enum {string} + */ +export type AuthenticationType = 'Invalid' | 'AzureActiveDirectory'; + +/** + * Defines values for ShareStatus. + * Possible values include: 'Online', 'Offline' + * @readonly + * @enum {string} + */ +export type ShareStatus = 'Online' | 'Offline'; + +/** + * Defines values for MonitoringStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type MonitoringStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for ShareAccessProtocol. + * Possible values include: 'SMB', 'NFS' + * @readonly + * @enum {string} + */ +export type ShareAccessProtocol = 'SMB' | 'NFS'; + +/** + * Defines values for ShareAccessType. + * Possible values include: 'Change', 'Read', 'Custom' + * @readonly + * @enum {string} + */ +export type ShareAccessType = 'Change' | 'Read' | 'Custom'; + +/** + * Defines values for DataPolicy. + * Possible values include: 'Cloud', 'Local' + * @readonly + * @enum {string} + */ +export type DataPolicy = 'Cloud' | 'Local'; + +/** + * Defines values for SSLStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type SSLStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for AccountType. + * Possible values include: 'GeneralPurposeStorage', 'BlobStorage' + * @readonly + * @enum {string} + */ +export type AccountType = 'GeneralPurposeStorage' | 'BlobStorage'; + +/** + * Defines values for InstallRebootBehavior. + * Possible values include: 'NeverReboots', 'RequiresReboot', 'RequestReboot' + * @readonly + * @enum {string} + */ +export type InstallRebootBehavior = 'NeverReboots' | 'RequiresReboot' | 'RequestReboot'; + +/** + * Defines values for UpdateOperation. + * Possible values include: 'None', 'Scan', 'Download', 'Install' + * @readonly + * @enum {string} + */ +export type UpdateOperation = 'None' | 'Scan' | 'Download' | 'Install'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationsList & { + /** + * 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: OperationsList; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationsList & { + /** + * 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: OperationsList; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type DevicesListBySubscriptionResponse = DataBoxEdgeDeviceList & { + /** + * 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: DataBoxEdgeDeviceList; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type DevicesListByResourceGroupResponse = DataBoxEdgeDeviceList & { + /** + * 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: DataBoxEdgeDeviceList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DevicesGetResponse = DataBoxEdgeDevice & { + /** + * 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: DataBoxEdgeDevice; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DevicesCreateOrUpdateResponse = DataBoxEdgeDevice & { + /** + * 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: DataBoxEdgeDevice; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type DevicesUpdateResponse = DataBoxEdgeDevice & { + /** + * 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: DataBoxEdgeDevice; + }; +}; + +/** + * Contains response data for the createOrUpdateExtendedInfo operation. + */ +export type DevicesCreateOrUpdateExtendedInfoResponse = DataBoxEdgeDeviceExtendedInfo & { + /** + * 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: DataBoxEdgeDeviceExtendedInfo; + }; +}; + +/** + * Contains response data for the getExtendedInformation operation. + */ +export type DevicesGetExtendedInformationResponse = DataBoxEdgeDeviceExtendedInfo & { + /** + * 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: DataBoxEdgeDeviceExtendedInfo; + }; +}; + +/** + * Contains response data for the getNetworkSettings operation. + */ +export type DevicesGetNetworkSettingsResponse = NetworkSettings & { + /** + * 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: NetworkSettings; + }; +}; + +/** + * Contains response data for the getUpdateSummary operation. + */ +export type DevicesGetUpdateSummaryResponse = UpdateSummary & { + /** + * 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: UpdateSummary; + }; +}; + +/** + * Contains response data for the uploadCertificate operation. + */ +export type DevicesUploadCertificateResponse = UploadCertificateResponse & { + /** + * 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: UploadCertificateResponse; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DevicesBeginCreateOrUpdateResponse = DataBoxEdgeDevice & { + /** + * 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: DataBoxEdgeDevice; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type DevicesListBySubscriptionNextResponse = DataBoxEdgeDeviceList & { + /** + * 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: DataBoxEdgeDeviceList; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type DevicesListByResourceGroupNextResponse = DataBoxEdgeDeviceList & { + /** + * 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: DataBoxEdgeDeviceList; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type AlertsListByDataBoxEdgeDeviceResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AlertsGetResponse = Alert & { + /** + * 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: Alert; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type AlertsListByDataBoxEdgeDeviceNextResponse = AlertList & { + /** + * 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: AlertList; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type BandwidthSchedulesListByDataBoxEdgeDeviceResponse = BandwidthSchedulesList & { + /** + * 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: BandwidthSchedulesList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type BandwidthSchedulesGetResponse = BandwidthSchedule & { + /** + * 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: BandwidthSchedule; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type BandwidthSchedulesCreateOrUpdateResponse = BandwidthSchedule & { + /** + * 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: BandwidthSchedule; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type BandwidthSchedulesBeginCreateOrUpdateResponse = BandwidthSchedule & { + /** + * 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: BandwidthSchedule; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type BandwidthSchedulesListByDataBoxEdgeDeviceNextResponse = BandwidthSchedulesList & { + /** + * 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: BandwidthSchedulesList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationsStatusGetResponse = Job & { + /** + * 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: Job; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type OrdersListByDataBoxEdgeDeviceResponse = OrderList & { + /** + * 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: OrderList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OrdersGetResponse = Order & { + /** + * 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: Order; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type OrdersCreateOrUpdateResponse = Order & { + /** + * 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: Order; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type OrdersBeginCreateOrUpdateResponse = Order & { + /** + * 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: Order; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type OrdersListByDataBoxEdgeDeviceNextResponse = OrderList & { + /** + * 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: OrderList; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type RolesListByDataBoxEdgeDeviceResponse = RoleList & { + /** + * 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: RoleList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RolesGetResponse = RoleUnion & { + /** + * 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: RoleUnion; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type RolesCreateOrUpdateResponse = RoleUnion & { + /** + * 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: RoleUnion; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type RolesBeginCreateOrUpdateResponse = RoleUnion & { + /** + * 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: RoleUnion; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type RolesListByDataBoxEdgeDeviceNextResponse = RoleList & { + /** + * 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: RoleList; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type SharesListByDataBoxEdgeDeviceResponse = ShareList & { + /** + * 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: ShareList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type SharesGetResponse = Share & { + /** + * 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: Share; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type SharesCreateOrUpdateResponse = Share & { + /** + * 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: Share; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type SharesBeginCreateOrUpdateResponse = Share & { + /** + * 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: Share; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type SharesListByDataBoxEdgeDeviceNextResponse = ShareList & { + /** + * 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: ShareList; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type StorageAccountCredentialsListByDataBoxEdgeDeviceResponse = StorageAccountCredentialList & { + /** + * 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: StorageAccountCredentialList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type StorageAccountCredentialsGetResponse = StorageAccountCredential & { + /** + * 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: StorageAccountCredential; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type StorageAccountCredentialsCreateOrUpdateResponse = StorageAccountCredential & { + /** + * 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: StorageAccountCredential; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type StorageAccountCredentialsBeginCreateOrUpdateResponse = StorageAccountCredential & { + /** + * 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: StorageAccountCredential; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type StorageAccountCredentialsListByDataBoxEdgeDeviceNextResponse = StorageAccountCredentialList & { + /** + * 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: StorageAccountCredentialList; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type TriggersListByDataBoxEdgeDeviceResponse = TriggerList & { + /** + * 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: TriggerList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type TriggersGetResponse = TriggerUnion & { + /** + * 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: TriggerUnion; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type TriggersCreateOrUpdateResponse = TriggerUnion & { + /** + * 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: TriggerUnion; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type TriggersBeginCreateOrUpdateResponse = TriggerUnion & { + /** + * 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: TriggerUnion; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type TriggersListByDataBoxEdgeDeviceNextResponse = TriggerList & { + /** + * 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: TriggerList; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDevice operation. + */ +export type UsersListByDataBoxEdgeDeviceResponse = UserList & { + /** + * 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: UserList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type UsersGetResponse = User & { + /** + * 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: User; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type UsersCreateOrUpdateResponse = User & { + /** + * 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: User; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type UsersBeginCreateOrUpdateResponse = User & { + /** + * 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: User; + }; +}; + +/** + * Contains response data for the listByDataBoxEdgeDeviceNext operation. + */ +export type UsersListByDataBoxEdgeDeviceNextResponse = UserList & { + /** + * 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: UserList; + }; +}; diff --git a/packages/@azure/arm-edgedateway/lib/models/mappers.ts b/packages/@azure/arm-edgedateway/lib/models/mappers.ts new file mode 100644 index 000000000000..eddf1d1b05cd --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/mappers.ts @@ -0,0 +1,2583 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const Address: msRest.CompositeMapper = { + serializedName: "Address", + type: { + name: "Composite", + className: "Address", + modelProperties: { + addressLine1: { + required: true, + serializedName: "addressLine1", + type: { + name: "String" + } + }, + addressLine2: { + required: true, + serializedName: "addressLine2", + type: { + name: "String" + } + }, + addressLine3: { + required: true, + serializedName: "addressLine3", + type: { + name: "String" + } + }, + postalCode: { + required: true, + serializedName: "postalCode", + type: { + name: "String" + } + }, + city: { + required: true, + serializedName: "city", + type: { + name: "String" + } + }, + state: { + required: true, + serializedName: "state", + type: { + name: "String" + } + }, + country: { + required: true, + serializedName: "country", + type: { + name: "String" + } + } + } + } +}; + +export const AlertErrorDetails: msRest.CompositeMapper = { + serializedName: "AlertErrorDetails", + type: { + name: "Composite", + className: "AlertErrorDetails", + modelProperties: { + errorCode: { + readOnly: true, + serializedName: "errorCode", + type: { + name: "String" + } + }, + errorMessage: { + readOnly: true, + serializedName: "errorMessage", + type: { + name: "String" + } + }, + occurrences: { + readOnly: true, + serializedName: "occurrences", + type: { + name: "Number" + } + } + } + } +}; + +export const ARMBaseModel: msRest.CompositeMapper = { + serializedName: "ARMBaseModel", + type: { + name: "Composite", + className: "ARMBaseModel", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const Alert: msRest.CompositeMapper = { + serializedName: "Alert", + type: { + name: "Composite", + className: "Alert", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + title: { + readOnly: true, + serializedName: "properties.title", + type: { + name: "String" + } + }, + alertType: { + readOnly: true, + serializedName: "properties.alertType", + type: { + name: "String" + } + }, + appearedAtDateTime: { + readOnly: true, + serializedName: "properties.appearedAtDateTime", + type: { + name: "DateTime" + } + }, + recommendation: { + readOnly: true, + serializedName: "properties.recommendation", + type: { + name: "String" + } + }, + severity: { + readOnly: true, + serializedName: "properties.severity", + type: { + name: "String" + } + }, + errorDetails: { + readOnly: true, + serializedName: "properties.errorDetails", + type: { + name: "Composite", + className: "AlertErrorDetails" + } + }, + detailedInformation: { + readOnly: true, + serializedName: "properties.detailedInformation", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AsymmetricEncryptedSecret: msRest.CompositeMapper = { + serializedName: "AsymmetricEncryptedSecret", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret", + modelProperties: { + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + }, + encryptionCertThumbprint: { + serializedName: "encryptionCertThumbprint", + type: { + name: "String" + } + }, + encryptionAlgorithm: { + required: true, + serializedName: "encryptionAlgorithm", + type: { + name: "String" + } + } + } + } +}; + +export const SymmetricKey: msRest.CompositeMapper = { + serializedName: "SymmetricKey", + type: { + name: "Composite", + className: "SymmetricKey", + modelProperties: { + connectionString: { + serializedName: "connectionString", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + } + } + } +}; + +export const Authentication: msRest.CompositeMapper = { + serializedName: "Authentication", + type: { + name: "Composite", + className: "Authentication", + modelProperties: { + symmetricKey: { + serializedName: "symmetricKey", + type: { + name: "Composite", + className: "SymmetricKey" + } + } + } + } +}; + +export const AzureContainerInfo: msRest.CompositeMapper = { + serializedName: "AzureContainerInfo", + type: { + name: "Composite", + className: "AzureContainerInfo", + modelProperties: { + storageAccountCredentialId: { + required: true, + serializedName: "storageAccountCredentialId", + type: { + name: "String" + } + }, + containerName: { + required: true, + serializedName: "containerName", + type: { + name: "String" + } + }, + dataFormat: { + required: true, + serializedName: "dataFormat", + type: { + name: "String" + } + } + } + } +}; + +export const BandwidthSchedule: msRest.CompositeMapper = { + serializedName: "BandwidthSchedule", + type: { + name: "Composite", + className: "BandwidthSchedule", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + start: { + required: true, + serializedName: "properties.start", + type: { + name: "String" + } + }, + stop: { + required: true, + serializedName: "properties.stop", + type: { + name: "String" + } + }, + rateInMbps: { + required: true, + serializedName: "properties.rateInMbps", + type: { + name: "Number" + } + }, + days: { + required: true, + serializedName: "properties.days", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ClientAccessRight: msRest.CompositeMapper = { + serializedName: "ClientAccessRight", + type: { + name: "Composite", + className: "ClientAccessRight", + modelProperties: { + client: { + required: true, + serializedName: "client", + type: { + name: "String" + } + }, + accessPermission: { + required: true, + serializedName: "accessPermission", + type: { + name: "String" + } + } + } + } +}; + +export const ContactDetails: msRest.CompositeMapper = { + serializedName: "ContactDetails", + type: { + name: "Composite", + className: "ContactDetails", + modelProperties: { + contactPerson: { + required: true, + serializedName: "contactPerson", + type: { + name: "String" + } + }, + companyName: { + required: true, + serializedName: "companyName", + type: { + name: "String" + } + }, + phone: { + required: true, + serializedName: "phone", + type: { + name: "String" + } + }, + emailList: { + required: true, + serializedName: "emailList", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + +export const DataBoxEdgeDevice: msRest.CompositeMapper = { + serializedName: "DataBoxEdgeDevice", + type: { + name: "Composite", + className: "DataBoxEdgeDevice", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + dataBoxEdgeDeviceStatus: { + serializedName: "properties.dataBoxEdgeDeviceStatus", + type: { + name: "String" + } + }, + serialNumber: { + readOnly: true, + serializedName: "properties.serialNumber", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + modelDescription: { + serializedName: "properties.modelDescription", + type: { + name: "String" + } + }, + deviceType: { + readOnly: true, + serializedName: "properties.deviceType", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + }, + culture: { + readOnly: true, + serializedName: "properties.culture", + type: { + name: "String" + } + }, + deviceModel: { + readOnly: true, + serializedName: "properties.deviceModel", + type: { + name: "String" + } + }, + deviceSoftwareVersion: { + readOnly: true, + serializedName: "properties.deviceSoftwareVersion", + type: { + name: "String" + } + }, + deviceLocalCapacity: { + readOnly: true, + serializedName: "properties.deviceLocalCapacity", + type: { + name: "Number" + } + }, + timeZone: { + readOnly: true, + serializedName: "properties.timeZone", + type: { + name: "String" + } + }, + deviceHcsVersion: { + readOnly: true, + serializedName: "properties.deviceHcsVersion", + type: { + name: "String" + } + }, + configuredRoleTypes: { + readOnly: true, + serializedName: "properties.configuredRoleTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const DataBoxEdgeDeviceExtendedInfo: msRest.CompositeMapper = { + serializedName: "DataBoxEdgeDeviceExtendedInfo", + type: { + name: "Composite", + className: "DataBoxEdgeDeviceExtendedInfo", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + integrityKey: { + required: true, + serializedName: "properties.integrityKey", + type: { + name: "String" + } + }, + encryptionKeyThumbprint: { + serializedName: "properties.encryptionKeyThumbprint", + type: { + name: "String" + } + }, + encryptionKey: { + serializedName: "properties.encryptionKey", + type: { + name: "String" + } + }, + resourceKey: { + readOnly: true, + serializedName: "properties.resourceKey", + type: { + name: "String" + } + } + } + } +}; + +export const DataBoxEdgeDevicePatch: msRest.CompositeMapper = { + serializedName: "DataBoxEdgeDevicePatch", + type: { + name: "Composite", + className: "DataBoxEdgeDevicePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const FileSourceInfo: msRest.CompositeMapper = { + serializedName: "FileSourceInfo", + type: { + name: "Composite", + className: "FileSourceInfo", + modelProperties: { + shareId: { + required: true, + serializedName: "shareId", + type: { + name: "String" + } + } + } + } +}; + +export const RoleSinkInfo: msRest.CompositeMapper = { + serializedName: "RoleSinkInfo", + type: { + name: "Composite", + className: "RoleSinkInfo", + modelProperties: { + roleId: { + required: true, + serializedName: "roleId", + type: { + name: "String" + } + } + } + } +}; + +export const Trigger: msRest.CompositeMapper = { + serializedName: "Trigger", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "Trigger", + className: "Trigger", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const FileEventTrigger: msRest.CompositeMapper = { + serializedName: "FileEvent", + type: { + name: "Composite", + className: "FileEventTrigger", + modelProperties: { + ...Trigger.type.modelProperties, + sourceInfo: { + serializedName: "properties.sourceInfo", + type: { + name: "Composite", + className: "FileSourceInfo" + } + }, + sinkInfo: { + serializedName: "properties.sinkInfo", + type: { + name: "Composite", + className: "RoleSinkInfo" + } + }, + customContextTag: { + serializedName: "properties.customContextTag", + type: { + name: "String" + } + } + } + } +}; + +export const IoTDeviceInfo: msRest.CompositeMapper = { + serializedName: "IoTDeviceInfo", + type: { + name: "Composite", + className: "IoTDeviceInfo", + modelProperties: { + deviceId: { + required: true, + serializedName: "deviceId", + type: { + name: "String" + } + }, + ioTHostHub: { + required: true, + serializedName: "ioTHostHub", + type: { + name: "String" + } + }, + authentication: { + serializedName: "authentication", + type: { + name: "Composite", + className: "Authentication" + } + } + } + } +}; + +export const MountPointMap: msRest.CompositeMapper = { + serializedName: "MountPointMap", + type: { + name: "Composite", + className: "MountPointMap", + modelProperties: { + shareId: { + required: true, + serializedName: "shareId", + type: { + name: "String" + } + }, + roleId: { + readOnly: true, + serializedName: "roleId", + type: { + name: "String" + } + }, + mountPoint: { + readOnly: true, + serializedName: "mountPoint", + type: { + name: "String" + } + }, + roleType: { + readOnly: true, + serializedName: "roleType", + type: { + name: "String" + } + } + } + } +}; + +export const Role: msRest.CompositeMapper = { + serializedName: "Role", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + uberParent: "Role", + className: "Role", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + kind: { + required: true, + serializedName: "kind", + type: { + name: "String" + } + } + } + } +}; + +export const IoTRole: msRest.CompositeMapper = { + serializedName: "IOT", + type: { + name: "Composite", + className: "IoTRole", + modelProperties: { + ...Role.type.modelProperties, + hostPlatform: { + required: true, + serializedName: "properties.hostPlatform", + type: { + name: "String" + } + }, + ioTDeviceDetails: { + required: true, + serializedName: "properties.ioTDeviceDetails", + type: { + name: "Composite", + className: "IoTDeviceInfo" + } + }, + ioTEdgeDeviceDetails: { + required: true, + serializedName: "properties.ioTEdgeDeviceDetails", + type: { + name: "Composite", + className: "IoTDeviceInfo" + } + }, + shareMappings: { + serializedName: "properties.shareMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountPointMap" + } + } + } + }, + roleStatus: { + required: true, + serializedName: "properties.roleStatus", + type: { + name: "String" + } + } + } + } +}; + +export const Ipv4Config: msRest.CompositeMapper = { + serializedName: "Ipv4Config", + type: { + name: "Composite", + className: "Ipv4Config", + modelProperties: { + ipAddress: { + readOnly: true, + serializedName: "ipAddress", + type: { + name: "String" + } + }, + subnet: { + readOnly: true, + serializedName: "subnet", + type: { + name: "String" + } + }, + gateway: { + readOnly: true, + serializedName: "gateway", + type: { + name: "String" + } + } + } + } +}; + +export const Ipv6Config: msRest.CompositeMapper = { + serializedName: "Ipv6Config", + type: { + name: "Composite", + className: "Ipv6Config", + modelProperties: { + ipAddress: { + readOnly: true, + serializedName: "ipAddress", + type: { + name: "String" + } + }, + prefixLength: { + readOnly: true, + serializedName: "prefixLength", + type: { + name: "Number" + } + }, + gateway: { + readOnly: true, + serializedName: "gateway", + type: { + name: "String" + } + } + } + } +}; + +export const JobErrorItem: msRest.CompositeMapper = { + serializedName: "JobErrorItem", + type: { + name: "Composite", + className: "JobErrorItem", + modelProperties: { + recommendations: { + readOnly: true, + serializedName: "recommendations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const JobErrorDetails: msRest.CompositeMapper = { + serializedName: "JobErrorDetails", + type: { + name: "Composite", + className: "JobErrorDetails", + modelProperties: { + errorDetails: { + readOnly: true, + serializedName: "errorDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobErrorItem" + } + } + } + }, + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateDownloadProgress: msRest.CompositeMapper = { + serializedName: "UpdateDownloadProgress", + type: { + name: "Composite", + className: "UpdateDownloadProgress", + modelProperties: { + downloadPhase: { + readOnly: true, + serializedName: "downloadPhase", + type: { + name: "String" + } + }, + percentComplete: { + readOnly: true, + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + totalBytesToDownload: { + readOnly: true, + serializedName: "totalBytesToDownload", + type: { + name: "Number" + } + }, + totalBytesDownloaded: { + readOnly: true, + serializedName: "totalBytesDownloaded", + type: { + name: "Number" + } + }, + numberOfUpdatesToDownload: { + readOnly: true, + serializedName: "numberOfUpdatesToDownload", + type: { + name: "Number" + } + }, + numberOfUpdatesDownloaded: { + readOnly: true, + serializedName: "numberOfUpdatesDownloaded", + type: { + name: "Number" + } + } + } + } +}; + +export const UpdateInstallProgress: msRest.CompositeMapper = { + serializedName: "UpdateInstallProgress", + type: { + name: "Composite", + className: "UpdateInstallProgress", + modelProperties: { + percentComplete: { + readOnly: true, + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + numberOfUpdatesToInstall: { + readOnly: true, + serializedName: "numberOfUpdatesToInstall", + type: { + name: "Number" + } + }, + numberOfUpdatesInstalled: { + readOnly: true, + serializedName: "numberOfUpdatesInstalled", + type: { + name: "Number" + } + } + } + } +}; + +export const Job: msRest.CompositeMapper = { + serializedName: "Job", + type: { + name: "Composite", + className: "Job", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + readOnly: true, + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + percentComplete: { + readOnly: true, + serializedName: "percentComplete", + type: { + name: "Number" + } + }, + error: { + readOnly: true, + serializedName: "error", + type: { + name: "Composite", + className: "JobErrorDetails" + } + }, + jobType: { + readOnly: true, + serializedName: "properties.jobType", + type: { + name: "String" + } + }, + currentStage: { + readOnly: true, + serializedName: "properties.currentStage", + type: { + name: "String" + } + }, + downloadProgress: { + readOnly: true, + serializedName: "properties.downloadProgress", + type: { + name: "Composite", + className: "UpdateDownloadProgress" + } + }, + installProgress: { + readOnly: true, + serializedName: "properties.installProgress", + type: { + name: "Composite", + className: "UpdateInstallProgress" + } + }, + totalRefreshErrors: { + readOnly: true, + serializedName: "properties.totalRefreshErrors", + type: { + name: "Number" + } + }, + errorManifestFile: { + readOnly: true, + serializedName: "properties.errorManifestFile", + type: { + name: "String" + } + }, + shareId: { + readOnly: true, + serializedName: "properties.shareId", + type: { + name: "String" + } + }, + folder: { + serializedName: "properties.folder", + type: { + name: "String" + } + } + } + } +}; + +export const MetricDimensionV1: msRest.CompositeMapper = { + serializedName: "MetricDimension_V1", + type: { + name: "Composite", + className: "MetricDimensionV1", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MetricSpecificationV1: msRest.CompositeMapper = { + serializedName: "MetricSpecification_V1", + type: { + name: "Composite", + className: "MetricSpecificationV1", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String" + } + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricDimensionV1" + } + } + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, + resourceIdDimensionNameOverride: { + serializedName: "resourceIdDimensionNameOverride", + type: { + name: "String" + } + }, + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const NetworkAdapterPosition: msRest.CompositeMapper = { + serializedName: "NetworkAdapterPosition", + type: { + name: "Composite", + className: "NetworkAdapterPosition", + modelProperties: { + networkGroup: { + readOnly: true, + serializedName: "networkGroup", + type: { + name: "String" + } + }, + port: { + readOnly: true, + serializedName: "port", + type: { + name: "Number" + } + } + } + } +}; + +export const NetworkAdapter: msRest.CompositeMapper = { + serializedName: "NetworkAdapter", + type: { + name: "Composite", + className: "NetworkAdapter", + modelProperties: { + adapterId: { + readOnly: true, + serializedName: "adapterId", + type: { + name: "String" + } + }, + adapterPosition: { + readOnly: true, + serializedName: "adapterPosition", + type: { + name: "Composite", + className: "NetworkAdapterPosition" + } + }, + index: { + readOnly: true, + serializedName: "index", + type: { + name: "Number" + } + }, + nodeId: { + readOnly: true, + serializedName: "nodeId", + type: { + name: "String" + } + }, + networkAdapterName: { + readOnly: true, + serializedName: "networkAdapterName", + type: { + name: "String" + } + }, + label: { + readOnly: true, + serializedName: "label", + type: { + name: "String" + } + }, + macAddress: { + readOnly: true, + serializedName: "macAddress", + type: { + name: "String" + } + }, + linkSpeed: { + readOnly: true, + serializedName: "linkSpeed", + type: { + name: "Number" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + rdmaStatus: { + serializedName: "rdmaStatus", + type: { + name: "String" + } + }, + dhcpStatus: { + serializedName: "dhcpStatus", + type: { + name: "String" + } + }, + ipv4Configuration: { + readOnly: true, + serializedName: "ipv4Configuration", + type: { + name: "Composite", + className: "Ipv4Config" + } + }, + ipv6Configuration: { + readOnly: true, + serializedName: "ipv6Configuration", + type: { + name: "Composite", + className: "Ipv6Config" + } + }, + ipv6LinkLocalAddress: { + readOnly: true, + serializedName: "ipv6LinkLocalAddress", + type: { + name: "String" + } + }, + dnsServers: { + readOnly: true, + serializedName: "dnsServers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const NetworkSettings: msRest.CompositeMapper = { + serializedName: "NetworkSettings", + type: { + name: "Composite", + className: "NetworkSettings", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + networkAdapters: { + readOnly: true, + serializedName: "properties.networkAdapters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkAdapter" + } + } + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "OperationDisplay", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceSpecification: msRest.CompositeMapper = { + serializedName: "ServiceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MetricSpecificationV1" + } + } + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", + type: { + name: "String" + } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "ServiceSpecification" + } + } + } + } +}; + +export const OrderStatus: msRest.CompositeMapper = { + serializedName: "OrderStatus", + type: { + name: "Composite", + className: "OrderStatus", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + updateDateTime: { + readOnly: true, + serializedName: "updateDateTime", + type: { + name: "DateTime" + } + }, + comments: { + serializedName: "comments", + type: { + name: "String" + } + } + } + } +}; + +export const TrackingInfo: msRest.CompositeMapper = { + serializedName: "TrackingInfo", + type: { + name: "Composite", + className: "TrackingInfo", + modelProperties: { + serialNumber: { + serializedName: "serialNumber", + type: { + name: "String" + } + }, + carrierName: { + serializedName: "carrierName", + type: { + name: "String" + } + }, + trackingId: { + serializedName: "trackingId", + type: { + name: "String" + } + }, + trackingUrl: { + serializedName: "trackingUrl", + type: { + name: "String" + } + } + } + } +}; + +export const Order: msRest.CompositeMapper = { + serializedName: "Order", + type: { + name: "Composite", + className: "Order", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + contactInformation: { + serializedName: "properties.contactInformation", + type: { + name: "Composite", + className: "ContactDetails" + } + }, + shippingAddress: { + serializedName: "properties.shippingAddress", + type: { + name: "Composite", + className: "Address" + } + }, + changeStatusTo: { + serializedName: "properties.changeStatusTo", + type: { + name: "Composite", + className: "OrderStatus" + } + }, + orderHistory: { + readOnly: true, + serializedName: "properties.orderHistory", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OrderStatus" + } + } + } + }, + serialNumber: { + readOnly: true, + serializedName: "properties.serialNumber", + type: { + name: "String" + } + }, + deliveryTrackingInfo: { + readOnly: true, + serializedName: "properties.deliveryTrackingInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackingInfo" + } + } + } + }, + returnTrackingInfo: { + readOnly: true, + serializedName: "properties.returnTrackingInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TrackingInfo" + } + } + } + } + } + } +}; + +export const PeriodicTimerSourceInfo: msRest.CompositeMapper = { + serializedName: "PeriodicTimerSourceInfo", + type: { + name: "Composite", + className: "PeriodicTimerSourceInfo", + modelProperties: { + startTime: { + required: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + schedule: { + required: true, + serializedName: "schedule", + type: { + name: "String" + } + }, + topic: { + serializedName: "topic", + type: { + name: "String" + } + } + } + } +}; + +export const PeriodicTimerEventTrigger: msRest.CompositeMapper = { + serializedName: "PeriodicTimerEvent", + type: { + name: "Composite", + className: "PeriodicTimerEventTrigger", + modelProperties: { + ...Trigger.type.modelProperties, + sourceInfo: { + serializedName: "properties.sourceInfo", + type: { + name: "Composite", + className: "PeriodicTimerSourceInfo" + } + }, + sinkInfo: { + serializedName: "properties.sinkInfo", + type: { + name: "Composite", + className: "RoleSinkInfo" + } + }, + customContextTag: { + serializedName: "properties.customContextTag", + type: { + name: "String" + } + } + } + } +}; + +export const RefreshDetails: msRest.CompositeMapper = { + serializedName: "RefreshDetails", + type: { + name: "Composite", + className: "RefreshDetails", + modelProperties: { + inProgressRefreshJobId: { + serializedName: "inProgressRefreshJobId", + type: { + name: "String" + } + }, + lastCompletedRefreshJobTimeInUTC: { + serializedName: "lastCompletedRefreshJobTimeInUTC", + type: { + name: "DateTime" + } + }, + errorManifestFile: { + serializedName: "errorManifestFile", + type: { + name: "String" + } + }, + lastJob: { + serializedName: "lastJob", + type: { + name: "String" + } + } + } + } +}; + +export const SecuritySettings: msRest.CompositeMapper = { + serializedName: "SecuritySettings", + type: { + name: "Composite", + className: "SecuritySettings", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + deviceAdminPassword: { + required: true, + serializedName: "properties.deviceAdminPassword", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + } + } + } +}; + +export const UserAccessRight: msRest.CompositeMapper = { + serializedName: "UserAccessRight", + type: { + name: "Composite", + className: "UserAccessRight", + modelProperties: { + userId: { + required: true, + serializedName: "userId", + type: { + name: "String" + } + }, + accessType: { + required: true, + serializedName: "accessType", + type: { + name: "String" + } + } + } + } +}; + +export const Share: msRest.CompositeMapper = { + serializedName: "Share", + type: { + name: "Composite", + className: "Share", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + shareStatus: { + required: true, + serializedName: "properties.shareStatus", + type: { + name: "String" + } + }, + monitoringStatus: { + required: true, + serializedName: "properties.monitoringStatus", + type: { + name: "String" + } + }, + azureContainerInfo: { + serializedName: "properties.azureContainerInfo", + type: { + name: "Composite", + className: "AzureContainerInfo" + } + }, + accessProtocol: { + required: true, + serializedName: "properties.accessProtocol", + type: { + name: "String" + } + }, + userAccessRights: { + serializedName: "properties.userAccessRights", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UserAccessRight" + } + } + } + }, + clientAccessRights: { + serializedName: "properties.clientAccessRights", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClientAccessRight" + } + } + } + }, + refreshDetails: { + serializedName: "properties.refreshDetails", + type: { + name: "Composite", + className: "RefreshDetails" + } + }, + shareMappings: { + readOnly: true, + serializedName: "properties.shareMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MountPointMap" + } + } + } + }, + dataPolicy: { + serializedName: "properties.dataPolicy", + type: { + name: "String" + } + } + } + } +}; + +export const ShareAccessRight: msRest.CompositeMapper = { + serializedName: "ShareAccessRight", + type: { + name: "Composite", + className: "ShareAccessRight", + modelProperties: { + shareId: { + required: true, + serializedName: "shareId", + type: { + name: "String" + } + }, + accessType: { + required: true, + serializedName: "accessType", + type: { + name: "String" + } + } + } + } +}; + +export const StorageAccountCredential: msRest.CompositeMapper = { + serializedName: "StorageAccountCredential", + type: { + name: "Composite", + className: "StorageAccountCredential", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + alias: { + required: true, + serializedName: "properties.alias", + type: { + name: "String" + } + }, + userName: { + serializedName: "properties.userName", + type: { + name: "String" + } + }, + accountKey: { + serializedName: "properties.accountKey", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + }, + connectionString: { + serializedName: "properties.connectionString", + type: { + name: "String" + } + }, + sslStatus: { + required: true, + serializedName: "properties.sslStatus", + type: { + name: "String" + } + }, + blobDomainName: { + serializedName: "properties.blobDomainName", + type: { + name: "String" + } + }, + accountType: { + required: true, + serializedName: "properties.accountType", + type: { + name: "String" + } + } + } + } +}; + +export const UpdateSummary: msRest.CompositeMapper = { + serializedName: "UpdateSummary", + type: { + name: "Composite", + className: "UpdateSummary", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + deviceVersionNumber: { + serializedName: "properties.deviceVersionNumber", + type: { + name: "String" + } + }, + friendlyDeviceVersionName: { + serializedName: "properties.friendlyDeviceVersionName", + type: { + name: "String" + } + }, + deviceLastScannedDateTime: { + serializedName: "properties.deviceLastScannedDateTime", + type: { + name: "DateTime" + } + }, + lastCompletedScanJobDateTime: { + serializedName: "properties.lastCompletedScanJobDateTime", + type: { + name: "DateTime" + } + }, + lastCompletedDownloadJobDateTime: { + readOnly: true, + serializedName: "properties.lastCompletedDownloadJobDateTime", + type: { + name: "DateTime" + } + }, + lastCompletedInstallJobDateTime: { + readOnly: true, + serializedName: "properties.lastCompletedInstallJobDateTime", + type: { + name: "DateTime" + } + }, + totalNumberOfUpdatesAvailable: { + readOnly: true, + serializedName: "properties.totalNumberOfUpdatesAvailable", + type: { + name: "Number" + } + }, + totalNumberOfUpdatesPendingDownload: { + readOnly: true, + serializedName: "properties.totalNumberOfUpdatesPendingDownload", + type: { + name: "Number" + } + }, + totalNumberOfUpdatesPendingInstall: { + readOnly: true, + serializedName: "properties.totalNumberOfUpdatesPendingInstall", + type: { + name: "Number" + } + }, + rebootBehavior: { + readOnly: true, + serializedName: "properties.rebootBehavior", + type: { + name: "String" + } + }, + ongoingUpdateOperation: { + readOnly: true, + serializedName: "properties.ongoingUpdateOperation", + type: { + name: "String" + } + }, + inProgressDownloadJobId: { + readOnly: true, + serializedName: "properties.inProgressDownloadJobId", + type: { + name: "String" + } + }, + inProgressInstallJobId: { + readOnly: true, + serializedName: "properties.inProgressInstallJobId", + type: { + name: "String" + } + }, + inProgressDownloadJobStartedDateTime: { + readOnly: true, + serializedName: "properties.inProgressDownloadJobStartedDateTime", + type: { + name: "DateTime" + } + }, + inProgressInstallJobStartedDateTime: { + readOnly: true, + serializedName: "properties.inProgressInstallJobStartedDateTime", + type: { + name: "DateTime" + } + }, + updateTitles: { + readOnly: true, + serializedName: "properties.updateTitles", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + totalUpdateSizeInBytes: { + readOnly: true, + serializedName: "properties.totalUpdateSizeInBytes", + type: { + name: "Number" + } + } + } + } +}; + +export const UploadCertificateRequest: msRest.CompositeMapper = { + serializedName: "UploadCertificateRequest", + type: { + name: "Composite", + className: "UploadCertificateRequest", + modelProperties: { + authenticationType: { + serializedName: "properties.authenticationType", + type: { + name: "String" + } + }, + certificate: { + required: true, + serializedName: "properties.certificate", + type: { + name: "String" + } + } + } + } +}; + +export const UploadCertificateResponse: msRest.CompositeMapper = { + serializedName: "UploadCertificateResponse", + type: { + name: "Composite", + className: "UploadCertificateResponse", + modelProperties: { + authType: { + serializedName: "authType", + type: { + name: "String" + } + }, + resourceId: { + required: true, + serializedName: "resourceId", + type: { + name: "String" + } + }, + aadAuthority: { + required: true, + serializedName: "aadAuthority", + type: { + name: "String" + } + }, + aadTenantId: { + required: true, + serializedName: "aadTenantId", + type: { + name: "String" + } + }, + servicePrincipalClientId: { + required: true, + serializedName: "servicePrincipalClientId", + type: { + name: "String" + } + }, + servicePrincipalObjectId: { + required: true, + serializedName: "servicePrincipalObjectId", + type: { + name: "String" + } + }, + azureManagementEndpointAudience: { + required: true, + serializedName: "azureManagementEndpointAudience", + type: { + name: "String" + } + } + } + } +}; + +export const User: msRest.CompositeMapper = { + serializedName: "User", + type: { + name: "Composite", + className: "User", + modelProperties: { + ...ARMBaseModel.type.modelProperties, + encryptedPassword: { + serializedName: "properties.encryptedPassword", + type: { + name: "Composite", + className: "AsymmetricEncryptedSecret" + } + }, + shareAccessRights: { + serializedName: "properties.shareAccessRights", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ShareAccessRight" + } + } + } + } + } + } +}; + +export const OperationsList: msRest.CompositeMapper = { + serializedName: "OperationsList", + type: { + name: "Composite", + className: "OperationsList", + modelProperties: { + value: { + required: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const DataBoxEdgeDeviceList: msRest.CompositeMapper = { + serializedName: "DataBoxEdgeDeviceList", + type: { + name: "Composite", + className: "DataBoxEdgeDeviceList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataBoxEdgeDevice" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const AlertList: msRest.CompositeMapper = { + serializedName: "AlertList", + type: { + name: "Composite", + className: "AlertList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Alert" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const BandwidthSchedulesList: msRest.CompositeMapper = { + serializedName: "BandwidthSchedulesList", + type: { + name: "Composite", + className: "BandwidthSchedulesList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BandwidthSchedule" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const OrderList: msRest.CompositeMapper = { + serializedName: "OrderList", + type: { + name: "Composite", + className: "OrderList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Order" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const RoleList: msRest.CompositeMapper = { + serializedName: "RoleList", + type: { + name: "Composite", + className: "RoleList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ShareList: msRest.CompositeMapper = { + serializedName: "ShareList", + type: { + name: "Composite", + className: "ShareList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Share" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const StorageAccountCredentialList: msRest.CompositeMapper = { + serializedName: "StorageAccountCredentialList", + type: { + name: "Composite", + className: "StorageAccountCredentialList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageAccountCredential" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TriggerList: msRest.CompositeMapper = { + serializedName: "TriggerList", + type: { + name: "Composite", + className: "TriggerList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Trigger" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const UserList: msRest.CompositeMapper = { + serializedName: "UserList", + type: { + name: "Composite", + className: "UserList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "User" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const discriminators = { + 'BaseResource.FileEvent' : FileEventTrigger, + 'BaseResource.IOT' : IoTRole, + 'BaseResource.PeriodicTimerEvent' : PeriodicTimerEventTrigger, + 'BaseResource.Role' : Role, + 'BaseResource.Trigger' : Trigger +}; diff --git a/packages/@azure/arm-edgedateway/lib/models/operationsMappers.ts b/packages/@azure/arm-edgedateway/lib/models/operationsMappers.ts new file mode 100644 index 000000000000..8a562506ad8a --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/operationsMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + OperationsList, + Operation, + OperationDisplay, + ServiceSpecification, + MetricSpecificationV1, + MetricDimensionV1, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/operationsStatusMappers.ts b/packages/@azure/arm-edgedateway/lib/models/operationsStatusMappers.ts new file mode 100644 index 000000000000..91686fb7863c --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/operationsStatusMappers.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + Job, + JobErrorDetails, + JobErrorItem, + UpdateDownloadProgress, + UpdateInstallProgress, + CloudError +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/ordersMappers.ts b/packages/@azure/arm-edgedateway/lib/models/ordersMappers.ts new file mode 100644 index 000000000000..da078d1e59a6 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/ordersMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + OrderList, + Order, + ARMBaseModel, + BaseResource, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + CloudError, + Alert, + AlertErrorDetails, + BandwidthSchedule, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Role, + SecuritySettings, + AsymmetricEncryptedSecret, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + StorageAccountCredential, + Trigger, + UpdateSummary, + User, + ShareAccessRight, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/parameters.ts b/packages/@azure/arm-edgedateway/lib/models/parameters.ts new file mode 100644 index 000000000000..59cfc4ade8e7 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/parameters.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const deviceName: msRest.OperationURLParameter = { + parameterPath: "deviceName", + mapper: { + required: true, + serializedName: "deviceName", + type: { + name: "String" + } + } +}; +export const expand: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "expand" + ], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; +export const name: msRest.OperationURLParameter = { + parameterPath: "name", + mapper: { + required: true, + serializedName: "name", + type: { + name: "String" + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; diff --git a/packages/@azure/arm-edgedateway/lib/models/rolesMappers.ts b/packages/@azure/arm-edgedateway/lib/models/rolesMappers.ts new file mode 100644 index 000000000000..99f483dba285 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/rolesMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + RoleList, + Role, + ARMBaseModel, + BaseResource, + CloudError, + Alert, + AlertErrorDetails, + BandwidthSchedule, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + AsymmetricEncryptedSecret, + MountPointMap, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + SecuritySettings, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + StorageAccountCredential, + Trigger, + UpdateSummary, + User, + ShareAccessRight, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/sharesMappers.ts b/packages/@azure/arm-edgedateway/lib/models/sharesMappers.ts new file mode 100644 index 000000000000..0786458259dd --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/sharesMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + ShareList, + Share, + ARMBaseModel, + BaseResource, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + CloudError, + Alert, + AlertErrorDetails, + BandwidthSchedule, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + Role, + SecuritySettings, + AsymmetricEncryptedSecret, + StorageAccountCredential, + Trigger, + UpdateSummary, + User, + ShareAccessRight, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/storageAccountCredentialsMappers.ts b/packages/@azure/arm-edgedateway/lib/models/storageAccountCredentialsMappers.ts new file mode 100644 index 000000000000..7e02b5a544d5 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/storageAccountCredentialsMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + StorageAccountCredentialList, + StorageAccountCredential, + ARMBaseModel, + BaseResource, + AsymmetricEncryptedSecret, + CloudError, + Alert, + AlertErrorDetails, + BandwidthSchedule, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + Role, + SecuritySettings, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + Trigger, + UpdateSummary, + User, + ShareAccessRight, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/triggersMappers.ts b/packages/@azure/arm-edgedateway/lib/models/triggersMappers.ts new file mode 100644 index 000000000000..795430614404 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/triggersMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + TriggerList, + Trigger, + ARMBaseModel, + BaseResource, + CloudError, + Alert, + AlertErrorDetails, + BandwidthSchedule, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo, + Role, + SecuritySettings, + AsymmetricEncryptedSecret, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + StorageAccountCredential, + UpdateSummary, + User, + ShareAccessRight, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/models/usersMappers.ts b/packages/@azure/arm-edgedateway/lib/models/usersMappers.ts new file mode 100644 index 000000000000..d1b6dd122577 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/models/usersMappers.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export { + discriminators, + UserList, + User, + ARMBaseModel, + BaseResource, + AsymmetricEncryptedSecret, + ShareAccessRight, + CloudError, + Alert, + AlertErrorDetails, + BandwidthSchedule, + DataBoxEdgeDevice, + Sku, + DataBoxEdgeDeviceExtendedInfo, + NetworkSettings, + NetworkAdapter, + NetworkAdapterPosition, + Ipv4Config, + Ipv6Config, + Order, + ContactDetails, + Address, + OrderStatus, + TrackingInfo, + Role, + SecuritySettings, + Share, + AzureContainerInfo, + UserAccessRight, + ClientAccessRight, + RefreshDetails, + MountPointMap, + StorageAccountCredential, + Trigger, + UpdateSummary, + FileEventTrigger, + FileSourceInfo, + RoleSinkInfo, + IoTRole, + IoTDeviceInfo, + Authentication, + SymmetricKey, + PeriodicTimerEventTrigger, + PeriodicTimerSourceInfo +} from "../models/mappers"; + diff --git a/packages/@azure/arm-edgedateway/lib/operations/alerts.ts b/packages/@azure/arm-edgedateway/lib/operations/alerts.ts new file mode 100644 index 000000000000..13e1e9a1ab8f --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/alerts.ts @@ -0,0 +1,198 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/alertsMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Alerts. */ +export class Alerts { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Alerts. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * Retrieves all the alerts for a data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * @summary Returns an alert by name. + * @param deviceName Name of the device. + * @param name Name of the alert which needs to be retrieved. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param name Name of the alert which needs to be retrieved. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param name Name of the alert which needs to be retrieved. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Retrieves all the alerts for a data box edge/gateway device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/alerts/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Alert + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AlertList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/bandwidthSchedules.ts b/packages/@azure/arm-edgedateway/lib/operations/bandwidthSchedules.ts new file mode 100644 index 000000000000..cbba0e6126f0 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/bandwidthSchedules.ts @@ -0,0 +1,328 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/bandwidthSchedulesMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a BandwidthSchedules. */ +export class BandwidthSchedules { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a BandwidthSchedules. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * Returns all the bandwidth Schedules for a data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * Returns the properties of the specified bandwidth schedule name. + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name which needs to be added/updated. + * @param parameters The bandwidth schedule to be added or updated. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, name: string, parameters: Models.BandwidthSchedule, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(deviceName,name,parameters,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates a bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name which needs to be added/updated. + * @param parameters The bandwidth schedule to be added or updated. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, name: string, parameters: Models.BandwidthSchedule, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + parameters, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the specified bandwidth schedule. + * @param deviceName The device name. + * @param name The bandwidth schedule name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Returns all the bandwidth Schedules for a data box edge/gateway device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BandwidthSchedulesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BandwidthSchedule + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BandwidthSchedule, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BandwidthSchedule + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/bandwidthSchedules/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BandwidthSchedulesList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/devices.ts b/packages/@azure/arm-edgedateway/lib/operations/devices.ts new file mode 100644 index 000000000000..046397fa8835 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/devices.ts @@ -0,0 +1,1024 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/devicesMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Devices. */ +export class Devices { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Devices. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * Retrieves all data box edge/gateway devices in a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.DevicesListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.DevicesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.DevicesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Retrieves all data box edge/gateway devices in a resource group. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.DevicesListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.DevicesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.DevicesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Returns the properties of the data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a Data Box Edge/Gateway resource. + * @param deviceName The device name. + * @param dataBoxEdgeDevice The resource object. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, dataBoxEdgeDevice: Models.DataBoxEdgeDevice, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(deviceName,dataBoxEdgeDevice,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + update(deviceName: string, resourceGroupName: string, options?: Models.DevicesUpdateOptionalParams): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + update(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + update(deviceName: string, resourceGroupName: string, options: Models.DevicesUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(deviceName: string, resourceGroupName: string, options?: Models.DevicesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * @summary Downloads the updates on the data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + downloadUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDownloadUpdates(deviceName,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates the extended info of the data box edge/gateway device. + * @param deviceName The device name. + * @param parameters The device extended information. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdateExtendedInfo(deviceName: string, parameters: Models.DataBoxEdgeDeviceExtendedInfo, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param parameters The device extended information. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + createOrUpdateExtendedInfo(deviceName: string, parameters: Models.DataBoxEdgeDeviceExtendedInfo, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param parameters The device extended information. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdateExtendedInfo(deviceName: string, parameters: Models.DataBoxEdgeDeviceExtendedInfo, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdateExtendedInfo(deviceName: string, parameters: Models.DataBoxEdgeDeviceExtendedInfo, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + parameters, + resourceGroupName, + options + }, + createOrUpdateExtendedInfoOperationSpec, + callback) as Promise; + } + + /** + * Returns the extended information of the specified data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + getExtendedInformation(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + getExtendedInformation(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + getExtendedInformation(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getExtendedInformation(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + getExtendedInformationOperationSpec, + callback) as Promise; + } + + /** + * @summary Installs the updates on the data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + installUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginInstallUpdates(deviceName,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Returns the network settings of the specified data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + getNetworkSettings(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + getNetworkSettings(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + getNetworkSettings(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getNetworkSettings(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + getNetworkSettingsOperationSpec, + callback) as Promise; + } + + /** + * @summary Scans for updates on a data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + scanForUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginScanForUpdates(deviceName,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Updates the security settings on a data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param deviceAdminPassword Device administrator password as an encrypted string (encrypted using + * RSA PKCS #1) is used to log into the local web UI of the device. Actual password could have at + * least 8 characters that are a combination of uppercase, lowercase, numeric, and special + * characters. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdateSecuritySettings(deviceName: string, resourceGroupName: string, deviceAdminPassword: Models.AsymmetricEncryptedSecret, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdateSecuritySettings(deviceName,resourceGroupName,deviceAdminPassword,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Returns information about the availability of updates as per the last scan done on the + * device. It also returns information about any ongoing download or install jobs on the device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + getUpdateSummary(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + getUpdateSummary(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + getUpdateSummary(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getUpdateSummary(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + getUpdateSummaryOperationSpec, + callback) as Promise; + } + + /** + * Uploads registration certificate for the device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param certificate The base64 encoded certificate raw data. + * @param [options] The optional parameters + * @returns Promise + */ + uploadCertificate(deviceName: string, resourceGroupName: string, certificate: string, options?: Models.DevicesUploadCertificateOptionalParams): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param certificate The base64 encoded certificate raw data. + * @param callback The callback + */ + uploadCertificate(deviceName: string, resourceGroupName: string, certificate: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param certificate The base64 encoded certificate raw data. + * @param options The optional parameters + * @param callback The callback + */ + uploadCertificate(deviceName: string, resourceGroupName: string, certificate: string, options: Models.DevicesUploadCertificateOptionalParams, callback: msRest.ServiceCallback): void; + uploadCertificate(deviceName: string, resourceGroupName: string, certificate: string, options?: Models.DevicesUploadCertificateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + certificate, + options + }, + uploadCertificateOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates a Data Box Edge/Gateway resource. + * @param deviceName The device name. + * @param dataBoxEdgeDevice The resource object. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, dataBoxEdgeDevice: Models.DataBoxEdgeDevice, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + dataBoxEdgeDevice, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary Downloads the updates on the data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDownloadUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + resourceGroupName, + options + }, + beginDownloadUpdatesOperationSpec, + options); + } + + /** + * @summary Installs the updates on the data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginInstallUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + resourceGroupName, + options + }, + beginInstallUpdatesOperationSpec, + options); + } + + /** + * @summary Scans for updates on a data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginScanForUpdates(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + resourceGroupName, + options + }, + beginScanForUpdatesOperationSpec, + options); + } + + /** + * Updates the security settings on a data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param deviceAdminPassword Device administrator password as an encrypted string (encrypted using + * RSA PKCS #1) is used to log into the local web UI of the device. Actual password could have at + * least 8 characters that are a combination of uppercase, lowercase, numeric, and special + * characters. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdateSecuritySettings(deviceName: string, resourceGroupName: string, deviceAdminPassword: Models.AsymmetricEncryptedSecret, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + resourceGroupName, + deviceAdminPassword, + options + }, + beginCreateOrUpdateSecuritySettingsOperationSpec, + options); + } + + /** + * Retrieves all data box edge/gateway devices in a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * Retrieves all data box edge/gateway devices in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDevice + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: { + ...Mappers.DataBoxEdgeDevicePatch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDevice + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateExtendedInfoOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataBoxEdgeDeviceExtendedInfo, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDeviceExtendedInfo + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getExtendedInformationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDeviceExtendedInfo + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getNetworkSettingsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/networkSettings/default", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.NetworkSettings + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getUpdateSummaryOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/updateSummary/default", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UpdateSummary + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const uploadCertificateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/uploadCertificate", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + authenticationType: [ + "options", + "authenticationType" + ], + certificate: "certificate" + }, + mapper: { + ...Mappers.UploadCertificateRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.UploadCertificateResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "dataBoxEdgeDevice", + mapper: { + ...Mappers.DataBoxEdgeDevice, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDevice + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDownloadUpdatesOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginInstallUpdatesOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/installUpdates", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginScanForUpdatesOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/scanForUpdates", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateSecuritySettingsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/securitySettings/default/update", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + deviceAdminPassword: "deviceAdminPassword" + }, + mapper: { + ...Mappers.SecuritySettings, + required: true + } + }, + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataBoxEdgeDeviceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/index.ts b/packages/@azure/arm-edgedateway/lib/operations/index.ts new file mode 100644 index 000000000000..ac8a1fe463b5 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/index.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +export * from "./operations"; +export * from "./devices"; +export * from "./alerts"; +export * from "./bandwidthSchedules"; +export * from "./operationsStatus"; +export * from "./orders"; +export * from "./roles"; +export * from "./shares"; +export * from "./storageAccountCredentials"; +export * from "./triggers"; +export * from "./users"; diff --git a/packages/@azure/arm-edgedateway/lib/operations/operations.ts b/packages/@azure/arm-edgedateway/lib/operations/operations.ts new file mode 100644 index 000000000000..f721286d57e4 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/operations.ts @@ -0,0 +1,123 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Operations. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * @summary Lists all the operations supported. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Lists all the operations supported. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.DataBoxEdge/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationsList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/operationsStatus.ts b/packages/@azure/arm-edgedateway/lib/operations/operationsStatus.ts new file mode 100644 index 000000000000..16911e899f89 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/operationsStatus.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationsStatusMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a OperationsStatus. */ +export class OperationsStatus { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a OperationsStatus. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * @summary Returns the job details of the specified job on a data box edge/gateway device. + * @param deviceName The device name. + * @param name The job name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param name The job name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param name The job name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/operationsStatus/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Job + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/orders.ts b/packages/@azure/arm-edgedateway/lib/operations/orders.ts new file mode 100644 index 000000000000..b2f2a5afd857 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/orders.ts @@ -0,0 +1,315 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/ordersMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Orders. */ +export class Orders { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Orders. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * @summary List all the orders related to the device. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * @summary Get a specific order by name. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Creates or updates an order. + * @param deviceName Name of the edge device for which order needs to be added or updated. + * @param order Order to be added. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, order: Models.Order, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(deviceName,order,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Deletes the order related to the device. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Creates or updates an order. + * @param deviceName Name of the edge device for which order needs to be added or updated. + * @param order Order to be added. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, order: Models.Order, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + order, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Deletes the order related to the device. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List all the orders related to the device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OrderList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Order + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "order", + mapper: { + ...Mappers.Order, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Order + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/orders/default", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OrderList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/roles.ts b/packages/@azure/arm-edgedateway/lib/operations/roles.ts new file mode 100644 index 000000000000..cd66fbb7569c --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/roles.ts @@ -0,0 +1,328 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/rolesMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Roles. */ +export class Roles { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Roles. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * Lists all the roles configured in a data box edge/gateway device. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * Get a specific role by name. + * @param deviceName Name of the device. + * @param name Name of role to be fetched. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param name Name of role to be fetched. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param name Name of role to be fetched. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update a role. + * @param deviceName Name of the device in which the role needs to be added or updated. + * @param name Name of the role to be updated. + * @param role Role to be added. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, name: string, role: Models.RoleUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(deviceName,name,role,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the role on the gateway device. + * @param deviceName Name of the device. + * @param name Name of the role which needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a role. + * @param deviceName Name of the device in which the role needs to be added or updated. + * @param name Name of the role to be updated. + * @param role Role to be added. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, name: string, role: Models.RoleUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + role, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the role on the gateway device. + * @param deviceName Name of the device. + * @param name Name of the role which needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Lists all the roles configured in a data box edge/gateway device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Role + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "role", + mapper: { + ...Mappers.Role, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Role + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.RoleList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/shares.ts b/packages/@azure/arm-edgedateway/lib/operations/shares.ts new file mode 100644 index 000000000000..004d7f73fba2 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/shares.ts @@ -0,0 +1,386 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sharesMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Shares. */ +export class Shares { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Shares. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * @summary Lists all the shares in a data box edge/gateway device. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * @summary Returns a particular share by name. + * @param deviceName Name of the device. + * @param name Name of the share. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param name Name of the share. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param name Name of the share. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Creates a new share or update an existing share on the device. + * @param deviceName Name of the device. + * @param name Name of the share which needs to be added/updated. + * @param share The share object containing the share details. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, name: string, share: Models.Share, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(deviceName,name,share,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the share on the data box edge/gateway device. + * @param deviceName Name of the device. + * @param name Name of the share which needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Triggers a manual refresh of the share metadata with the actual cloud storage account. + * @param deviceName Name of the device. + * @param name Name of the share. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + refresh(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRefresh(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Creates a new share or update an existing share on the device. + * @param deviceName Name of the device. + * @param name Name of the share which needs to be added/updated. + * @param share The share object containing the share details. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, name: string, share: Models.Share, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + share, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the share on the data box edge/gateway device. + * @param deviceName Name of the device. + * @param name Name of the share which needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary Triggers a manual refresh of the share metadata with the actual cloud storage account. + * @param deviceName Name of the device. + * @param name Name of the share. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginRefresh(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginRefreshOperationSpec, + options); + } + + /** + * @summary Lists all the shares in a data box edge/gateway device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ShareList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Share + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "share", + mapper: { + ...Mappers.Share, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Share + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginRefreshOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/shares/{name}/refresh", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ShareList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/storageAccountCredentials.ts b/packages/@azure/arm-edgedateway/lib/operations/storageAccountCredentials.ts new file mode 100644 index 000000000000..606eb2701357 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/storageAccountCredentials.ts @@ -0,0 +1,328 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/storageAccountCredentialsMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a StorageAccountCredentials. */ +export class StorageAccountCredentials { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a StorageAccountCredentials. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * @summary Gets all the storage account credentials in a data box edge/gateway device. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * Gets the properties of the specified storage account credential. + * @param deviceName Name of the device. + * @param name Name of the storage account credential to be fetched. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param name Name of the storage account credential to be fetched. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param name Name of the storage account credential to be fetched. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the storage account credential. + * @param deviceName Name of the device. + * @param name The storage account credential name. + * @param storageAccountCredential The storage account credential to be added or updated. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, name: string, storageAccountCredential: Models.StorageAccountCredential, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(deviceName,name,storageAccountCredential,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the storage account credential. + * @param deviceName Name of the device. + * @param name Name of the storage account credential. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Creates or updates the storage account credential. + * @param deviceName Name of the device. + * @param name The storage account credential name. + * @param storageAccountCredential The storage account credential to be added or updated. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, name: string, storageAccountCredential: Models.StorageAccountCredential, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + storageAccountCredential, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the storage account credential. + * @param deviceName Name of the device. + * @param name Name of the storage account credential. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary Gets all the storage account credentials in a data box edge/gateway device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageAccountCredentialList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageAccountCredential + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "storageAccountCredential", + mapper: { + ...Mappers.StorageAccountCredential, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.StorageAccountCredential + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccountCredentials/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageAccountCredentialList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/triggers.ts b/packages/@azure/arm-edgedateway/lib/operations/triggers.ts new file mode 100644 index 000000000000..7e1b5010fbf0 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/triggers.ts @@ -0,0 +1,328 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/triggersMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Triggers. */ +export class Triggers { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Triggers. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * List all the triggers configured in the device. + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * Get a specific trigger by name. + * @param deviceName Name of the device. + * @param name Name of trigger to be fetched. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName Name of the device. + * @param name Name of trigger to be fetched. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName Name of the device. + * @param name Name of trigger to be fetched. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create or update a trigger. + * @param deviceName Name of the edge device in which trigger needs to be added or updated. + * @param name Name of trigger to be added or updated. + * @param trigger Trigger to be added. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, name: string, trigger: Models.TriggerUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(deviceName,name,trigger,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the trigger on the gateway device. + * @param deviceName Name of the device. + * @param name Name of the trigger which needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create or update a trigger. + * @param deviceName Name of the edge device in which trigger needs to be added or updated. + * @param name Name of trigger to be added or updated. + * @param trigger Trigger to be added. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, name: string, trigger: Models.TriggerUnion, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + trigger, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the trigger on the gateway device. + * @param deviceName Name of the device. + * @param name Name of the trigger which needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * List all the triggers configured in the device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TriggerList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Trigger + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "trigger", + mapper: { + ...Mappers.Trigger, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Trigger + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.TriggerList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/lib/operations/users.ts b/packages/@azure/arm-edgedateway/lib/operations/users.ts new file mode 100644 index 000000000000..e835889cc737 --- /dev/null +++ b/packages/@azure/arm-edgedateway/lib/operations/users.ts @@ -0,0 +1,334 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/usersMappers"; +import * as Parameters from "../models/parameters"; +import { DataBoxEdgeManagementClientContext } from "../dataBoxEdgeManagementClientContext"; + +/** Class representing a Users. */ +export class Users { + private readonly client: DataBoxEdgeManagementClientContext; + + /** + * Create a Users. + * @param {DataBoxEdgeManagementClientContext} client Reference to the service client. + */ + constructor(client: DataBoxEdgeManagementClientContext) { + this.client = client; + } + + /** + * Returns all the users registered in a data box edge/gateway device. + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDevice(deviceName: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + resourceGroupName, + options + }, + listByDataBoxEdgeDeviceOperationSpec, + callback) as Promise; + } + + /** + * Returns the properties of the specified user. + * @param deviceName The device name. + * @param name The name of the user who needs to be retrieved. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param deviceName The device name. + * @param name The name of the user who needs to be retrieved. + * @param resourceGroupName The resource group name. + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param deviceName The device name. + * @param name The name of the user who needs to be retrieved. + * @param resourceGroupName The resource group name. + * @param options The optional parameters + * @param callback The callback + */ + get(deviceName: string, name: string, resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + deviceName, + name, + resourceGroupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create a new user or update an existing user's information on a data box edge/gateway device. + * @param deviceName The device name. + * @param name The name of the user who needs to be added/updated. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(deviceName: string, name: string, resourceGroupName: string, options?: Models.UsersCreateOrUpdateOptionalParams): Promise { + return this.beginCreateOrUpdate(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the user on a databox edge/gateway device. + * @param deviceName The device name. + * @param name The name of the user who needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(deviceName,name,resourceGroupName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Create a new user or update an existing user's information on a data box edge/gateway device. + * @param deviceName The device name. + * @param name The name of the user who needs to be added/updated. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(deviceName: string, name: string, resourceGroupName: string, options?: Models.UsersBeginCreateOrUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes the user on a databox edge/gateway device. + * @param deviceName The device name. + * @param name The name of the user who needs to be deleted. + * @param resourceGroupName The resource group name. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(deviceName: string, name: string, resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + deviceName, + name, + resourceGroupName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Returns all the users registered in a data box edge/gateway device. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByDataBoxEdgeDeviceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByDataBoxEdgeDeviceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByDataBoxEdgeDeviceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByDataBoxEdgeDeviceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users", + urlParameters: [ + Parameters.deviceName, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UserList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.User + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + encryptedPassword: [ + "options", + "encryptedPassword" + ], + shareAccessRights: [ + "options", + "shareAccessRights" + ] + }, + mapper: { + ...Mappers.User, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.User + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/users/{name}", + urlParameters: [ + Parameters.deviceName, + Parameters.name, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByDataBoxEdgeDeviceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UserList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/packages/@azure/arm-edgedateway/package.json b/packages/@azure/arm-edgedateway/package.json new file mode 100644 index 000000000000..29bca50af5cd --- /dev/null +++ b/packages/@azure/arm-edgedateway/package.json @@ -0,0 +1,56 @@ +{ + "name": "@azure/arm-edgedateway", + "author": "Microsoft Corporation", + "description": "DataBoxEdgeManagementClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", + "tslib": "^1.9.3" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-edgedateway.js", + "module": "./esm/dataBoxEdgeManagementClient.js", + "types": "./esm/dataBoxEdgeManagementClient.d.ts", + "devDependencies": { + "typescript": "^3.1.1", + "rollup": "^0.66.2", + "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.4.9" + }, + "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-edgedateway", + "repository": { + "type": "git", + "url": "https://github.com/azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "lib/**/*.ts", + "rollup.config.js", + "tsconfig.json" + ], + "scripts": { + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-edgedateway.js.map'\" -o ./dist/arm-edgedateway.min.js ./dist/arm-edgedateway.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false +} diff --git a/packages/@azure/arm-edgedateway/rollup.config.js b/packages/@azure/arm-edgedateway/rollup.config.js new file mode 100644 index 000000000000..398dbcfea44b --- /dev/null +++ b/packages/@azure/arm-edgedateway/rollup.config.js @@ -0,0 +1,37 @@ +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/dataBoxEdgeManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-edgedateway.js", + format: "umd", + name: "Azure.ArmEdgedateway", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */` + }, + plugins: [ + nodeResolve({ module: true }), + sourcemaps() + ] +}; + +export default config; diff --git a/packages/@azure/arm-edgedateway/tsconfig.json b/packages/@azure/arm-edgedateway/tsconfig.json new file mode 100644 index 000000000000..51ea90961ce5 --- /dev/null +++ b/packages/@azure/arm-edgedateway/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./lib/**/*.ts"], + "exclude": ["node_modules"] +}