Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
2 changes: 1 addition & 1 deletion lib/services/batchaiManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
69 changes: 14 additions & 55 deletions lib/services/batchaiManagement/lib/operations/experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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') {
Expand All @@ -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();
Expand Down Expand Up @@ -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
Expand All @@ -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') {
Expand Down Expand Up @@ -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.');
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand All @@ -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); }
Expand All @@ -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
Expand Down Expand Up @@ -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') {
Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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
Expand All @@ -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); }
Expand All @@ -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
Expand Down Expand Up @@ -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') {
Expand All @@ -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);
}
}

Expand Down
36 changes: 12 additions & 24 deletions lib/services/batchaiManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<HttpOperationResponse<models.Experiment>>;
createWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Experiment>>;

/**
* Creates an Experiment.
Expand All @@ -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
Expand Down Expand Up @@ -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<models.Experiment>;
create(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, callback: ServiceCallback<models.Experiment>): void;
create(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Experiment>): void;
create(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Experiment>;
create(resourceGroupName: string, workspaceName: string, experimentName: string, callback: ServiceCallback<models.Experiment>): void;
create(resourceGroupName: string, workspaceName: string, experimentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Experiment>): void;


/**
Expand Down Expand Up @@ -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
Expand All @@ -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<HttpOperationResponse<models.Experiment>>;
beginCreateWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.Experiment>>;

/**
* Creates an Experiment.
Expand All @@ -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
Expand Down Expand Up @@ -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<models.Experiment>;
beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, callback: ServiceCallback<models.Experiment>): void;
beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, parameters: any, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Experiment>): void;
beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.Experiment>;
beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, callback: ServiceCallback<models.Experiment>): void;
beginCreate(resourceGroupName: string, workspaceName: string, experimentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.Experiment>): void;


/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading