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
24 changes: 12 additions & 12 deletions lib/services/automationManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4840,7 +4840,7 @@ export interface RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand All @@ -4853,7 +4853,7 @@ export interface RunbookDraftOperations {
*
* @reject {Error|ServiceError} - The error object.
*/
replaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<stream.Readable>>;
replaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<stream.Readable>>;

/**
* Replaces the runbook draft content.
Expand All @@ -4864,7 +4864,7 @@ export interface RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -4892,9 +4892,9 @@ export interface RunbookDraftOperations {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<stream.Readable>;
replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback<stream.Readable>): void;
replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<stream.Readable>): void;
replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<stream.Readable>;
replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, callback: ServiceCallback<stream.Readable>): void;
replaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<stream.Readable>): void;


/**
Expand Down Expand Up @@ -5097,7 +5097,7 @@ export interface RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand All @@ -5110,7 +5110,7 @@ export interface RunbookDraftOperations {
*
* @reject {Error|ServiceError} - The error object.
*/
beginReplaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<stream.Readable>>;
beginReplaceContentWithHttpOperationResponse(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<stream.Readable>>;

/**
* Replaces the runbook draft content.
Expand All @@ -5121,7 +5121,7 @@ export interface RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -5149,9 +5149,9 @@ export interface RunbookDraftOperations {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<stream.Readable>;
beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, callback: ServiceCallback<stream.Readable>): void;
beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<stream.Readable>): void;
beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<stream.Readable>;
beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, callback: ServiceCallback<stream.Readable>): void;
beginReplaceContent(resourceGroupName: string, automationAccountName: string, runbookName: string, runbookContent: stream.Readable, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<stream.Readable>): void;


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function _getContent(resourceGroupName, automationAccountName, runbookName, opti
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -651,7 +651,7 @@ function _undoEdit(resourceGroupName, automationAccountName, runbookName, option
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -709,8 +709,8 @@ function _beginReplaceContent(resourceGroupName, automationAccountName, runbookN
if (runbookName === null || runbookName === undefined || typeof runbookName.valueOf() !== 'string') {
throw new Error('runbookName cannot be null or undefined and it must be of type string.');
}
if (runbookContent === null || runbookContent === undefined || typeof runbookContent.valueOf() !== 'string') {
throw new Error('runbookContent cannot be null or undefined and it must be of type string.');
if (runbookContent === null || runbookContent === undefined) {
throw new Error('runbookContent cannot be null or undefined and it must be of type object.');
}
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
throw new Error('this.client.acceptLanguage must be of type string.');
Expand Down Expand Up @@ -753,25 +753,7 @@ function _beginReplaceContent(resourceGroupName, automationAccountName, runbookN
}
}
// Serialize Request
let requestContent = null;
let requestModel = null;
try {
if (runbookContent !== null && runbookContent !== undefined) {
let requestModelMapper = {
required: true,
serializedName: 'runbookContent',
type: {
name: 'String'
}
};
requestModel = client.serialize(requestModelMapper, runbookContent, 'runbookContent');
requestContent = JSON.stringify(requestModel);
}
} catch (error) {
let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` +
`payload - ${JSON.stringify(runbookContent, null, 2)}.`);
return callback(serializationError);
}
let requestContent = runbookContent;
httpRequest.body = requestContent;
// Send Request
httpRequest.streamedResponse = true;
Expand Down Expand Up @@ -1076,7 +1058,7 @@ class RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -1112,7 +1094,7 @@ class RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -1441,7 +1423,7 @@ class RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down Expand Up @@ -1477,7 +1459,7 @@ class RunbookDraftOperations {
*
* @param {string} runbookName The runbook name.
*
* @param {string} runbookContent The runbook draft content.
* @param {object} runbookContent The runbook draft content.
*
* @param {object} [options] Optional Parameters.
*
Expand Down