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

[AutoPR edgegateway/resource-manager] Swagger and examples for Microsoft.DataBoxEdge RP #4499

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions lib/services/edgegatewayManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
* 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 DataBoxEdgeManagementClient extends AzureServiceClient {
/**
* Initializes a new instance of the DataBoxEdgeManagementClient class.
* @constructor
*
* @class
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - The subscription ID.
*
* @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
operations: operations.Operations;
devices: operations.Devices;
alerts: operations.Alerts;
bandwidthSchedules: operations.BandwidthSchedules;
operationsStatus: operations.OperationsStatus;
orders: operations.Orders;
roles: operations.Roles;
shares: operations.Shares;
storageAccountCredentials: operations.StorageAccountCredentials;
triggers: operations.Triggers;
users: operations.Users;
}

export { DataBoxEdgeManagementClient, models as DataBoxEdgeManagementModels };
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

/* 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 DataBoxEdgeManagementClient. */
class DataBoxEdgeManagementClient extends ServiceClient {
/**
* Create a DataBoxEdgeManagementClient.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
* @param {string} subscriptionId - The subscription ID.
* @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-01';
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.operations = new operations.Operations(this);
this.devices = new operations.Devices(this);
this.alerts = new operations.Alerts(this);
this.bandwidthSchedules = new operations.BandwidthSchedules(this);
this.operationsStatus = new operations.OperationsStatus(this);
this.orders = new operations.Orders(this);
this.roles = new operations.Roles(this);
this.shares = new operations.Shares(this);
this.storageAccountCredentials = new operations.StorageAccountCredentials(this);
this.triggers = new operations.Triggers(this);
this.users = new operations.Users(this);
this.models = models;
msRest.addSerializationMixin(this);
}

}

module.exports = DataBoxEdgeManagementClient;
module.exports['default'] = DataBoxEdgeManagementClient;
module.exports.DataBoxEdgeManagementClient = DataBoxEdgeManagementClient;
module.exports.DataBoxEdgeManagementModels = models;
75 changes: 75 additions & 0 deletions lib/services/edgegatewayManagement/lib/models/aRMBaseModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* 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';

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

/**
* Represents the base class for all object models.
*
* @extends models['BaseResource']
*/
class ARMBaseModel extends models['BaseResource'] {
/**
* Create a ARMBaseModel.
* @property {string} [id] The path ID that uniquely identifies the object.
* @property {string} [name] The name of the object.
* @property {string} [type] The hierarchical type of the object.
*/
constructor() {
super();
}

/**
* Defines the metadata of ARMBaseModel
*
* @returns {object} metadata of ARMBaseModel
*
*/
mapper() {
return {
required: false,
serializedName: 'ARMBaseModel',
type: {
name: 'Composite',
className: 'ARMBaseModel',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ARMBaseModel;
100 changes: 100 additions & 0 deletions lib/services/edgegatewayManagement/lib/models/address.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*
* 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';

/**
* The shipping address of the customer.
*
*/
class Address {
/**
* Create a Address.
* @property {string} addressLine1 The address line1.
* @property {string} addressLine2 The address line2.
* @property {string} addressLine3 The address line3.
* @property {string} postalCode The postal code.
* @property {string} city The city name.
* @property {string} state The state name.
* @property {string} country The country name.
*/
constructor() {
}

/**
* Defines the metadata of Address
*
* @returns {object} metadata of Address
*
*/
mapper() {
return {
required: false,
serializedName: 'Address',
type: {
name: 'Composite',
className: 'Address',
modelProperties: {
addressLine1: {
required: true,
serializedName: 'addressLine1',
type: {
name: 'String'
}
},
addressLine2: {
required: true,
serializedName: 'addressLine2',
type: {
name: 'String'
}
},
addressLine3: {
required: true,
serializedName: 'addressLine3',
type: {
name: 'String'
}
},
postalCode: {
required: true,
serializedName: 'postalCode',
type: {
name: 'String'
}
},
city: {
required: true,
serializedName: 'city',
type: {
name: 'String'
}
},
state: {
required: true,
serializedName: 'state',
type: {
name: 'String'
}
},
country: {
required: true,
serializedName: 'country',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = Address;
Loading