From 17c1343f378cd6beacb8313a439abd594691621d Mon Sep 17 00:00:00 2001 From: Ruoxuan Wang <52271048+ruowan@users.noreply.github.com> Date: Tue, 8 Oct 2019 16:39:21 +0800 Subject: [PATCH] release vmwarecloudsimple (#5451) --- packages.md | 1 + .../arm-vmwarecloudsimple/LICENSE.txt | 21 + .../arm-vmwarecloudsimple/README.md | 99 + .../arm-vmwarecloudsimple/package.json | 58 + .../arm-vmwarecloudsimple/rollup.config.js | 37 + .../src/models/dedicatedCloudNodesMappers.ts | 26 + .../models/dedicatedCloudServicesMappers.ts | 25 + .../arm-vmwarecloudsimple/src/models/index.ts | 2340 +++++++++++++++++ .../src/models/mappers.ts | 2096 +++++++++++++++ .../src/models/operationsMappers.ts | 20 + .../src/models/parameters.ts | 258 ++ .../src/models/privateCloudsMappers.ts | 20 + .../src/models/resourcePoolsMappers.ts | 14 + .../src/models/skusAvailabilityMappers.ts | 14 + .../src/models/usagesMappers.ts | 15 + .../models/virtualMachineTemplatesMappers.ts | 18 + .../src/models/virtualMachinesMappers.ts | 29 + .../src/models/virtualNetworksMappers.ts | 14 + .../src/operations/dedicatedCloudNodes.ts | 493 ++++ .../src/operations/dedicatedCloudServices.ts | 492 ++++ .../src/operations/index.ts | 20 + .../src/operations/operations.ts | 191 ++ .../src/operations/privateClouds.ts | 191 ++ .../src/operations/resourcePools.ts | 201 ++ .../src/operations/skusAvailability.ts | 134 + .../src/operations/usages.ts | 134 + .../src/operations/virtualMachineTemplates.ts | 206 ++ .../src/operations/virtualMachines.ts | 631 +++++ .../src/operations/virtualNetworks.ts | 209 ++ .../src/vMwareCloudSimpleClient.ts | 61 + .../src/vMwareCloudSimpleClientContext.ts | 68 + .../arm-vmwarecloudsimple/tsconfig.json | 19 + 32 files changed, 8155 insertions(+) create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/LICENSE.txt create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/rollup.config.js create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/operationsMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/resourcePoolsMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/skusAvailabilityMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/usagesMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualNetworksMappers.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudNodes.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudServices.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/operations.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/privateClouds.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/resourcePools.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/skusAvailability.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/usages.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachineTemplates.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachines.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualNetworks.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts create mode 100644 sdk/vmwarecloudsimple/arm-vmwarecloudsimple/tsconfig.json diff --git a/packages.md b/packages.md index f2f6876148e6..34e1a31f67c8 100644 --- a/packages.md +++ b/packages.md @@ -125,6 +125,7 @@ | [`@azure/arm-webservices`]( sdk/machinelearning/arm-webservices/package.json )| [Readme](sdk/machinelearning/arm-webservices/README.md) | N/A | N/A | | [`@azure/arm-workspaces`]( sdk/machinelearning/arm-workspaces/package.json )| [Readme](sdk/machinelearning/arm-workspaces/README.md) | N/A | N/A | | [`@azure/arm-peering`]( sdk/peering/arm-peering/package.json )| [Readme](sdk/peering/arm-peering/README.md) | N/A | N/A | +| [`@azure/arm-vmwarecloudsimple`]( sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json )| [Readme](sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md) | N/A | N/A | | [`@azure/batch`]( sdk/batch/batch/package.json )| [Readme](sdk/batch/batch/README.md) | N/A | N/A | | [`@azure/cognitiveservices-anomalydetector`]( sdk/cognitiveservices/cognitiveservices-anomalydetector/package.json )| [Readme](sdk/cognitiveservices/cognitiveservices-anomalydetector/README.md) | N/A | N/A | | [`@azure/cognitiveservices-autosuggest`]( sdk/cognitiveservices/cognitiveservices-autosuggest/package.json )| [Readme](sdk/cognitiveservices/cognitiveservices-autosuggest/README.md) | N/A | N/A | diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/LICENSE.txt b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/LICENSE.txt new file mode 100644 index 000000000000..b73b4a1293c3 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/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/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md new file mode 100644 index 000000000000..fd0d28e02ce3 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.md @@ -0,0 +1,99 @@ +## Azure VMwareCloudSimpleClient SDK for JavaScript + +This package contains an isomorphic SDK for VMwareCloudSimpleClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-vmwarecloudsimple +``` + +### How to use + +#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + +##### 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 { VMwareCloudSimpleClient, VMwareCloudSimpleModels, VMwareCloudSimpleMappers } from "@azure/arm-vmwarecloudsimple"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new VMwareCloudSimpleClient(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-vmwarecloudsimple sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/README.png) diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json new file mode 100644 index 000000000000..955a8b85cce9 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/package.json @@ -0,0 +1,58 @@ +{ + "name": "@azure/arm-vmwarecloudsimple", + "author": "Microsoft Corporation", + "description": "VMwareCloudSimpleClient Library with typescript type definitions for node.js and browser.", + "version": "1.0.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "./dist/arm-vmwarecloudsimple.js", + "module": "./esm/vMwareCloudSimpleClient.js", + "types": "./esm/vMwareCloudSimpleClient.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/vmwarecloudsimple/arm-vmwarecloudsimple", + "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", + "src/**/*.ts", + "README.md", + "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-vmwarecloudsimple.js.map'\" -o ./dist/arm-vmwarecloudsimple.min.js ./dist/arm-vmwarecloudsimple.js", + "prepack": "npm install && npm run build" + }, + "sideEffects": false, + "autoPublish": true +} diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/rollup.config.js b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/rollup.config.js new file mode 100644 index 000000000000..99e7f4d17e13 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/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/vMwareCloudSimpleClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/arm-vmwarecloudsimple.js", + format: "umd", + name: "Azure.ArmVmwarecloudsimple", + 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({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; + +export default config; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts new file mode 100644 index 000000000000..8b005aeb58c3 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts @@ -0,0 +1,26 @@ +/* + * 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 { + BaseResource, + CSRPError, + CSRPErrorBody, + DedicatedCloudNode, + DedicatedCloudNodeListResponse, + DedicatedCloudNodesCreateOrUpdateHeaders, + DedicatedCloudNodesDeleteHeaders, + DedicatedCloudService, + PatchPayload, + ResourcePool, + Sku, + VirtualDisk, + VirtualDiskController, + VirtualMachine, + VirtualNetwork, + VirtualNic +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts new file mode 100644 index 000000000000..6d74b8b49d43 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts @@ -0,0 +1,25 @@ +/* + * 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 { + BaseResource, + CSRPError, + CSRPErrorBody, + DedicatedCloudNode, + DedicatedCloudService, + DedicatedCloudServiceListResponse, + DedicatedCloudServicesDeleteHeaders, + PatchPayload, + ResourcePool, + Sku, + VirtualDisk, + VirtualDiskController, + VirtualMachine, + VirtualNetwork, + VirtualNic +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts new file mode 100644 index 000000000000..04eef82dbff0 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts @@ -0,0 +1,2340 @@ +/* + * 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 }; + +/** + * Resource provider available operation display model + */ +export interface AvailableOperationDisplay { + /** + * Description of the operation for display purposes + */ + description?: string; + /** + * Name of the operation for display purposes + */ + operation?: string; + /** + * Name of the provider for display purposes + */ + provider?: string; + /** + * Name of the resource type for display purposes + */ + resource?: string; +} + +/** + * Available operation display property service specification metrics item + */ +export interface AvailableOperationDisplayPropertyServiceSpecificationMetricsItem { + /** + * Metric's aggregation type for e.g. (Average, Total). Possible values include: 'Average', + * 'Total' + */ + aggregationType: AggregationType; + /** + * Metric's description + */ + displayDescription: string; + /** + * Human readable metric's name + */ + displayName: string; + /** + * Metric's name/id + */ + name: string; + /** + * Metric's unit + */ + unit: string; +} + +/** + * List of available operation display property service specification metrics + */ +export interface AvailableOperationDisplayPropertyServiceSpecificationMetricsList { + /** + * Metric specifications of operation + */ + metricSpecifications?: AvailableOperationDisplayPropertyServiceSpecificationMetricsItem[]; +} + +/** + * Resource provider available operation model + */ +export interface AvailableOperation { + /** + * The list of operations + */ + display?: AvailableOperationDisplay; + /** + * Indicating whether the operation is a data action or not. Default value: false. + */ + isDataAction?: boolean; + /** + * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action} + */ + name?: string; + /** + * The origin of operation. Possible values include: 'user', 'system', 'user,system' + */ + origin?: OperationOrigin; + /** + * The list of specification's service metrics + */ + serviceSpecification?: AvailableOperationDisplayPropertyServiceSpecificationMetricsList; +} + +/** + * Error properties + */ +export interface CSRPErrorBody { + /** + * Error's code + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * Error's details + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: CSRPErrorBody[]; + /** + * Error's message + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * Error's target + */ + target?: string; +} + +/** + * General error model + */ +export interface CSRPError { + /** + * Error's body + */ + error?: CSRPErrorBody; +} + +/** + * The purchase SKU for CloudSimple paid resources + */ +export interface Sku { + /** + * The capacity of the SKU + */ + capacity?: string; + /** + * dedicatedCloudNode example: 8 x Ten-Core Intel® Xeon® Processor E5-2640 v4 2.40GHz 25MB Cache + * (90W); 12 x 64GB PC4-19200 2400MHz DDR4 ECC Registered DIMM, ... + */ + description?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here + */ + family?: string; + /** + * The name of the SKU for VMWare CloudSimple Node + */ + name: string; + /** + * The tier of the SKU + */ + tier?: string; +} + +/** + * Dedicated cloud node model + */ +export interface DedicatedCloudNode extends BaseResource { + /** + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudNodes/{dedicatedCloudNodeName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Azure region + */ + location: string; + /** + * {dedicatedCloudNodeName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Availability Zone id, e.g. "az1" + */ + availabilityZoneId: string; + /** + * Availability Zone name, e.g. "Availability Zone 1" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly availabilityZoneName?: string; + /** + * VMWare Cloud Rack Name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly cloudRackName?: string; + /** + * date time the resource was created + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly created?: any; + /** + * count of nodes to create + */ + nodesCount: number; + /** + * Placement Group id, e.g. "n1" + */ + placementGroupId: string; + /** + * Placement Name, e.g. "Placement Group 1" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly placementGroupName?: string; + /** + * Private Cloud Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateCloudId?: string; + /** + * Resource Pool Name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateCloudName?: string; + /** + * The provisioning status of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * purchase id + */ + purchaseId: string; + /** + * SKU's id + */ + id1: string; + /** + * SKU's name + */ + name1: string; + /** + * Node status, indicates is private cloud set up on this node or not. Possible values include: + * 'unused', 'used' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: NodeStatus; + /** + * VMWare Cluster Name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vmwareClusterName?: string; + /** + * Dedicated Cloud Nodes SKU + */ + sku?: Sku; + /** + * Dedicated Cloud Nodes tags + */ + tags?: { [propertyName: string]: string }; + /** + * {resourceProviderNamespace}/{resourceType} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Dedicated cloud service model + */ +export interface DedicatedCloudService extends BaseResource { + /** + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/dedicatedCloudServices/{dedicatedCloudServiceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Azure region + */ + location: string; + /** + * {dedicatedCloudServiceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * gateway Subnet for the account. It will collect the subnet address and always treat it as /28 + */ + gatewaySubnet: string; + /** + * indicates whether account onboarded or not in a given region. Possible values include: + * 'notOnBoarded', 'onBoarded', 'onBoardingFailed', 'onBoarding' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isAccountOnboarded?: OnboardingStatus; + /** + * total nodes purchased + */ + nodes?: number; + /** + * link to a service management web portal + */ + serviceURL?: string; + /** + * The list of tags + */ + tags?: { [propertyName: string]: string }; + /** + * {resourceProviderNamespace}/{resourceType} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Operation error model + */ +export interface OperationError { + /** + * Error's code + */ + code?: string; + /** + * Error's message + */ + message?: string; +} + +/** + * Operation status response + */ +export interface OperationResource { + /** + * End time of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly endTime?: Date; + /** + * Error Message if operation failed + */ + error?: OperationError; + /** + * Operation Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Operation ID + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Start time of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly startTime?: Date; + /** + * Operation status + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; +} + +/** + * General patch payload modal + */ +export interface PatchPayload { + /** + * The tags key:value pairs + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Resource pool model + */ +export interface ResourcePool { + /** + * resource pool id (privateCloudId:vsphereId) + */ + id: string; + /** + * Azure region + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * {ResourcePoolName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The Private Cloud Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateCloudId?: string; + /** + * Hierarchical resource pool name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly fullName?: string; + /** + * {resourceProviderNamespace}/{resourceType} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Virtual disk controller model + */ +export interface VirtualDiskController { + /** + * Controller's id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The display name of Controller + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * dik controller subtype (VMWARE_PARAVIRTUAL, BUS_PARALLEL, LSI_PARALLEL, LSI_SAS) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly subType?: string; + /** + * disk controller type (SCSI) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Virtual disk model + */ +export interface VirtualDisk { + /** + * Disk's Controller id + */ + controllerId: string; + /** + * Disk's independence mode type. Possible values include: 'persistent', + * 'independent_persistent', 'independent_nonpersistent' + */ + independenceMode: DiskIndependenceMode; + /** + * Disk's total size + */ + totalSize: number; + /** + * Disk's id + */ + virtualDiskId?: string; + /** + * Disk's display name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly virtualDiskName?: string; +} + +/** + * Virtual network model + */ +export interface VirtualNetwork { + /** + * can be used in vm creation/deletion + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly assignable?: boolean; + /** + * virtual network id (privateCloudId:vsphereId) + */ + id: string; + /** + * Azure region + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * {VirtualNetworkName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The Private Cloud id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateCloudId?: string; + /** + * {resourceProviderNamespace}/{resourceType} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Virtual NIC model + */ +export interface VirtualNic { + /** + * NIC ip address + */ + ipAddresses?: string[]; + /** + * NIC MAC address + */ + macAddress?: string; + /** + * Virtual Network + */ + network: VirtualNetwork; + /** + * NIC type. Possible values include: 'E1000', 'E1000E', 'PCNET32', 'VMXNET', 'VMXNET2', + * 'VMXNET3' + */ + nicType: NICType; + /** + * Is NIC powered on/off on boot + */ + powerOnBoot?: boolean; + /** + * NIC id + */ + virtualNicId?: string; + /** + * NIC name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly virtualNicName?: string; +} + +/** + * Virtual machine template model + */ +export interface VirtualMachineTemplate { + /** + * virtual machine template id (privateCloudId:vsphereId) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Azure region + */ + location?: string; + /** + * {virtualMachineTemplateName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The amount of memory + */ + amountOfRam?: number; + /** + * The list of Virtual Disk Controllers + */ + controllers?: VirtualDiskController[]; + /** + * The description of Virtual Machine Template + */ + description?: string; + /** + * The list of Virtual Disks + */ + disks?: VirtualDisk[]; + /** + * Expose Guest OS or not + */ + exposeToGuestVM?: boolean; + /** + * The Guest OS + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly guestOS?: string; + /** + * The Guest OS types + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly guestOSType?: string; + /** + * The list of Virtual NICs + */ + nics?: VirtualNic[]; + /** + * The number of CPU cores + */ + numberOfCores?: number; + /** + * path to folder + */ + path?: string; + /** + * The Private Cloud Id + */ + privateCloudId: string; + /** + * The list of VSphere networks + */ + vSphereNetworks?: string[]; + /** + * The tags from VSphere + */ + vSphereTags?: string[]; + /** + * The VMware tools version + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vmwaretools?: string; + /** + * {resourceProviderNamespace}/{resourceType} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * Private cloud model + */ +export interface PrivateCloud { + /** + * Azure Id, e.g. + * "/subscriptions/4da99247-a172-4ed6-8ae9-ebed2d12f839/providers/Microsoft.VMwareCloudSimple/privateClouds/cloud123" + */ + id?: string; + /** + * Location where private cloud created, e.g "westus" + */ + location?: string; + /** + * Private cloud name + */ + name?: string; + /** + * Availability Zone id, e.g. "az1" + */ + availabilityZoneId?: string; + /** + * Availability Zone name, e.g. "Availability Zone 1" + */ + availabilityZoneName?: string; + /** + * Number of clusters + */ + clustersNumber?: number; + /** + * User's emails who created cloud + */ + createdBy?: string; + /** + * When private cloud was created + */ + createdOn?: Date; + /** + * Array of DNS servers + */ + dnsServers?: string[]; + /** + * Expiration date of PC + */ + expires?: string; + /** + * Nsx Type, e.g. "Advanced" + */ + nsxType?: string; + /** + * Placement Group id, e.g. "n1" + */ + placementGroupId?: string; + /** + * Placement Group name + */ + placementGroupName?: string; + /** + * Id of a private cloud + */ + privateCloudId?: string; + /** + * The list of Resource Pools + */ + resourcePools?: ResourcePool[]; + /** + * Private Cloud state, e.g. "operational" + */ + state?: string; + /** + * Number of cores + */ + totalCpuCores?: number; + /** + * Number of nodes + */ + totalNodes?: number; + /** + * Memory size + */ + totalRam?: number; + /** + * Disk space in TB + */ + totalStorage?: number; + /** + * Virtualization type e.g. "vSphere" + */ + privateCloudPropertiesType?: string; + /** + * e.g. "6.5u2" + */ + vSphereVersion?: string; + /** + * FQDN for vcenter access + */ + vcenterFqdn?: string; + /** + * Vcenter ip address + */ + vcenterRefid?: string; + /** + * The list of Virtual Machine Templates + */ + virtualMachineTemplates?: VirtualMachineTemplate[]; + /** + * The list of Virtual Networks + */ + virtualNetworks?: VirtualNetwork[]; + /** + * Is Vrops enabled/disabled + */ + vrOpsEnabled?: boolean; + /** + * Azure Resource type. Possible values include: 'Microsoft.VMwareCloudSimple/privateClouds' + */ + type?: PrivateCloudResourceType; +} + +/** + * SKU availability model + */ +export interface SkuAvailability { + /** + * CloudSimple Availability Zone id + */ + dedicatedAvailabilityZoneId?: string; + /** + * CloudSimple Availability Zone Name + */ + dedicatedAvailabilityZoneName?: string; + /** + * CloudSimple Placement Group Id + */ + dedicatedPlacementGroupId?: string; + /** + * CloudSimple Placement Group name + */ + dedicatedPlacementGroupName?: string; + /** + * indicates how many resources of a given SKU is available in a AZ->PG + */ + limit: number; + /** + * resource type e.g. DedicatedCloudNodes + */ + resourceType?: string; + /** + * sku id + */ + skuId?: string; + /** + * sku name + */ + skuName?: string; +} + +/** + * User name model + */ +export interface UsageName { + /** + * e.g. "Virtual Machines" + */ + localizedValue?: string; + /** + * resource type or resource type sku name, e.g. virtualMachines + */ + value?: string; +} + +/** + * Usage model + */ +export interface Usage { + /** + * The current usage value. Default value: 0. + */ + currentValue: number; + /** + * limit of a given sku in a region for a subscription. The maximum permitted value for the usage + * quota. If there is no limit, this value will be -1. Default value: 0. + */ + limit: number; + /** + * Usage name value and localized name + */ + name?: UsageName; + /** + * The usages' unit. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + * 'CountPerSecond', 'BytesPerSecond' + */ + unit?: UsageCount; +} + +/** + * Virtual machine model + */ +export interface VirtualMachine extends BaseResource { + /** + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/virtualMachines/{virtualMachineName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Azure region + */ + location: string; + /** + * {virtualMachineName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The amount of memory + */ + amountOfRam: number; + /** + * The list of Virtual Disks' Controllers + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly controllers?: VirtualDiskController[]; + /** + * The list of Virtual Disks + */ + disks?: VirtualDisk[]; + /** + * The DNS name of Virtual Machine in VCenter + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dnsname?: string; + /** + * Expose Guest OS or not + */ + exposeToGuestVM?: boolean; + /** + * The path to virtual machine folder in VCenter + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly folder?: string; + /** + * The name of Guest OS + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly guestOS?: string; + /** + * The Guest OS type. Possible values include: 'linux', 'windows', 'other' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly guestOSType?: GuestOSType; + /** + * The list of Virtual NICs + */ + nics?: VirtualNic[]; + /** + * The number of CPU cores + */ + numberOfCores: number; + /** + * Password for login + */ + password?: string; + /** + * Private Cloud Id + */ + privateCloudId: string; + /** + * The provisioning status of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; + /** + * The public ip of Virtual Machine + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publicIP?: string; + /** + * Virtual Machines Resource Pool + */ + resourcePool?: ResourcePool; + /** + * The status of Virtual machine. Possible values include: 'running', 'suspended', 'poweredoff', + * 'updating', 'deallocating', 'deleting' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: VirtualMachineStatus; + /** + * Virtual Machine Template Id + */ + templateId?: string; + /** + * Username for login + */ + username?: string; + /** + * The list of Virtual VSphere Networks + */ + vSphereNetworks?: string[]; + /** + * The internal id of Virtual Machine in VCenter + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vmId?: string; + /** + * VMware tools version + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly vmwaretools?: string; + /** + * The list of tags + */ + tags?: { [propertyName: string]: string }; + /** + * {resourceProviderNamespace}/{resourceType} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * List of virtual machine stop modes + */ +export interface VirtualMachineStopMode { + /** + * mode indicates a type of stop operation - reboot, suspend, shutdown or power-off. Possible + * values include: 'reboot', 'suspend', 'shutdown', 'poweroff' + */ + mode?: StopMode; +} + +/** + * Optional Parameters. + */ +export interface DedicatedCloudNodesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation + */ + filter?: string; + /** + * The maximum number of record sets to return + */ + top?: number; + /** + * to be used by nextLink implementation + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface DedicatedCloudNodesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation + */ + filter?: string; + /** + * The maximum number of record sets to return + */ + top?: number; + /** + * to be used by nextLink implementation + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface DedicatedCloudNodesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The tags key:value pairs + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface DedicatedCloudServicesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation + */ + filter?: string; + /** + * The maximum number of record sets to return + */ + top?: number; + /** + * to be used by nextLink implementation + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface DedicatedCloudServicesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation + */ + filter?: string; + /** + * The maximum number of record sets to return + */ + top?: number; + /** + * to be used by nextLink implementation + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface DedicatedCloudServicesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The tags key:value pairs + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface SkusAvailabilityListOptionalParams extends msRest.RequestOptionsBase { + /** + * sku id, if no sku is passed availability for all skus will be returned + */ + skuId?: string; +} + +/** + * Optional Parameters. + */ +export interface UsagesListOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation. only name.value is allowed here as a filter e.g. + * $filter=name.value eq 'xxxx' + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachinesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation + */ + filter?: string; + /** + * The maximum number of record sets to return + */ + top?: number; + /** + * to be used by nextLink implementation + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachinesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation + */ + filter?: string; + /** + * The maximum number of record sets to return + */ + top?: number; + /** + * to be used by nextLink implementation + */ + skipToken?: string; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachinesUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The tags key:value pairs + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachinesStopOptionalParams extends msRest.RequestOptionsBase { + /** + * query stop mode parameter (reboot, shutdown, etc...). Possible values include: 'reboot', + * 'suspend', 'shutdown', 'poweroff' + */ + mode?: StopMode; + /** + * mode indicates a type of stop operation - reboot, suspend, shutdown or power-off. Possible + * values include: 'reboot', 'suspend', 'shutdown', 'poweroff' + */ + mode1?: StopMode; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachinesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The tags key:value pairs + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Optional Parameters. + */ +export interface VirtualMachinesBeginStopOptionalParams extends msRest.RequestOptionsBase { + /** + * query stop mode parameter (reboot, shutdown, etc...). Possible values include: 'reboot', + * 'suspend', 'shutdown', 'poweroff' + */ + mode?: StopMode; + /** + * mode indicates a type of stop operation - reboot, suspend, shutdown or power-off. Possible + * values include: 'reboot', 'suspend', 'shutdown', 'poweroff' + */ + mode1?: StopMode; +} + +/** + * An interface representing VMwareCloudSimpleClientOptions. + */ +export interface VMwareCloudSimpleClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Get operation. + */ +export interface OperationsGetHeaders { + location: string; + retryAfter: number; + contentType: string; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface DedicatedCloudNodesCreateOrUpdateHeaders { + azureAsyncOperation: string; + locationHeader: string; + retryAfter: number; +} + +/** + * Defines headers for Delete operation. + */ +export interface DedicatedCloudNodesDeleteHeaders { + contentType: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface DedicatedCloudServicesDeleteHeaders { + contentType: string; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface VirtualMachinesCreateOrUpdateHeaders { + azureAsyncOperation: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface VirtualMachinesDeleteHeaders { + azureAsyncOperation: string; + location: string; + retryAfter: number; + contentType: string; +} + +/** + * Defines headers for Start operation. + */ +export interface VirtualMachinesStartHeaders { + azureAsyncOperation: string; + location: string; + retryAfter: number; + contentType: string; +} + +/** + * Defines headers for Stop operation. + */ +export interface VirtualMachinesStopHeaders { + azureAsyncOperation: string; + location: string; + retryAfter: number; + contentType: string; +} + +/** + * @interface + * List of available operations + * @extends Array + */ +export interface AvailableOperationsListResponse extends Array { + /** + * Link for next list of available operations + */ + nextLink?: string; +} + +/** + * @interface + * List of dedicated nodes response model + * @extends Array + */ +export interface DedicatedCloudNodeListResponse extends Array { + /** + * Link for next list of DedicatedCloudNode + */ + nextLink?: string; +} + +/** + * @interface + * List of dedicated cloud services + * @extends Array + */ +export interface DedicatedCloudServiceListResponse extends Array { + /** + * Link for next list of DedicatedCloudNode + */ + nextLink?: string; +} + +/** + * @interface + * List of SKU availabilities + * @extends Array + */ +export interface SkuAvailabilityListResponse extends Array { + /** + * Link for next list of DedicatedCloudNode + */ + nextLink?: string; +} + +/** + * @interface + * List of private clouds + * @extends Array + */ +export interface PrivateCloudList extends Array { + /** + * Link for next list of Private Clouds + */ + nextLink?: string; +} + +/** + * @interface + * List of resource pools response model + * @extends Array + */ +export interface ResourcePoolsListResponse extends Array { + /** + * Link for next list of ResourcePoolsList + */ + nextLink?: string; +} + +/** + * @interface + * List of virtual machine templates + * @extends Array + */ +export interface VirtualMachineTemplateListResponse extends Array { + /** + * Link for next list of VirtualMachineTemplate + */ + nextLink?: string; +} + +/** + * @interface + * List of virtual networks + * @extends Array + */ +export interface VirtualNetworkListResponse extends Array { + /** + * Link for next list of VirtualNetwork + */ + nextLink?: string; +} + +/** + * @interface + * List of usages + * @extends Array + */ +export interface UsageListResponse extends Array { + /** + * Link for next list of DedicatedCloudNode + */ + nextLink?: string; +} + +/** + * @interface + * List of virtual machines + * @extends Array + */ +export interface VirtualMachineListResponse extends Array { + /** + * Link for next list of VirtualMachines + */ + nextLink?: string; +} + +/** + * Defines values for OperationOrigin. + * Possible values include: 'user', 'system', 'user,system' + * @readonly + * @enum {string} + */ +export type OperationOrigin = 'user' | 'system' | 'user,system'; + +/** + * Defines values for AggregationType. + * Possible values include: 'Average', 'Total' + * @readonly + * @enum {string} + */ +export type AggregationType = 'Average' | 'Total'; + +/** + * Defines values for NodeStatus. + * Possible values include: 'unused', 'used' + * @readonly + * @enum {string} + */ +export type NodeStatus = 'unused' | 'used'; + +/** + * Defines values for OnboardingStatus. + * Possible values include: 'notOnBoarded', 'onBoarded', 'onBoardingFailed', 'onBoarding' + * @readonly + * @enum {string} + */ +export type OnboardingStatus = 'notOnBoarded' | 'onBoarded' | 'onBoardingFailed' | 'onBoarding'; + +/** + * Defines values for DiskIndependenceMode. + * Possible values include: 'persistent', 'independent_persistent', 'independent_nonpersistent' + * @readonly + * @enum {string} + */ +export type DiskIndependenceMode = 'persistent' | 'independent_persistent' | 'independent_nonpersistent'; + +/** + * Defines values for NICType. + * Possible values include: 'E1000', 'E1000E', 'PCNET32', 'VMXNET', 'VMXNET2', 'VMXNET3' + * @readonly + * @enum {string} + */ +export type NICType = 'E1000' | 'E1000E' | 'PCNET32' | 'VMXNET' | 'VMXNET2' | 'VMXNET3'; + +/** + * Defines values for PrivateCloudResourceType. + * Possible values include: 'Microsoft.VMwareCloudSimple/privateClouds' + * @readonly + * @enum {string} + */ +export type PrivateCloudResourceType = 'Microsoft.VMwareCloudSimple/privateClouds'; + +/** + * Defines values for UsageCount. + * Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', + * 'BytesPerSecond' + * @readonly + * @enum {string} + */ +export type UsageCount = 'Count' | 'Bytes' | 'Seconds' | 'Percent' | 'CountPerSecond' | 'BytesPerSecond'; + +/** + * Defines values for GuestOSType. + * Possible values include: 'linux', 'windows', 'other' + * @readonly + * @enum {string} + */ +export type GuestOSType = 'linux' | 'windows' | 'other'; + +/** + * Defines values for VirtualMachineStatus. + * Possible values include: 'running', 'suspended', 'poweredoff', 'updating', 'deallocating', + * 'deleting' + * @readonly + * @enum {string} + */ +export type VirtualMachineStatus = 'running' | 'suspended' | 'poweredoff' | 'updating' | 'deallocating' | 'deleting'; + +/** + * Defines values for StopMode. + * Possible values include: 'reboot', 'suspend', 'shutdown', 'poweroff' + * @readonly + * @enum {string} + */ +export type StopMode = 'reboot' | 'suspend' | 'shutdown' | 'poweroff'; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = AvailableOperationsListResponse & { + /** + * 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: AvailableOperationsListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationsGetResponse = OperationResource & OperationsGetHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: OperationsGetHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationResource; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = AvailableOperationsListResponse & { + /** + * 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: AvailableOperationsListResponse; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type DedicatedCloudNodesListBySubscriptionResponse = DedicatedCloudNodeListResponse & { + /** + * 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: DedicatedCloudNodeListResponse; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type DedicatedCloudNodesListByResourceGroupResponse = DedicatedCloudNodeListResponse & { + /** + * 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: DedicatedCloudNodeListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DedicatedCloudNodesGetResponse = DedicatedCloudNode & { + /** + * 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: DedicatedCloudNode; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DedicatedCloudNodesCreateOrUpdateResponse = DedicatedCloudNode & DedicatedCloudNodesCreateOrUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: DedicatedCloudNodesCreateOrUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DedicatedCloudNode; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type DedicatedCloudNodesDeleteResponse = DedicatedCloudNodesDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: DedicatedCloudNodesDeleteHeaders; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type DedicatedCloudNodesUpdateResponse = DedicatedCloudNode & { + /** + * 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: DedicatedCloudNode; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type DedicatedCloudNodesListBySubscriptionNextResponse = DedicatedCloudNodeListResponse & { + /** + * 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: DedicatedCloudNodeListResponse; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type DedicatedCloudNodesListByResourceGroupNextResponse = DedicatedCloudNodeListResponse & { + /** + * 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: DedicatedCloudNodeListResponse; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type DedicatedCloudServicesListBySubscriptionResponse = DedicatedCloudServiceListResponse & { + /** + * 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: DedicatedCloudServiceListResponse; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type DedicatedCloudServicesListByResourceGroupResponse = DedicatedCloudServiceListResponse & { + /** + * 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: DedicatedCloudServiceListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DedicatedCloudServicesGetResponse = DedicatedCloudService & { + /** + * 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: DedicatedCloudService; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DedicatedCloudServicesCreateOrUpdateResponse = DedicatedCloudService & { + /** + * 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: DedicatedCloudService; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type DedicatedCloudServicesDeleteResponse = DedicatedCloudServicesDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: DedicatedCloudServicesDeleteHeaders; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type DedicatedCloudServicesUpdateResponse = DedicatedCloudService & { + /** + * 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: DedicatedCloudService; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type DedicatedCloudServicesListBySubscriptionNextResponse = DedicatedCloudServiceListResponse & { + /** + * 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: DedicatedCloudServiceListResponse; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type DedicatedCloudServicesListByResourceGroupNextResponse = DedicatedCloudServiceListResponse & { + /** + * 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: DedicatedCloudServiceListResponse; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type SkusAvailabilityListResponse = SkuAvailabilityListResponse & { + /** + * 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: SkuAvailabilityListResponse; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type SkusAvailabilityListNextResponse = SkuAvailabilityListResponse & { + /** + * 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: SkuAvailabilityListResponse; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type PrivateCloudsListResponse = PrivateCloudList & { + /** + * 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: PrivateCloudList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateCloudsGetResponse = PrivateCloud & { + /** + * 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: PrivateCloud; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PrivateCloudsListNextResponse = PrivateCloudList & { + /** + * 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: PrivateCloudList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ResourcePoolsListResponse2 = ResourcePoolsListResponse & { + /** + * 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: ResourcePoolsListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ResourcePoolsGetResponse = ResourcePool & { + /** + * 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: ResourcePool; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ResourcePoolsListNextResponse = ResourcePoolsListResponse & { + /** + * 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: ResourcePoolsListResponse; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type VirtualMachineTemplatesListResponse = VirtualMachineTemplateListResponse & { + /** + * 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: VirtualMachineTemplateListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualMachineTemplatesGetResponse = VirtualMachineTemplate & { + /** + * 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: VirtualMachineTemplate; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type VirtualMachineTemplatesListNextResponse = VirtualMachineTemplateListResponse & { + /** + * 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: VirtualMachineTemplateListResponse; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type VirtualNetworksListResponse = VirtualNetworkListResponse & { + /** + * 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: VirtualNetworkListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualNetworksGetResponse = VirtualNetwork & { + /** + * 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: VirtualNetwork; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type VirtualNetworksListNextResponse = VirtualNetworkListResponse & { + /** + * 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: VirtualNetworkListResponse; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type UsagesListResponse = UsageListResponse & { + /** + * 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: UsageListResponse; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type UsagesListNextResponse = UsageListResponse & { + /** + * 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: UsageListResponse; + }; +}; + +/** + * Contains response data for the listBySubscription operation. + */ +export type VirtualMachinesListBySubscriptionResponse = VirtualMachineListResponse & { + /** + * 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: VirtualMachineListResponse; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type VirtualMachinesListByResourceGroupResponse = VirtualMachineListResponse & { + /** + * 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: VirtualMachineListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type VirtualMachinesGetResponse = VirtualMachine & { + /** + * 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: VirtualMachine; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type VirtualMachinesCreateOrUpdateResponse = VirtualMachine & VirtualMachinesCreateOrUpdateHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: VirtualMachinesCreateOrUpdateHeaders; + + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: VirtualMachine; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type VirtualMachinesDeleteResponse = VirtualMachinesDeleteHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: VirtualMachinesDeleteHeaders; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type VirtualMachinesUpdateResponse = VirtualMachine & { + /** + * 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: VirtualMachine; + }; +}; + +/** + * Contains response data for the start operation. + */ +export type VirtualMachinesStartResponse = VirtualMachinesStartHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: VirtualMachinesStartHeaders; + }; +}; + +/** + * Contains response data for the stop operation. + */ +export type VirtualMachinesStopResponse = VirtualMachinesStopHeaders & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: VirtualMachinesStopHeaders; + }; +}; + +/** + * Contains response data for the beginUpdate operation. + */ +export type VirtualMachinesBeginUpdateResponse = VirtualMachine & { + /** + * 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: VirtualMachine; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type VirtualMachinesListBySubscriptionNextResponse = VirtualMachineListResponse & { + /** + * 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: VirtualMachineListResponse; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type VirtualMachinesListByResourceGroupNextResponse = VirtualMachineListResponse & { + /** + * 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: VirtualMachineListResponse; + }; +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts new file mode 100644 index 000000000000..8f0066f574ee --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts @@ -0,0 +1,2096 @@ +/* + * 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 AvailableOperationDisplay: msRest.CompositeMapper = { + serializedName: "AvailableOperationDisplay", + type: { + name: "Composite", + className: "AvailableOperationDisplay", + modelProperties: { + description: { + serializedName: "description", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableOperationDisplayPropertyServiceSpecificationMetricsItem: msRest.CompositeMapper = { + serializedName: "AvailableOperationDisplayPropertyServiceSpecificationMetricsItem", + type: { + name: "Composite", + className: "AvailableOperationDisplayPropertyServiceSpecificationMetricsItem", + modelProperties: { + aggregationType: { + required: true, + serializedName: "aggregationType", + type: { + name: "Enum", + allowedValues: [ + "Average", + "Total" + ] + } + }, + displayDescription: { + required: true, + serializedName: "displayDescription", + type: { + name: "String" + } + }, + displayName: { + required: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + unit: { + required: true, + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableOperationDisplayPropertyServiceSpecificationMetricsList: msRest.CompositeMapper = { + serializedName: "AvailableOperationDisplayPropertyServiceSpecificationMetricsList", + type: { + name: "Composite", + className: "AvailableOperationDisplayPropertyServiceSpecificationMetricsList", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableOperationDisplayPropertyServiceSpecificationMetricsItem" + } + } + } + } + } + } +}; + +export const AvailableOperation: msRest.CompositeMapper = { + serializedName: "AvailableOperation", + type: { + name: "Composite", + className: "AvailableOperation", + modelProperties: { + display: { + serializedName: "display", + type: { + name: "Composite", + className: "AvailableOperationDisplay" + } + }, + isDataAction: { + serializedName: "isDataAction", + defaultValue: false, + type: { + name: "Boolean" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + origin: { + serializedName: "origin", + type: { + name: "Enum", + allowedValues: [ + "user", + "system", + "user,system" + ] + } + }, + serviceSpecification: { + serializedName: "properties.serviceSpecification", + type: { + name: "Composite", + className: "AvailableOperationDisplayPropertyServiceSpecificationMetricsList" + } + } + } + } +}; + +export const CSRPErrorBody: msRest.CompositeMapper = { + serializedName: "CSRPErrorBody", + type: { + name: "Composite", + className: "CSRPErrorBody", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CSRPErrorBody" + } + } + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const CSRPError: msRest.CompositeMapper = { + serializedName: "CSRPError", + type: { + name: "Composite", + className: "CSRPError", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "CSRPErrorBody" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + capacity: { + serializedName: "capacity", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + family: { + serializedName: "family", + type: { + name: "String" + } + }, + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + +export const DedicatedCloudNode: msRest.CompositeMapper = { + serializedName: "DedicatedCloudNode", + type: { + name: "Composite", + className: "DedicatedCloudNode", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + constraints: { + Pattern: /^[-a-zA-Z0-9]+$/ + }, + type: { + name: "String" + } + }, + availabilityZoneId: { + required: true, + serializedName: "properties.availabilityZoneId", + type: { + name: "String" + } + }, + availabilityZoneName: { + readOnly: true, + serializedName: "properties.availabilityZoneName", + type: { + name: "String" + } + }, + cloudRackName: { + readOnly: true, + serializedName: "properties.cloudRackName", + type: { + name: "String" + } + }, + created: { + readOnly: true, + serializedName: "properties.created", + type: { + name: "Object" + } + }, + nodesCount: { + required: true, + serializedName: "properties.nodesCount", + type: { + name: "Number" + } + }, + placementGroupId: { + required: true, + serializedName: "properties.placementGroupId", + type: { + name: "String" + } + }, + placementGroupName: { + readOnly: true, + serializedName: "properties.placementGroupName", + type: { + name: "String" + } + }, + privateCloudId: { + readOnly: true, + serializedName: "properties.privateCloudId", + type: { + name: "String" + } + }, + privateCloudName: { + readOnly: true, + serializedName: "properties.privateCloudName", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + purchaseId: { + required: true, + serializedName: "properties.purchaseId", + type: { + name: "Uuid" + } + }, + id1: { + required: true, + serializedName: "properties.skuDescription.id", + type: { + name: "String" + } + }, + name1: { + required: true, + serializedName: "properties.skuDescription.name", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "Enum", + allowedValues: [ + "unused", + "used" + ] + } + }, + vmwareClusterName: { + readOnly: true, + serializedName: "properties.vmwareClusterName", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const DedicatedCloudService: msRest.CompositeMapper = { + serializedName: "DedicatedCloudService", + type: { + name: "Composite", + className: "DedicatedCloudService", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + constraints: { + Pattern: /^[-a-zA-Z0-9]+$/ + }, + type: { + name: "String" + } + }, + gatewaySubnet: { + required: true, + serializedName: "properties.gatewaySubnet", + type: { + name: "String" + } + }, + isAccountOnboarded: { + readOnly: true, + serializedName: "properties.isAccountOnboarded", + type: { + name: "Enum", + allowedValues: [ + "notOnBoarded", + "onBoarded", + "onBoardingFailed", + "onBoarding" + ] + } + }, + nodes: { + serializedName: "properties.nodes", + type: { + name: "Number" + } + }, + serviceURL: { + serializedName: "properties.serviceURL", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const OperationError: msRest.CompositeMapper = { + serializedName: "OperationError", + type: { + name: "Composite", + className: "OperationError", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const OperationResource: msRest.CompositeMapper = { + serializedName: "OperationResource", + type: { + name: "Composite", + className: "OperationResource", + modelProperties: { + endTime: { + readOnly: true, + serializedName: "endTime", + type: { + name: "DateTime" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "OperationError" + } + }, + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + readOnly: true, + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const PatchPayload: msRest.CompositeMapper = { + serializedName: "PatchPayload", + type: { + name: "Composite", + className: "PatchPayload", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ResourcePool: msRest.CompositeMapper = { + serializedName: "ResourcePool", + type: { + name: "Composite", + className: "ResourcePool", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + privateCloudId: { + readOnly: true, + serializedName: "privateCloudId", + type: { + name: "String" + } + }, + fullName: { + readOnly: true, + serializedName: "properties.fullName", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualDiskController: msRest.CompositeMapper = { + serializedName: "VirtualDiskController", + type: { + name: "Composite", + className: "VirtualDiskController", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + subType: { + readOnly: true, + serializedName: "subType", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualDisk: msRest.CompositeMapper = { + serializedName: "VirtualDisk", + type: { + name: "Composite", + className: "VirtualDisk", + modelProperties: { + controllerId: { + required: true, + serializedName: "controllerId", + type: { + name: "String" + } + }, + independenceMode: { + required: true, + serializedName: "independenceMode", + type: { + name: "Enum", + allowedValues: [ + "persistent", + "independent_persistent", + "independent_nonpersistent" + ] + } + }, + totalSize: { + required: true, + serializedName: "totalSize", + type: { + name: "Number" + } + }, + virtualDiskId: { + serializedName: "virtualDiskId", + type: { + name: "String" + } + }, + virtualDiskName: { + readOnly: true, + serializedName: "virtualDiskName", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNetwork: msRest.CompositeMapper = { + serializedName: "VirtualNetwork", + type: { + name: "Composite", + className: "VirtualNetwork", + modelProperties: { + assignable: { + readOnly: true, + serializedName: "assignable", + type: { + name: "Boolean" + } + }, + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + privateCloudId: { + readOnly: true, + serializedName: "properties.privateCloudId", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualNic: msRest.CompositeMapper = { + serializedName: "VirtualNic", + type: { + name: "Composite", + className: "VirtualNic", + modelProperties: { + ipAddresses: { + serializedName: "ipAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + macAddress: { + serializedName: "macAddress", + type: { + name: "String" + } + }, + network: { + required: true, + serializedName: "network", + type: { + name: "Composite", + className: "VirtualNetwork" + } + }, + nicType: { + required: true, + serializedName: "nicType", + type: { + name: "Enum", + allowedValues: [ + "E1000", + "E1000E", + "PCNET32", + "VMXNET", + "VMXNET2", + "VMXNET3" + ] + } + }, + powerOnBoot: { + serializedName: "powerOnBoot", + type: { + name: "Boolean" + } + }, + virtualNicId: { + serializedName: "virtualNicId", + type: { + name: "String" + } + }, + virtualNicName: { + readOnly: true, + serializedName: "virtualNicName", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineTemplate: msRest.CompositeMapper = { + serializedName: "VirtualMachineTemplate", + type: { + name: "Composite", + className: "VirtualMachineTemplate", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + amountOfRam: { + serializedName: "properties.amountOfRam", + type: { + name: "Number" + } + }, + controllers: { + serializedName: "properties.controllers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDiskController" + } + } + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + disks: { + serializedName: "properties.disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDisk" + } + } + } + }, + exposeToGuestVM: { + serializedName: "properties.exposeToGuestVM", + type: { + name: "Boolean" + } + }, + guestOS: { + readOnly: true, + serializedName: "properties.guestOS", + type: { + name: "String" + } + }, + guestOSType: { + readOnly: true, + serializedName: "properties.guestOSType", + type: { + name: "String" + } + }, + nics: { + serializedName: "properties.nics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNic" + } + } + } + }, + numberOfCores: { + serializedName: "properties.numberOfCores", + type: { + name: "Number" + } + }, + path: { + serializedName: "properties.path", + type: { + name: "String" + } + }, + privateCloudId: { + required: true, + serializedName: "properties.privateCloudId", + type: { + name: "String" + } + }, + vSphereNetworks: { + serializedName: "properties.vSphereNetworks", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vSphereTags: { + serializedName: "properties.vSphereTags", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vmwaretools: { + readOnly: true, + serializedName: "properties.vmwaretools", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateCloud: msRest.CompositeMapper = { + serializedName: "PrivateCloud", + type: { + name: "Composite", + className: "PrivateCloud", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + availabilityZoneId: { + serializedName: "properties.availabilityZoneId", + type: { + name: "String" + } + }, + availabilityZoneName: { + serializedName: "properties.availabilityZoneName", + type: { + name: "String" + } + }, + clustersNumber: { + serializedName: "properties.clustersNumber", + type: { + name: "Number" + } + }, + createdBy: { + serializedName: "properties.createdBy", + type: { + name: "String" + } + }, + createdOn: { + serializedName: "properties.createdOn", + type: { + name: "DateTime" + } + }, + dnsServers: { + serializedName: "properties.dnsServers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + expires: { + serializedName: "properties.expires", + type: { + name: "String" + } + }, + nsxType: { + serializedName: "properties.nsxType", + type: { + name: "String" + } + }, + placementGroupId: { + serializedName: "properties.placementGroupId", + type: { + name: "String" + } + }, + placementGroupName: { + serializedName: "properties.placementGroupName", + type: { + name: "String" + } + }, + privateCloudId: { + serializedName: "properties.privateCloudId", + type: { + name: "Uuid" + } + }, + resourcePools: { + serializedName: "properties.resourcePools", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourcePool" + } + } + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + }, + totalCpuCores: { + serializedName: "properties.totalCpuCores", + type: { + name: "Number" + } + }, + totalNodes: { + serializedName: "properties.totalNodes", + type: { + name: "Number" + } + }, + totalRam: { + serializedName: "properties.totalRam", + type: { + name: "Number" + } + }, + totalStorage: { + serializedName: "properties.totalStorage", + type: { + name: "Number" + } + }, + privateCloudPropertiesType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + vSphereVersion: { + serializedName: "properties.vSphereVersion", + type: { + name: "String" + } + }, + vcenterFqdn: { + serializedName: "properties.vcenterFqdn", + type: { + name: "String" + } + }, + vcenterRefid: { + serializedName: "properties.vcenterRefid", + type: { + name: "String" + } + }, + virtualMachineTemplates: { + serializedName: "properties.virtualMachineTemplates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineTemplate" + } + } + } + }, + virtualNetworks: { + serializedName: "properties.virtualNetworks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetwork" + } + } + } + }, + vrOpsEnabled: { + serializedName: "properties.vrOpsEnabled", + type: { + name: "Boolean" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "Microsoft.VMwareCloudSimple/privateClouds" + ] + } + } + } + } +}; + +export const SkuAvailability: msRest.CompositeMapper = { + serializedName: "SkuAvailability", + type: { + name: "Composite", + className: "SkuAvailability", + modelProperties: { + dedicatedAvailabilityZoneId: { + serializedName: "dedicatedAvailabilityZoneId", + type: { + name: "String" + } + }, + dedicatedAvailabilityZoneName: { + serializedName: "dedicatedAvailabilityZoneName", + type: { + name: "String" + } + }, + dedicatedPlacementGroupId: { + serializedName: "dedicatedPlacementGroupId", + type: { + name: "String" + } + }, + dedicatedPlacementGroupName: { + serializedName: "dedicatedPlacementGroupName", + type: { + name: "String" + } + }, + limit: { + required: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + resourceType: { + serializedName: "resourceType", + type: { + name: "String" + } + }, + skuId: { + serializedName: "skuId", + type: { + name: "String" + } + }, + skuName: { + serializedName: "skuName", + type: { + name: "String" + } + } + } + } +}; + +export const UsageName: msRest.CompositeMapper = { + serializedName: "UsageName", + type: { + name: "Composite", + className: "UsageName", + modelProperties: { + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const Usage: msRest.CompositeMapper = { + serializedName: "Usage", + type: { + name: "Composite", + className: "Usage", + modelProperties: { + currentValue: { + required: true, + serializedName: "currentValue", + defaultValue: 0, + type: { + name: "Number" + } + }, + limit: { + required: true, + serializedName: "limit", + defaultValue: 0, + type: { + name: "Number" + } + }, + name: { + serializedName: "name", + type: { + name: "Composite", + className: "UsageName" + } + }, + unit: { + serializedName: "unit", + type: { + name: "Enum", + allowedValues: [ + "Count", + "Bytes", + "Seconds", + "Percent", + "CountPerSecond", + "BytesPerSecond" + ] + } + } + } + } +}; + +export const VirtualMachine: msRest.CompositeMapper = { + serializedName: "VirtualMachine", + type: { + name: "Composite", + className: "VirtualMachine", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + location: { + required: true, + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + constraints: { + Pattern: /^[-a-zA-Z0-9]+$/ + }, + type: { + name: "String" + } + }, + amountOfRam: { + required: true, + serializedName: "properties.amountOfRam", + type: { + name: "Number" + } + }, + controllers: { + readOnly: true, + serializedName: "properties.controllers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDiskController" + } + } + } + }, + disks: { + serializedName: "properties.disks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualDisk" + } + } + } + }, + dnsname: { + readOnly: true, + serializedName: "properties.dnsname", + type: { + name: "String" + } + }, + exposeToGuestVM: { + serializedName: "properties.exposeToGuestVM", + type: { + name: "Boolean" + } + }, + folder: { + readOnly: true, + serializedName: "properties.folder", + type: { + name: "String" + } + }, + guestOS: { + readOnly: true, + serializedName: "properties.guestOS", + type: { + name: "String" + } + }, + guestOSType: { + readOnly: true, + serializedName: "properties.guestOSType", + type: { + name: "Enum", + allowedValues: [ + "linux", + "windows", + "other" + ] + } + }, + nics: { + serializedName: "properties.nics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNic" + } + } + } + }, + numberOfCores: { + required: true, + serializedName: "properties.numberOfCores", + type: { + name: "Number" + } + }, + password: { + serializedName: "properties.password", + type: { + name: "String" + } + }, + privateCloudId: { + required: true, + serializedName: "properties.privateCloudId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + publicIP: { + readOnly: true, + serializedName: "properties.publicIP", + type: { + name: "String" + } + }, + resourcePool: { + serializedName: "properties.resourcePool", + type: { + name: "Composite", + className: "ResourcePool" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "Enum", + allowedValues: [ + "running", + "suspended", + "poweredoff", + "updating", + "deallocating", + "deleting" + ] + } + }, + templateId: { + serializedName: "properties.templateId", + type: { + name: "String" + } + }, + username: { + serializedName: "properties.username", + type: { + name: "String" + } + }, + vSphereNetworks: { + serializedName: "properties.vSphereNetworks", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vmId: { + readOnly: true, + serializedName: "properties.vmId", + type: { + name: "String" + } + }, + vmwaretools: { + readOnly: true, + serializedName: "properties.vmwaretools", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineStopMode: msRest.CompositeMapper = { + serializedName: "VirtualMachineStopMode", + type: { + name: "Composite", + className: "VirtualMachineStopMode", + modelProperties: { + mode: { + serializedName: "mode", + type: { + name: "Enum", + allowedValues: [ + "reboot", + "suspend", + "shutdown", + "poweroff" + ] + } + } + } + } +}; + +export const OperationsGetHeaders: msRest.CompositeMapper = { + serializedName: "operations-get-headers", + type: { + name: "Composite", + className: "OperationsGetHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + } + } + } +}; + +export const DedicatedCloudNodesCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "dedicatedcloudnodes-createorupdate-headers", + type: { + name: "Composite", + className: "DedicatedCloudNodesCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + locationHeader: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + } + } + } +}; + +export const DedicatedCloudNodesDeleteHeaders: msRest.CompositeMapper = { + serializedName: "dedicatedcloudnodes-delete-headers", + type: { + name: "Composite", + className: "DedicatedCloudNodesDeleteHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + } + } + } +}; + +export const DedicatedCloudServicesDeleteHeaders: msRest.CompositeMapper = { + serializedName: "dedicatedcloudservices-delete-headers", + type: { + name: "Composite", + className: "DedicatedCloudServicesDeleteHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachinesCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "virtualmachines-createorupdate-headers", + type: { + name: "Composite", + className: "VirtualMachinesCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachinesDeleteHeaders: msRest.CompositeMapper = { + serializedName: "virtualmachines-delete-headers", + type: { + name: "Composite", + className: "VirtualMachinesDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachinesStartHeaders: msRest.CompositeMapper = { + serializedName: "virtualmachines-start-headers", + type: { + name: "Composite", + className: "VirtualMachinesStartHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachinesStopHeaders: msRest.CompositeMapper = { + serializedName: "virtualmachines-stop-headers", + type: { + name: "Composite", + className: "VirtualMachinesStopHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number" + } + }, + contentType: { + serializedName: "content-type", + type: { + name: "String" + } + } + } + } +}; + +export const AvailableOperationsListResponse: msRest.CompositeMapper = { + serializedName: "AvailableOperationsListResponse", + type: { + name: "Composite", + className: "AvailableOperationsListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableOperation" + } + } + } + } + } + } +}; + +export const DedicatedCloudNodeListResponse: msRest.CompositeMapper = { + serializedName: "DedicatedCloudNodeListResponse", + type: { + name: "Composite", + className: "DedicatedCloudNodeListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DedicatedCloudNode" + } + } + } + } + } + } +}; + +export const DedicatedCloudServiceListResponse: msRest.CompositeMapper = { + serializedName: "DedicatedCloudServiceListResponse", + type: { + name: "Composite", + className: "DedicatedCloudServiceListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DedicatedCloudService" + } + } + } + } + } + } +}; + +export const SkuAvailabilityListResponse: msRest.CompositeMapper = { + serializedName: "SkuAvailabilityListResponse", + type: { + name: "Composite", + className: "SkuAvailabilityListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuAvailability" + } + } + } + } + } + } +}; + +export const PrivateCloudList: msRest.CompositeMapper = { + serializedName: "PrivateCloudList", + type: { + name: "Composite", + className: "PrivateCloudList", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateCloud" + } + } + } + } + } + } +}; + +export const ResourcePoolsListResponse: msRest.CompositeMapper = { + serializedName: "ResourcePoolsListResponse", + type: { + name: "Composite", + className: "ResourcePoolsListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourcePool" + } + } + } + } + } + } +}; + +export const VirtualMachineTemplateListResponse: msRest.CompositeMapper = { + serializedName: "VirtualMachineTemplateListResponse", + type: { + name: "Composite", + className: "VirtualMachineTemplateListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineTemplate" + } + } + } + } + } + } +}; + +export const VirtualNetworkListResponse: msRest.CompositeMapper = { + serializedName: "VirtualNetworkListResponse", + type: { + name: "Composite", + className: "VirtualNetworkListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetwork" + } + } + } + } + } + } +}; + +export const UsageListResponse: msRest.CompositeMapper = { + serializedName: "UsageListResponse", + type: { + name: "Composite", + className: "UsageListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Usage" + } + } + } + } + } + } +}; + +export const VirtualMachineListResponse: msRest.CompositeMapper = { + serializedName: "VirtualMachineListResponse", + type: { + name: "Composite", + className: "VirtualMachineListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachine" + } + } + } + } + } + } +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/operationsMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/operationsMappers.ts new file mode 100644 index 000000000000..0c20c8a9c0a5 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/operationsMappers.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 { + AvailableOperation, + AvailableOperationDisplay, + AvailableOperationDisplayPropertyServiceSpecificationMetricsItem, + AvailableOperationDisplayPropertyServiceSpecificationMetricsList, + AvailableOperationsListResponse, + CSRPError, + CSRPErrorBody, + OperationError, + OperationResource, + OperationsGetHeaders +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts new file mode 100644 index 000000000000..d81f0d06d134 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts @@ -0,0 +1,258 @@ +/* + * 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 dedicatedCloudNodeName: msRest.OperationURLParameter = { + parameterPath: "dedicatedCloudNodeName", + mapper: { + required: true, + serializedName: "dedicatedCloudNodeName", + constraints: { + Pattern: /^[-a-zA-Z0-9]+$/ + }, + type: { + name: "String" + } + } +}; +export const dedicatedCloudServiceName0: msRest.OperationURLParameter = { + parameterPath: "dedicatedCloudServiceName", + mapper: { + required: true, + serializedName: "dedicatedCloudServiceName", + type: { + name: "String" + } + } +}; +export const dedicatedCloudServiceName1: msRest.OperationURLParameter = { + parameterPath: "dedicatedCloudServiceName", + mapper: { + required: true, + serializedName: "dedicatedCloudServiceName", + constraints: { + Pattern: /^[-a-zA-Z0-9]+$/ + }, + type: { + name: "String" + } + } +}; +export const filter: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "filter" + ], + mapper: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; +export const mode: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "mode" + ], + mapper: { + serializedName: "mode", + type: { + name: "Enum", + allowedValues: [ + "reboot", + "suspend", + "shutdown", + "poweroff" + ] + } + } +}; +export const nextPageLink: msRest.OperationURLParameter = { + parameterPath: "nextPageLink", + mapper: { + required: true, + serializedName: "nextLink", + type: { + name: "String" + } + }, + skipEncoding: true +}; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; +export const pcName: msRest.OperationURLParameter = { + parameterPath: "pcName", + mapper: { + required: true, + serializedName: "pcName", + type: { + name: "String" + } + } +}; +export const referer: msRest.OperationParameter = { + parameterPath: "referer", + mapper: { + required: true, + serializedName: "Referer", + type: { + name: "String" + } + } +}; +export const regionId: msRest.OperationURLParameter = { + parameterPath: "regionId", + mapper: { + required: true, + serializedName: "regionId", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + required: true, + serializedName: "resourceGroupName", + type: { + name: "String" + } + } +}; +export const resourcePoolName: msRest.OperationURLParameter = { + parameterPath: "resourcePoolName", + mapper: { + required: true, + serializedName: "resourcePoolName", + type: { + name: "String" + } + } +}; +export const skipToken: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "skipToken" + ], + mapper: { + serializedName: "$skipToken", + type: { + name: "String" + } + } +}; +export const skuId: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "skuId" + ], + mapper: { + serializedName: "skuId", + type: { + name: "String" + } + } +}; +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", + mapper: { + required: true, + serializedName: "subscriptionId", + type: { + name: "String" + } + } +}; +export const top: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "top" + ], + mapper: { + serializedName: "$top", + type: { + name: "Number" + } + } +}; +export const virtualMachineName0: msRest.OperationURLParameter = { + parameterPath: "virtualMachineName", + mapper: { + required: true, + serializedName: "virtualMachineName", + type: { + name: "String" + } + } +}; +export const virtualMachineName1: msRest.OperationURLParameter = { + parameterPath: "virtualMachineName", + mapper: { + required: true, + serializedName: "virtualMachineName", + constraints: { + Pattern: /^[-a-zA-Z0-9]+$/ + }, + type: { + name: "String" + } + } +}; +export const virtualMachineTemplateName: msRest.OperationURLParameter = { + parameterPath: "virtualMachineTemplateName", + mapper: { + required: true, + serializedName: "virtualMachineTemplateName", + type: { + name: "String" + } + } +}; +export const virtualNetworkName: msRest.OperationURLParameter = { + parameterPath: "virtualNetworkName", + mapper: { + required: true, + serializedName: "virtualNetworkName", + type: { + name: "String" + } + } +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.ts new file mode 100644 index 000000000000..b6b92e662c0b --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.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 { + CSRPError, + CSRPErrorBody, + PrivateCloud, + PrivateCloudList, + ResourcePool, + VirtualDisk, + VirtualDiskController, + VirtualMachineTemplate, + VirtualNetwork, + VirtualNic +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/resourcePoolsMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/resourcePoolsMappers.ts new file mode 100644 index 000000000000..63e758768125 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/resourcePoolsMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + CSRPError, + CSRPErrorBody, + ResourcePool, + ResourcePoolsListResponse +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/skusAvailabilityMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/skusAvailabilityMappers.ts new file mode 100644 index 000000000000..e5fbf12b2915 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/skusAvailabilityMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + CSRPError, + CSRPErrorBody, + SkuAvailability, + SkuAvailabilityListResponse +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/usagesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/usagesMappers.ts new file mode 100644 index 000000000000..b03697d4f6fb --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/usagesMappers.ts @@ -0,0 +1,15 @@ +/* + * 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 { + CSRPError, + CSRPErrorBody, + Usage, + UsageListResponse, + UsageName +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts new file mode 100644 index 000000000000..73000267eb20 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts @@ -0,0 +1,18 @@ +/* + * 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 { + CSRPError, + CSRPErrorBody, + VirtualDisk, + VirtualDiskController, + VirtualMachineTemplate, + VirtualMachineTemplateListResponse, + VirtualNetwork, + VirtualNic +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts new file mode 100644 index 000000000000..02ff89614a14 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts @@ -0,0 +1,29 @@ +/* + * 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 { + BaseResource, + CSRPError, + CSRPErrorBody, + DedicatedCloudNode, + DedicatedCloudService, + PatchPayload, + ResourcePool, + Sku, + VirtualDisk, + VirtualDiskController, + VirtualMachine, + VirtualMachineListResponse, + VirtualMachinesCreateOrUpdateHeaders, + VirtualMachinesDeleteHeaders, + VirtualMachinesStartHeaders, + VirtualMachinesStopHeaders, + VirtualMachineStopMode, + VirtualNetwork, + VirtualNic +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualNetworksMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualNetworksMappers.ts new file mode 100644 index 000000000000..de6b058f1c19 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualNetworksMappers.ts @@ -0,0 +1,14 @@ +/* + * 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 { + CSRPError, + CSRPErrorBody, + VirtualNetwork, + VirtualNetworkListResponse +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudNodes.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudNodes.ts new file mode 100644 index 000000000000..15c5a99b4b5c --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudNodes.ts @@ -0,0 +1,493 @@ +/* + * 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/dedicatedCloudNodesMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a DedicatedCloudNodes. */ +export class DedicatedCloudNodes { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a DedicatedCloudNodes. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of dedicate cloud nodes within subscription + * @summary Implements list of dedicated cloud nodes within subscription method + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.DedicatedCloudNodesListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.DedicatedCloudNodesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.DedicatedCloudNodesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Returns list of dedicate cloud nodes within resource group + * @summary Implements list of dedicated cloud nodes within RG method + * @param resourceGroupName The name of the resource group + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.DedicatedCloudNodesListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.DedicatedCloudNodesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.DedicatedCloudNodesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Returns dedicated cloud node + * @summary Implements dedicated cloud node GET method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, dedicatedCloudNodeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param callback The callback + */ + get(resourceGroupName: string, dedicatedCloudNodeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, dedicatedCloudNodeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, dedicatedCloudNodeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dedicatedCloudNodeName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns dedicated cloud node by its name + * @summary Implements dedicated cloud node PUT method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node request + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, dedicatedCloudNodeName: string, dedicatedCloudNodeRequest: Models.DedicatedCloudNode, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,dedicatedCloudNodeName,dedicatedCloudNodeRequest,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete dedicated cloud node + * @summary Implements dedicated cloud node DELETE method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, dedicatedCloudNodeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, dedicatedCloudNodeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, dedicatedCloudNodeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, dedicatedCloudNodeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dedicatedCloudNodeName, + options + }, + deleteMethodOperationSpec, + callback) as Promise; + } + + /** + * Patches dedicated node properties + * @summary Implements dedicated cloud node PATCH method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, dedicatedCloudNodeName: string, options?: Models.DedicatedCloudNodesUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param callback The callback + */ + update(resourceGroupName: string, dedicatedCloudNodeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, dedicatedCloudNodeName: string, options: Models.DedicatedCloudNodesUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, dedicatedCloudNodeName: string, options?: Models.DedicatedCloudNodesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dedicatedCloudNodeName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Returns dedicated cloud node by its name + * @summary Implements dedicated cloud node PUT method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudNodeName dedicated cloud node name + * @param dedicatedCloudNodeRequest Create Dedicated Cloud Node request + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, dedicatedCloudNodeName: string, dedicatedCloudNodeRequest: Models.DedicatedCloudNode, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + dedicatedCloudNodeName, + dedicatedCloudNodeRequest, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Returns list of dedicate cloud nodes within subscription + * @summary Implements list of dedicated cloud nodes within subscription method + * @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; + } + + /** + * Returns list of dedicate cloud nodes within resource group + * @summary Implements list of dedicated cloud nodes within RG method + * @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.VMwareCloudSimple/dedicatedCloudNodes", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudNodeListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudNodeListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/{dedicatedCloudNodeName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudNodeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudNode + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/{dedicatedCloudNodeName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudNodeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: { + headersMapper: Mappers.DedicatedCloudNodesDeleteHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/{dedicatedCloudNodeName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudNodeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: { + ...Mappers.PatchPayload, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudNode + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudNodes/{dedicatedCloudNodeName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudNodeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.referer, + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "dedicatedCloudNodeRequest", + mapper: { + ...Mappers.DedicatedCloudNode, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudNode, + headersMapper: Mappers.DedicatedCloudNodesCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudNodeListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudNodeListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudServices.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudServices.ts new file mode 100644 index 000000000000..2e78464b1d5e --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/dedicatedCloudServices.ts @@ -0,0 +1,492 @@ +/* + * 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/dedicatedCloudServicesMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a DedicatedCloudServices. */ +export class DedicatedCloudServices { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a DedicatedCloudServices. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of dedicated cloud services within a subscription + * @summary Implements list of dedicatedCloudService objects within subscription method + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.DedicatedCloudServicesListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.DedicatedCloudServicesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.DedicatedCloudServicesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Returns list of dedicated cloud services within a resource group + * @summary Implements list of dedicatedCloudService objects within RG method + * @param resourceGroupName The name of the resource group + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.DedicatedCloudServicesListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.DedicatedCloudServicesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.DedicatedCloudServicesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Returns Dedicate Cloud Service + * @summary Implements dedicatedCloudService GET method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud Service name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, dedicatedCloudServiceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud Service name + * @param callback The callback + */ + get(resourceGroupName: string, dedicatedCloudServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud Service name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, dedicatedCloudServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, dedicatedCloudServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dedicatedCloudServiceName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create dedicate cloud service + * @summary Implements dedicated cloud service PUT method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud Service name + * @param dedicatedCloudServiceRequest Create Dedicated Cloud Service request + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, dedicatedCloudServiceName: string, dedicatedCloudServiceRequest: Models.DedicatedCloudService, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud Service name + * @param dedicatedCloudServiceRequest Create Dedicated Cloud Service request + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, dedicatedCloudServiceName: string, dedicatedCloudServiceRequest: Models.DedicatedCloudService, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud Service name + * @param dedicatedCloudServiceRequest Create Dedicated Cloud Service request + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, dedicatedCloudServiceName: string, dedicatedCloudServiceRequest: Models.DedicatedCloudService, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, dedicatedCloudServiceName: string, dedicatedCloudServiceRequest: Models.DedicatedCloudService, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dedicatedCloudServiceName, + dedicatedCloudServiceRequest, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Delete dedicate cloud service + * @summary Implements dedicatedCloudService DELETE method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud service name + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, dedicatedCloudServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,dedicatedCloudServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Patch dedicated cloud service's properties + * @summary Implements dedicatedCloudService PATCH method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud service name + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, dedicatedCloudServiceName: string, options?: Models.DedicatedCloudServicesUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud service name + * @param callback The callback + */ + update(resourceGroupName: string, dedicatedCloudServiceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud service name + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, dedicatedCloudServiceName: string, options: Models.DedicatedCloudServicesUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, dedicatedCloudServiceName: string, options?: Models.DedicatedCloudServicesUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + dedicatedCloudServiceName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Delete dedicate cloud service + * @summary Implements dedicatedCloudService DELETE method + * @param resourceGroupName The name of the resource group + * @param dedicatedCloudServiceName dedicated cloud service name + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, dedicatedCloudServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + dedicatedCloudServiceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Returns list of dedicated cloud services within a subscription + * @summary Implements list of dedicatedCloudService objects within subscription method + * @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; + } + + /** + * Returns list of dedicated cloud services within a resource group + * @summary Implements list of dedicatedCloudService objects within RG method + * @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.VMwareCloudSimple/dedicatedCloudServices", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudServiceListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudServiceListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/{dedicatedCloudServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudServiceName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudService + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/{dedicatedCloudServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudServiceName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "dedicatedCloudServiceRequest", + mapper: { + ...Mappers.DedicatedCloudService, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudService + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/{dedicatedCloudServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudServiceName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: { + ...Mappers.PatchPayload, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudService + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/dedicatedCloudServices/{dedicatedCloudServiceName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.dedicatedCloudServiceName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: { + headersMapper: Mappers.DedicatedCloudServicesDeleteHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudServiceListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DedicatedCloudServiceListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.ts new file mode 100644 index 000000000000..8b0e0e5096b4 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.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 * from "./operations"; +export * from "./dedicatedCloudNodes"; +export * from "./dedicatedCloudServices"; +export * from "./skusAvailability"; +export * from "./privateClouds"; +export * from "./resourcePools"; +export * from "./virtualMachineTemplates"; +export * from "./virtualNetworks"; +export * from "./usages"; +export * from "./virtualMachines"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/operations.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/operations.ts new file mode 100644 index 000000000000..b1360f981bdb --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/operations.ts @@ -0,0 +1,191 @@ +/* + * 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 { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a Operations. */ +export class Operations { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a Operations. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Return list of operations + * @summary Implements list of available operations + * @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; + } + + /** + * Return an async operation + * @summary Implements get of async operation + * @param regionId The region Id (westus, eastus) + * @param operationId operation id + * @param [options] The optional parameters + * @returns Promise + */ + get(regionId: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param operationId operation id + * @param callback The callback + */ + get(regionId: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param operationId operation id + * @param options The optional parameters + * @param callback The callback + */ + get(regionId: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regionId: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + operationId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Return list of operations + * @summary Implements list of available operations + * @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.VMwareCloudSimple/operations", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableOperationsListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/operationResults/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.referer, + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationResource, + headersMapper: Mappers.OperationsGetHeaders + }, + 202: { + headersMapper: Mappers.OperationsGetHeaders + }, + 204: { + headersMapper: Mappers.OperationsGetHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AvailableOperationsListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/privateClouds.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/privateClouds.ts new file mode 100644 index 000000000000..e59d8c62603c --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/privateClouds.ts @@ -0,0 +1,191 @@ +/* + * 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/privateCloudsMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a PrivateClouds. */ +export class PrivateClouds { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a PrivateClouds. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of private clouds in particular region + * @summary Implements private cloud list GET method + * @param regionId The region Id (westus, eastus) + * @param [options] The optional parameters + * @returns Promise + */ + list(regionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param callback The callback + */ + list(regionId: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param options The optional parameters + * @param callback The callback + */ + list(regionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(regionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns private cloud by its name + * @summary Implements private cloud GET method + * @param pcName The private cloud name + * @param regionId The region Id (westus, eastus) + * @param [options] The optional parameters + * @returns Promise + */ + get(pcName: string, regionId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param pcName The private cloud name + * @param regionId The region Id (westus, eastus) + * @param callback The callback + */ + get(pcName: string, regionId: string, callback: msRest.ServiceCallback): void; + /** + * @param pcName The private cloud name + * @param regionId The region Id (westus, eastus) + * @param options The optional parameters + * @param callback The callback + */ + get(pcName: string, regionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(pcName: string, regionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + pcName, + regionId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns list of private clouds in particular region + * @summary Implements private cloud list GET method + * @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: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloudList + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.pcName, + Parameters.regionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloud + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateCloudList + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/resourcePools.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/resourcePools.ts new file mode 100644 index 000000000000..23ec0d05f32f --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/resourcePools.ts @@ -0,0 +1,201 @@ +/* + * 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/resourcePoolsMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a ResourcePools. */ +export class ResourcePools { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a ResourcePools. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of resource pools in region for private cloud + * @summary Implements get of resource pools list + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param [options] The optional parameters + * @returns Promise + */ + list(regionId: string, pcName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param callback The callback + */ + list(regionId: string, pcName: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param options The optional parameters + * @param callback The callback + */ + list(regionId: string, pcName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(regionId: string, pcName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + pcName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns resource pool templates by its name + * @summary Implements get of resource pool + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param resourcePoolName resource pool id (vsphereId) + * @param [options] The optional parameters + * @returns Promise + */ + get(regionId: string, pcName: string, resourcePoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param resourcePoolName resource pool id (vsphereId) + * @param callback The callback + */ + get(regionId: string, pcName: string, resourcePoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param resourcePoolName resource pool id (vsphereId) + * @param options The optional parameters + * @param callback The callback + */ + get(regionId: string, pcName: string, resourcePoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regionId: string, pcName: string, resourcePoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + pcName, + resourcePoolName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns list of resource pools in region for private cloud + * @summary Implements get of resource pools list + * @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: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/resourcePools", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.pcName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ResourcePoolsListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/resourcePools/{resourcePoolName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.pcName, + Parameters.resourcePoolName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ResourcePool + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ResourcePoolsListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/skusAvailability.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/skusAvailability.ts new file mode 100644 index 000000000000..0c28b077c18b --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/skusAvailability.ts @@ -0,0 +1,134 @@ +/* + * 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/skusAvailabilityMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a SkusAvailability. */ +export class SkusAvailability { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a SkusAvailability. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of available resources in region + * @summary Implements SkuAvailability List method + * @param regionId The region Id (westus, eastus) + * @param [options] The optional parameters + * @returns Promise + */ + list(regionId: string, options?: Models.SkusAvailabilityListOptionalParams): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param callback The callback + */ + list(regionId: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param options The optional parameters + * @param callback The callback + */ + list(regionId: string, options: Models.SkusAvailabilityListOptionalParams, callback: msRest.ServiceCallback): void; + list(regionId: string, options?: Models.SkusAvailabilityListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns list of available resources in region + * @summary Implements SkuAvailability List method + * @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: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/availabilities", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId + ], + queryParameters: [ + Parameters.skuId, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SkuAvailabilityListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SkuAvailabilityListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/usages.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/usages.ts new file mode 100644 index 000000000000..271806e5dfed --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/usages.ts @@ -0,0 +1,134 @@ +/* + * 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/usagesMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a Usages. */ +export class Usages { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a Usages. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of usage in region + * @summary Implements Usages List method + * @param regionId The region Id (westus, eastus) + * @param [options] The optional parameters + * @returns Promise + */ + list(regionId: string, options?: Models.UsagesListOptionalParams): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param callback The callback + */ + list(regionId: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param options The optional parameters + * @param callback The callback + */ + list(regionId: string, options: Models.UsagesListOptionalParams, callback: msRest.ServiceCallback): void; + list(regionId: string, options?: Models.UsagesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns list of usage in region + * @summary Implements Usages List method + * @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: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/usages", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsageListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.UsageListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachineTemplates.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachineTemplates.ts new file mode 100644 index 000000000000..6d51cea9355d --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachineTemplates.ts @@ -0,0 +1,206 @@ +/* + * 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/virtualMachineTemplatesMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a VirtualMachineTemplates. */ +export class VirtualMachineTemplates { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a VirtualMachineTemplates. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of virtual machine templates in region for private cloud + * @summary Implements list of available VM templates + * @param pcName The private cloud name + * @param regionId The region Id (westus, eastus) + * @param resourcePoolName Resource pool used to derive vSphere cluster which contains VM templates + * @param [options] The optional parameters + * @returns Promise + */ + list(pcName: string, regionId: string, resourcePoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param pcName The private cloud name + * @param regionId The region Id (westus, eastus) + * @param resourcePoolName Resource pool used to derive vSphere cluster which contains VM templates + * @param callback The callback + */ + list(pcName: string, regionId: string, resourcePoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param pcName The private cloud name + * @param regionId The region Id (westus, eastus) + * @param resourcePoolName Resource pool used to derive vSphere cluster which contains VM templates + * @param options The optional parameters + * @param callback The callback + */ + list(pcName: string, regionId: string, resourcePoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(pcName: string, regionId: string, resourcePoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + pcName, + regionId, + resourcePoolName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns virtual machine templates by its name + * @summary Implements virtual machine template GET method + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param virtualMachineTemplateName virtual machine template id (vsphereId) + * @param [options] The optional parameters + * @returns Promise + */ + get(regionId: string, pcName: string, virtualMachineTemplateName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param virtualMachineTemplateName virtual machine template id (vsphereId) + * @param callback The callback + */ + get(regionId: string, pcName: string, virtualMachineTemplateName: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param virtualMachineTemplateName virtual machine template id (vsphereId) + * @param options The optional parameters + * @param callback The callback + */ + get(regionId: string, pcName: string, virtualMachineTemplateName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regionId: string, pcName: string, virtualMachineTemplateName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + pcName, + virtualMachineTemplateName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns list of virtual machine templates in region for private cloud + * @summary Implements list of available VM templates + * @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: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualMachineTemplates", + urlParameters: [ + Parameters.subscriptionId, + Parameters.pcName, + Parameters.regionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.resourcePoolName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineTemplateListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualMachineTemplates/{virtualMachineTemplateName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.pcName, + Parameters.virtualMachineTemplateName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineTemplate + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineTemplateListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachines.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachines.ts new file mode 100644 index 000000000000..7f5eae012574 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualMachines.ts @@ -0,0 +1,631 @@ +/* + * 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/virtualMachinesMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a VirtualMachines. */ +export class VirtualMachines { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a VirtualMachines. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list virtual machine within subscription + * @summary Implements list virtual machine within subscription method + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: Models.VirtualMachinesListBySubscriptionOptionalParams): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: Models.VirtualMachinesListBySubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + listBySubscription(options?: Models.VirtualMachinesListBySubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Returns list of virtual machine within resource group + * @summary Implements list virtual machine within RG method + * @param resourceGroupName The name of the resource group + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: Models.VirtualMachinesListByResourceGroupOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: Models.VirtualMachinesListByResourceGroupOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: Models.VirtualMachinesListByResourceGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Get virtual machine + * @summary Implements virtual machine GET method + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param callback The callback + */ + get(resourceGroupName: string, virtualMachineName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, virtualMachineName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + virtualMachineName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Create Or Update Virtual Machine + * @summary Implements virtual machine PUT method + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param virtualMachineRequest Create or Update Virtual Machine request + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, virtualMachineName: string, virtualMachineRequest: Models.VirtualMachine, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,virtualMachineName,virtualMachineRequest,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete virtual machine + * @summary Implements virtual machine DELETE method + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Patch virtual machine properties + * @summary Implements virtual machine PATCH method + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesUpdateOptionalParams): Promise { + return this.beginUpdate(resourceGroupName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Power on virtual machine + * @summary Implements a start method for a virtual machine + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginStart(resourceGroupName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Power off virtual machine, options: shutdown, poweroff, and suspend + * @summary Implements shutdown, poweroff, and suspend method for a virtual machine + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + stop(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesStopOptionalParams): Promise { + return this.beginStop(resourceGroupName,virtualMachineName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Create Or Update Virtual Machine + * @summary Implements virtual machine PUT method + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param virtualMachineRequest Create or Update Virtual Machine request + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, virtualMachineName: string, virtualMachineRequest: Models.VirtualMachine, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualMachineName, + virtualMachineRequest, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Delete virtual machine + * @summary Implements virtual machine DELETE method + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualMachineName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Patch virtual machine properties + * @summary Implements virtual machine PATCH method + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdate(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesBeginUpdateOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualMachineName, + options + }, + beginUpdateOperationSpec, + options); + } + + /** + * Power on virtual machine + * @summary Implements a start method for a virtual machine + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + beginStart(resourceGroupName: string, virtualMachineName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualMachineName, + options + }, + beginStartOperationSpec, + options); + } + + /** + * Power off virtual machine, options: shutdown, poweroff, and suspend + * @summary Implements shutdown, poweroff, and suspend method for a virtual machine + * @param resourceGroupName The name of the resource group + * @param virtualMachineName virtual machine name + * @param [options] The optional parameters + * @returns Promise + */ + beginStop(resourceGroupName: string, virtualMachineName: string, options?: Models.VirtualMachinesBeginStopOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + virtualMachineName, + options + }, + beginStopOperationSpec, + options); + } + + /** + * Returns list virtual machine within subscription + * @summary Implements list virtual machine within subscription method + * @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; + } + + /** + * Returns list of virtual machine within resource group + * @summary Implements list virtual machine within RG method + * @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.VMwareCloudSimple/virtualMachines", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.top, + Parameters.skipToken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualMachineName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachine + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualMachineName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.referer, + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "virtualMachineRequest", + mapper: { + ...Mappers.VirtualMachine, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualMachine, + headersMapper: Mappers.VirtualMachinesCreateOrUpdateHeaders + }, + 201: { + bodyMapper: Mappers.VirtualMachine, + headersMapper: Mappers.VirtualMachinesCreateOrUpdateHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualMachineName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.referer, + Parameters.acceptLanguage + ], + responses: { + 202: { + headersMapper: Mappers.VirtualMachinesDeleteHeaders + }, + 204: { + headersMapper: Mappers.VirtualMachinesDeleteHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const beginUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualMachineName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: { + ...Mappers.PatchPayload, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.VirtualMachine + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const beginStartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualMachineName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.referer, + Parameters.acceptLanguage + ], + responses: { + 200: { + headersMapper: Mappers.VirtualMachinesStartHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachinesStartHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const beginStopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.virtualMachineName0 + ], + queryParameters: [ + Parameters.mode, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.referer, + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + mode: [ + "options", + "mode1" + ] + }, + mapper: Mappers.VirtualMachineStopMode + }, + responses: { + 200: { + headersMapper: Mappers.VirtualMachinesStopHeaders + }, + 202: { + headersMapper: Mappers.VirtualMachinesStopHeaders + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualMachineListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualNetworks.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualNetworks.ts new file mode 100644 index 000000000000..a5c0dd290944 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/virtualNetworks.ts @@ -0,0 +1,209 @@ +/* + * 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/virtualNetworksMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a VirtualNetworks. */ +export class VirtualNetworks { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a VirtualNetworks. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Return list of virtual networks in location for private cloud + * @summary Implements list available virtual networks within a subscription method + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param resourcePoolName Resource pool used to derive vSphere cluster which contains virtual + * networks + * @param [options] The optional parameters + * @returns Promise + */ + list(regionId: string, pcName: string, resourcePoolName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param resourcePoolName Resource pool used to derive vSphere cluster which contains virtual + * networks + * @param callback The callback + */ + list(regionId: string, pcName: string, resourcePoolName: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param resourcePoolName Resource pool used to derive vSphere cluster which contains virtual + * networks + * @param options The optional parameters + * @param callback The callback + */ + list(regionId: string, pcName: string, resourcePoolName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(regionId: string, pcName: string, resourcePoolName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + pcName, + resourcePoolName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Return virtual network by its name + * @summary Implements virtual network GET method + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param virtualNetworkName virtual network id (vsphereId) + * @param [options] The optional parameters + * @returns Promise + */ + get(regionId: string, pcName: string, virtualNetworkName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param virtualNetworkName virtual network id (vsphereId) + * @param callback The callback + */ + get(regionId: string, pcName: string, virtualNetworkName: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param virtualNetworkName virtual network id (vsphereId) + * @param options The optional parameters + * @param callback The callback + */ + get(regionId: string, pcName: string, virtualNetworkName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regionId: string, pcName: string, virtualNetworkName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + pcName, + virtualNetworkName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Return list of virtual networks in location for private cloud + * @summary Implements list available virtual networks within a subscription method + * @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: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.pcName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.resourcePoolName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/virtualNetworks/{virtualNetworkName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.pcName, + Parameters.virtualNetworkName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetwork + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts new file mode 100644 index 000000000000..dfebce6d20b3 --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts @@ -0,0 +1,61 @@ +/* + * 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 { VMwareCloudSimpleClientContext } from "./vMwareCloudSimpleClientContext"; + + +class VMwareCloudSimpleClient extends VMwareCloudSimpleClientContext { + // Operation groups + operations: operations.Operations; + dedicatedCloudNodes: operations.DedicatedCloudNodes; + dedicatedCloudServices: operations.DedicatedCloudServices; + skusAvailability: operations.SkusAvailability; + privateClouds: operations.PrivateClouds; + resourcePools: operations.ResourcePools; + virtualMachineTemplates: operations.VirtualMachineTemplates; + virtualNetworks: operations.VirtualNetworks; + usages: operations.Usages; + virtualMachines: operations.VirtualMachines; + + /** + * Initializes a new instance of the VMwareCloudSimpleClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription ID. + * @param referer referer url + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, referer: string, options?: Models.VMwareCloudSimpleClientOptions) { + super(credentials, subscriptionId, referer, options); + this.operations = new operations.Operations(this); + this.dedicatedCloudNodes = new operations.DedicatedCloudNodes(this); + this.dedicatedCloudServices = new operations.DedicatedCloudServices(this); + this.skusAvailability = new operations.SkusAvailability(this); + this.privateClouds = new operations.PrivateClouds(this); + this.resourcePools = new operations.ResourcePools(this); + this.virtualMachineTemplates = new operations.VirtualMachineTemplates(this); + this.virtualNetworks = new operations.VirtualNetworks(this); + this.usages = new operations.Usages(this); + this.virtualMachines = new operations.VirtualMachines(this); + } +} + +// Operation Specifications + +export { + VMwareCloudSimpleClient, + VMwareCloudSimpleClientContext, + Models as VMwareCloudSimpleModels, + Mappers as VMwareCloudSimpleMappers +}; +export * from "./operations"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts new file mode 100644 index 000000000000..4110fc980a0a --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClientContext.ts @@ -0,0 +1,68 @@ +/* + * 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-vmwarecloudsimple"; +const packageVersion = "1.0.0"; + +export class VMwareCloudSimpleClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + apiVersion?: string; + referer: string; + + /** + * Initializes a new instance of the VMwareCloudSimpleClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The subscription ID. + * @param referer referer url + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, referer: string, options?: Models.VMwareCloudSimpleClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + if (referer == undefined) { + throw new Error('\'referer\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2019-04-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; + this.referer = referer; + + 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/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/tsconfig.json b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/tsconfig.json new file mode 100644 index 000000000000..422b584abd5e --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/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", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true + }, + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] +}