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

Commit

Permalink
update node sdk for batch management to match swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
xingwu1 committed Sep 28, 2016
1 parent 8b76350 commit b46fc50
Show file tree
Hide file tree
Showing 32 changed files with 1,152 additions and 1,393 deletions.
7 changes: 4 additions & 3 deletions lib/services/batchManagement/lib/batchManagementClient.d.ts
Expand Up @@ -17,7 +17,7 @@ declare class BatchManagementClient {
* Initializes a new instance of the BatchManagementClient class.
* @constructor
*
* @param {credentials} credentials - Gets Azure subscription credentials.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - A unique identifier of a Microsoft Azure subscription. The subscription id forms part of the URI for every service call.
*
Expand Down Expand Up @@ -56,9 +56,10 @@ declare class BatchManagementClient {
generateClientRequestId: boolean;

// Operation groups
account: operations.Account;
batchAccountOperations: operations.BatchAccountOperations;
applicationPackageOperations: operations.ApplicationPackageOperations;
applicationOperations: operations.ApplicationOperations;
subscription: operations.Subscription;
location: operations.Location;
}

export = BatchManagementClient;
7 changes: 4 additions & 3 deletions lib/services/batchManagement/lib/batchManagementClient.js
Expand Up @@ -27,7 +27,7 @@ var operations = require('./operations');
* Initializes a new instance of the BatchManagementClient class.
* @constructor
*
* @param {credentials} credentials - Gets Azure subscription credentials.
* @param {credentials} credentials - Credentials needed for the client to connect to Azure.
*
* @param {string} subscriptionId - A unique identifier of a Microsoft Azure subscription. The subscription id forms part of the URI for every service call.
*
Expand Down Expand Up @@ -85,9 +85,10 @@ function BatchManagementClient(credentials, subscriptionId, baseUri, options) {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.account = new operations.Account(this);
this.batchAccountOperations = new operations.BatchAccountOperations(this);
this.applicationPackageOperations = new operations.ApplicationPackageOperations(this);
this.applicationOperations = new operations.ApplicationOperations(this);
this.subscription = new operations.Subscription(this);
this.location = new operations.Location(this);
this.models = models;
msRest.addSerializationMixin(this);
}
Expand Down
56 changes: 0 additions & 56 deletions lib/services/batchManagement/lib/models/accountBaseProperties.js

This file was deleted.

Expand Up @@ -15,6 +15,7 @@
* Initializes a new instance of the ActivateApplicationPackageParameters class.
* @constructor
* Parameters for an ApplicationOperations.ActivateApplicationPackage request.
*
* @member {string} format The format of the application package binary file.
*
*/
Expand Down

This file was deleted.

Expand Up @@ -15,6 +15,7 @@
* Initializes a new instance of the AddApplicationParameters class.
* @constructor
* Parameters for an ApplicationOperations.AddApplication request.
*
* @member {boolean} [allowUpdates] A value indicating whether packages within
* the application may be overwritten using the same version string.
*
Expand Down
1 change: 1 addition & 0 deletions lib/services/batchManagement/lib/models/application.js
Expand Up @@ -19,6 +19,7 @@ var util = require('util');
* Initializes a new instance of the Application class.
* @constructor
* Contains information about an application in a Batch account.
*
* @member {string} [id] A string that uniquely identifies the application
* within the account.
*
Expand Down
35 changes: 33 additions & 2 deletions lib/services/batchManagement/lib/models/applicationPackage.js
Expand Up @@ -14,14 +14,24 @@
* @class
* Initializes a new instance of the ApplicationPackage class.
* @constructor
* Contains information about an application package.
* An application package which represents a particular version of an
* application.
*
* @member {string} [id] The id of the application.
*
* @member {string} [version] The version of the application package.
*
* @member {string} [state] The current state of the application package.
* Possible values include: 'pending', 'active', 'unmapped'
*
* @member {string} [format] The format of the application package, if the
* package has been activated.
* package is active.
*
* @member {string} [storageUrl] The storage URL at which the application
* package is stored.
*
* @member {date} [storageUrlExpiry] The UTC time at which the storage URL
* will expire.
*
* @member {date} [lastActivationTime] The time at which the package was last
* activated, if the package is active.
Expand All @@ -44,6 +54,13 @@ ApplicationPackage.prototype.mapper = function () {
name: 'Composite',
className: 'ApplicationPackage',
modelProperties: {
id: {
required: false,
serializedName: 'id',
type: {
name: 'String'
}
},
version: {
required: false,
serializedName: 'version',
Expand All @@ -66,6 +83,20 @@ ApplicationPackage.prototype.mapper = function () {
name: 'String'
}
},
storageUrl: {
required: false,
serializedName: 'storageUrl',
type: {
name: 'String'
}
},
storageUrlExpiry: {
required: false,
serializedName: 'storageUrlExpiry',
type: {
name: 'DateTime'
}
},
lastActivationTime: {
required: false,
serializedName: 'lastActivationTime',
Expand Down
Expand Up @@ -15,6 +15,7 @@
* Initializes a new instance of the AutoStorageBaseProperties class.
* @constructor
* The properties related to auto storage account.
*
* @member {string} storageAccountId The resource id of the storage account to
* be used for auto storage account.
*
Expand Down
Expand Up @@ -16,6 +16,7 @@
* @constructor
* Contains information about the auto storage account associated with a Batch
* account.
*
* @member {string} storageAccountId The resource id of the storage account to
* be used for auto storage account.
*
Expand Down
Expand Up @@ -16,9 +16,10 @@ var util = require('util');

/**
* @class
* Initializes a new instance of the AccountResource class.
* Initializes a new instance of the BatchAccount class.
* @constructor
* Contains information about an Azure Batch account.
*
* @member {string} [accountEndpoint] The endpoint used by this account to
* interact with the Batch services.
*
Expand All @@ -43,25 +44,25 @@ var util = require('util');
* schedule quota for this Batch account.
*
*/
function AccountResource() {
AccountResource['super_'].call(this);
function BatchAccount() {
BatchAccount['super_'].call(this);
}

util.inherits(AccountResource, models['Resource']);
util.inherits(BatchAccount, models['Resource']);

/**
* Defines the metadata of AccountResource
* Defines the metadata of BatchAccount
*
* @returns {object} metadata of AccountResource
* @returns {object} metadata of BatchAccount
*
*/
AccountResource.prototype.mapper = function () {
BatchAccount.prototype.mapper = function () {
return {
required: false,
serializedName: 'AccountResource',
serializedName: 'BatchAccount',
type: {
name: 'Composite',
className: 'AccountResource',
className: 'BatchAccount',
modelProperties: {
id: {
required: false,
Expand Down Expand Up @@ -110,6 +111,7 @@ AccountResource.prototype.mapper = function () {
},
accountEndpoint: {
required: false,
readOnly: true,
serializedName: 'properties.accountEndpoint',
type: {
name: 'String'
Expand Down Expand Up @@ -157,4 +159,4 @@ AccountResource.prototype.mapper = function () {
};
};

module.exports = AccountResource;
module.exports = BatchAccount;
Expand Up @@ -17,7 +17,8 @@ var models = require('./index');
* Initializes a new instance of the BatchAccountCreateParameters class.
* @constructor
* Parameters supplied to the Create operation.
* @member {string} [location] The region in which the account is created.
*
* @member {string} location The region in which to create the account.
*
* @member {object} [tags] The user specified tags associated with the account.
*
Expand Down Expand Up @@ -46,7 +47,7 @@ BatchAccountCreateParameters.prototype.mapper = function () {
className: 'BatchAccountCreateParameters',
modelProperties: {
location: {
required: false,
required: true,
serializedName: 'location',
type: {
name: 'String'
Expand Down

0 comments on commit b46fc50

Please sign in to comment.