Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Generated from 5d5ddf88a2234f1ae59a8d3d4d5aadc3423e58f9 (#4026)
Browse files Browse the repository at this point in the history
Fix Version value to fix Ruby SDK Generation
  • Loading branch information
AutorestCI authored Nov 5, 2018
1 parent 54515da commit 491c0b1
Show file tree
Hide file tree
Showing 214 changed files with 43,584 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/services/datamigrationManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 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.
40 changes: 40 additions & 0 deletions lib/services/datamigrationManagement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
uid: azure-arm-datamigration
summary: *content

---
# Microsoft Azure SDK for Node.js - DataMigrationServiceClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- **Node.js version 6.x.x or higher**

## Features


## How to Install

```bash
npm install azure-arm-datamigration
```

## How to use

### Authentication, client creation and listSkus resourceSkus as an example.

```javascript
const msRestAzure = require("ms-rest-azure");
const DataMigrationServiceClient = require("azure-arm-datamigration");
msRestAzure.interactiveLogin().then((creds) => {
const subscriptionId = "<Subscription_Id>";
const client = new DataMigrationServiceClient(creds, subscriptionId);
return client.resourceSkus.listSkus().then((result) => {
console.log("The result is:");
console.log(result);
});
}).catch((err) => {
console.log('An error occurred:');
console.dir(err, {depth: null, colors: true});
});

## Related projects

- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node)
Original file line number Diff line number Diff line change
@@ -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 { ServiceClientCredentials } from 'ms-rest';
import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure';
import * as models from "./models";
import * as operations from "./operations";

export default class DataMigrationServiceClient extends AzureServiceClient {
/**
* Initializes a new instance of the DataMigrationServiceClient class.
* @constructor
*
* @class
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - Identifier of the subscription
*
* @param {string} [baseUri] - The base URI of the service.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
*
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - The preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions);

credentials: ServiceClientCredentials;

apiVersion: string;

subscriptionId: string;

acceptLanguage: string;

longRunningOperationRetryTimeout: number;

generateClientRequestId: boolean;

// Operation groups
resourceSkus: operations.ResourceSkus;
services: operations.Services;
tasks: operations.Tasks;
projects: operations.Projects;
usages: operations.Usages;
operations: operations.Operations;
files: operations.Files;
}

export { DataMigrationServiceClient, models as DataMigrationServiceModels };
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* 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.
*/

/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */

'use strict';

const msRest = require('ms-rest');
const msRestAzure = require('ms-rest-azure');
const ServiceClient = msRestAzure.AzureServiceClient;

const models = require('./models');
const operations = require('./operations');


/** Class representing a DataMigrationServiceClient. */
class DataMigrationServiceClient extends ServiceClient {
/**
* Create a DataMigrationServiceClient.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* @param {string} subscriptionId - Identifier of the subscription
* @param {string} [baseUri] - The base URI of the service.
* @param {object} [options] - The parameter options
* @param {Array} [options.filters] - Filters to be added to the request pipeline
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.acceptLanguage] - The preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, subscriptionId, baseUri, options) {
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId === null || subscriptionId === undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}

if (!options) options = {};

super(credentials, options);

this.apiVersion = '2018-07-15-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.baseUri = baseUri;
if (!this.baseUri) {
this.baseUri = 'https://management.azure.com';
}
this.credentials = credentials;
this.subscriptionId = subscriptionId;

let packageInfo = this.getPackageJsonInfo(__dirname);
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.resourceSkus = new operations.ResourceSkus(this);
this.services = new operations.Services(this);
this.tasks = new operations.Tasks(this);
this.projects = new operations.Projects(this);
this.usages = new operations.Usages(this);
this.operations = new operations.Operations(this);
this.files = new operations.Files(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = DataMigrationServiceClient;
module.exports['default'] = DataMigrationServiceClient;
module.exports.DataMigrationServiceClient = DataMigrationServiceClient;
module.exports.DataMigrationServiceModels = models;
58 changes: 58 additions & 0 deletions lib/services/datamigrationManagement/lib/models/apiError.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* 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.
*/

'use strict';

/**
* Error information.
*
*/
class ApiError {
/**
* Create a ApiError.
* @member {object} [error] Error information in OData format
* @member {string} [error.code] The machine-readable description of the
* error, such as 'InvalidRequest' or 'InternalServerError'
* @member {string} [error.message] The human-readable description of the
* error
* @member {array} [error.details] Inner errors that caused this error
*/
constructor() {
}

/**
* Defines the metadata of ApiError
*
* @returns {object} metadata of ApiError
*
*/
mapper() {
return {
required: false,
serializedName: 'ApiError',
type: {
name: 'Composite',
className: 'ApiError',
modelProperties: {
error: {
required: false,
serializedName: 'error',
type: {
name: 'Composite',
className: 'ODataError'
}
}
}
}
};
}
}

module.exports = ApiError;
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* 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.
*/

'use strict';

/**
* Describes the available service SKU.
*
*/
class AvailableServiceSku {
/**
* Create a AvailableServiceSku.
* @member {string} [resourceType] The resource type, including the provider
* namespace
* @member {object} [sku] SKU name, tier, etc.
* @member {string} [sku.name] The name of the SKU
* @member {string} [sku.family] SKU family
* @member {string} [sku.size] SKU size
* @member {string} [sku.tier] The tier of the SKU, such as "Basic", "General
* Purpose", or "Business Critical"
* @member {object} [capacity] A description of the scaling capacities of the
* SKU
* @member {number} [capacity.minimum] The minimum capacity, usually 0 or 1.
* @member {number} [capacity.maximum] The maximum capacity
* @member {number} [capacity.default] The default capacity
* @member {string} [capacity.scaleType] The scalability approach. Possible
* values include: 'none', 'manual', 'automatic'
*/
constructor() {
}

/**
* Defines the metadata of AvailableServiceSku
*
* @returns {object} metadata of AvailableServiceSku
*
*/
mapper() {
return {
required: false,
serializedName: 'AvailableServiceSku',
type: {
name: 'Composite',
className: 'AvailableServiceSku',
modelProperties: {
resourceType: {
required: false,
serializedName: 'resourceType',
type: {
name: 'String'
}
},
sku: {
required: false,
serializedName: 'sku',
type: {
name: 'Composite',
className: 'AvailableServiceSkuSku'
}
},
capacity: {
required: false,
serializedName: 'capacity',
type: {
name: 'Composite',
className: 'AvailableServiceSkuCapacity'
}
}
}
}
};
}
}

module.exports = AvailableServiceSku;
Loading

0 comments on commit 491c0b1

Please sign in to comment.