diff --git a/lib/services/batchaiManagement/lib/models/index.d.ts b/lib/services/batchaiManagement/lib/models/index.d.ts index ada734f931..e64693f7db 100644 --- a/lib/services/batchaiManagement/lib/models/index.d.ts +++ b/lib/services/batchaiManagement/lib/models/index.d.ts @@ -1476,7 +1476,7 @@ export interface JobBasePropertiesConstraints { * Parameters supplied to the Create operation. * * @member {string} [schedulingPriority] Scheduling priority associated with - * the job. Scheduling priority associated with the job. Possible values + * the job. Scheduling priority associated with the job. Possible values * include: 'low', 'normal', 'high'. Default value: 'normal' . * @member {object} cluster Specifies the Id of the cluster on which this job * will run. diff --git a/lib/services/batchaiManagement/lib/models/jobCreateParameters.js b/lib/services/batchaiManagement/lib/models/jobCreateParameters.js index 5d1b554d5e..4f6a76fc50 100644 --- a/lib/services/batchaiManagement/lib/models/jobCreateParameters.js +++ b/lib/services/batchaiManagement/lib/models/jobCreateParameters.js @@ -20,7 +20,7 @@ class JobCreateParameters { /** * Create a JobCreateParameters. * @member {string} [schedulingPriority] Scheduling priority associated with - * the job. Scheduling priority associated with the job. Possible values + * the job. Scheduling priority associated with the job. Possible values * include: 'low', 'normal', 'high'. Default value: 'normal' . * @member {object} cluster Specifies the Id of the cluster on which this job * will run. diff --git a/lib/services/batchaiManagement/lib/operations/experiments.js b/lib/services/batchaiManagement/lib/operations/experiments.js index cd01d6ecd2..b8c5055d0b 100644 --- a/lib/services/batchaiManagement/lib/operations/experiments.js +++ b/lib/services/batchaiManagement/lib/operations/experiments.js @@ -220,9 +220,6 @@ function _listByWorkspace(resourceGroupName, workspaceName, options, callback) { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -241,7 +238,7 @@ function _listByWorkspace(resourceGroupName, workspaceName, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _create(resourceGroupName, workspaceName, experimentName, parameters, options, callback) { +function _create(resourceGroupName, workspaceName, experimentName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -254,7 +251,7 @@ function _create(resourceGroupName, workspaceName, experimentName, parameters, o } // Send request - this.beginCreate(resourceGroupName, workspaceName, experimentName, parameters, options, (err, parsedResult, httpRequest, response) => { + this.beginCreate(resourceGroupName, workspaceName, experimentName, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); let initialResult = new msRest.HttpOperationResponse(); @@ -567,9 +564,6 @@ function _get(resourceGroupName, workspaceName, experimentName, options, callbac * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -588,7 +582,7 @@ function _get(resourceGroupName, workspaceName, experimentName, options, callbac * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginCreate(resourceGroupName, workspaceName, experimentName, parameters, options, callback) { +function _beginCreate(resourceGroupName, workspaceName, experimentName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -643,9 +637,6 @@ function _beginCreate(resourceGroupName, workspaceName, experimentName, paramete throw new Error('"experimentName" should satisfy the constraint - "Pattern": /^[-\w_]+$/'); } } - if (parameters === null || parameters === undefined || typeof parameters !== 'object') { - throw new Error('parameters cannot be null or undefined and it must be of type object.'); - } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -692,27 +683,7 @@ function _beginCreate(resourceGroupName, workspaceName, experimentName, paramete } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (parameters !== null && parameters !== undefined) { - let requestModelMapper = { - required: true, - serializedName: 'parameters', - type: { - name: 'Object' - } - }; - requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(parameters, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1205,9 +1176,6 @@ class Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1219,11 +1187,11 @@ class Experiments { * * @reject {Error} - The error object. */ - createWithHttpOperationResponse(resourceGroupName, workspaceName, experimentName, parameters, options) { + createWithHttpOperationResponse(resourceGroupName, workspaceName, experimentName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._create(resourceGroupName, workspaceName, experimentName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, workspaceName, experimentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1247,9 +1215,6 @@ class Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1277,7 +1242,7 @@ class Experiments { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName, workspaceName, experimentName, parameters, options, optionalCallback) { + create(resourceGroupName, workspaceName, experimentName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1286,14 +1251,14 @@ class Experiments { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._create(resourceGroupName, workspaceName, experimentName, parameters, options, (err, result, request, response) => { + self._create(resourceGroupName, workspaceName, experimentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._create(resourceGroupName, workspaceName, experimentName, parameters, options, optionalCallback); + return self._create(resourceGroupName, workspaceName, experimentName, options, optionalCallback); } } @@ -1510,9 +1475,6 @@ class Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1524,11 +1486,11 @@ class Experiments { * * @reject {Error} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName, workspaceName, experimentName, parameters, options) { + beginCreateWithHttpOperationResponse(resourceGroupName, workspaceName, experimentName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginCreate(resourceGroupName, workspaceName, experimentName, parameters, options, (err, result, request, response) => { + self._beginCreate(resourceGroupName, workspaceName, experimentName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1552,9 +1514,6 @@ class Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1582,7 +1541,7 @@ class Experiments { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreate(resourceGroupName, workspaceName, experimentName, parameters, options, optionalCallback) { + beginCreate(resourceGroupName, workspaceName, experimentName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1591,14 +1550,14 @@ class Experiments { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreate(resourceGroupName, workspaceName, experimentName, parameters, options, (err, result, request, response) => { + self._beginCreate(resourceGroupName, workspaceName, experimentName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreate(resourceGroupName, workspaceName, experimentName, parameters, options, optionalCallback); + return self._beginCreate(resourceGroupName, workspaceName, experimentName, options, optionalCallback); } } diff --git a/lib/services/batchaiManagement/lib/operations/index.d.ts b/lib/services/batchaiManagement/lib/operations/index.d.ts index 1151e1a080..8474bffd5d 100644 --- a/lib/services/batchaiManagement/lib/operations/index.d.ts +++ b/lib/services/batchaiManagement/lib/operations/index.d.ts @@ -3717,9 +3717,6 @@ export interface Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3731,7 +3728,7 @@ export interface Experiments { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates an Experiment. @@ -3747,9 +3744,6 @@ export interface Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3777,9 +3771,9 @@ export interface Experiments { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, callback: ServiceCallback): void; - create(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, workspaceName: string, experimentName: string, callback: ServiceCallback): void; + create(resourceGroupName: string, workspaceName: string, experimentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3941,9 +3935,6 @@ export interface Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3955,7 +3946,7 @@ export interface Experiments { * * @reject {Error|ServiceError} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates an Experiment. @@ -3971,9 +3962,6 @@ export interface Experiments { * can only contain a combination of alphanumeric characters along with dash * (-) and underscore (_). The name must be from 1 through 64 characters long. * - * @param {object} parameters The parameters to provide for the experiment - * creation. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4001,9 +3989,9 @@ export interface Experiments { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4253,7 +4241,7 @@ export interface Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -4557,7 +4545,7 @@ export interface Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -5334,7 +5322,7 @@ export interface Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -5638,7 +5626,7 @@ export interface Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which diff --git a/lib/services/batchaiManagement/lib/operations/jobs.js b/lib/services/batchaiManagement/lib/operations/jobs.js index 419d327b55..8c1e523aeb 100644 --- a/lib/services/batchaiManagement/lib/operations/jobs.js +++ b/lib/services/batchaiManagement/lib/operations/jobs.js @@ -250,7 +250,7 @@ function _listByExperiment(resourceGroupName, workspaceName, experimentName, opt * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -1470,7 +1470,7 @@ function _terminate(resourceGroupName, workspaceName, experimentName, jobName, o * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -2885,7 +2885,7 @@ class Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -3201,7 +3201,7 @@ class Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -4128,7 +4128,7 @@ class Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which @@ -4444,7 +4444,7 @@ class Jobs { * @param {object} parameters The parameters to provide for job creation. * * @param {string} [parameters.schedulingPriority] Scheduling priority - * associated with the job. Scheduling priority associated with the job. + * associated with the job. Scheduling priority associated with the job. * Possible values include: 'low', 'normal', 'high' * * @param {object} parameters.cluster Specifies the Id of the cluster on which diff --git a/lib/services/batchaiManagement/package.json b/lib/services/batchaiManagement/package.json index 60bef2541c..789102563a 100644 --- a/lib/services/batchaiManagement/package.json +++ b/lib/services/batchaiManagement/package.json @@ -4,10 +4,13 @@ "description": "BatchAIManagementClient Library with typescript type definitions for node", "version": "2.0.0", "dependencies": { - "ms-rest": "^2.3.2", + "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" }, - "keywords": [ "node", "azure" ], + "keywords": [ + "node", + "azure" + ], "license": "MIT", "main": "./lib/batchAIManagementClient.js", "types": "./lib/batchAIManagementClient.d.ts",