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

Commit

Permalink
Generated from 803aa2f0154403f9b82544013d0f108a5f0781d2
Browse files Browse the repository at this point in the history
  • Loading branch information
AutorestCI committed May 4, 2018
1 parent e23f7c9 commit 06e4155
Showing 1 changed file with 53 additions and 2 deletions.
55 changes: 53 additions & 2 deletions lib/services/websiteManagement2/lib/operations/webApps.js
Original file line number Diff line number Diff line change
Expand Up @@ -50853,7 +50853,7 @@ function _getSourceControl(resourceGroupName, name, options, callback) {
return callback(err);
}
let statusCode = response.statusCode;
if (statusCode !== 200) {
if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) {
let error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
Expand Down Expand Up @@ -50898,6 +50898,40 @@ function _getSourceControl(resourceGroupName, name, options, callback) {
return callback(deserializationError);
}
}
// Deserialize Response
if (statusCode === 201) {
let parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
let resultMapper = new client.models['SiteSourceControl']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
deserializationError1.request = msRest.stripRequest(httpRequest);
deserializationError1.response = msRest.stripResponse(response);
return callback(deserializationError1);
}
}
// Deserialize Response
if (statusCode === 202) {
let parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
let resultMapper = new client.models['SiteSourceControl']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
let deserializationError2 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
deserializationError2.request = msRest.stripRequest(httpRequest);
deserializationError2.response = msRest.stripResponse(response);
return callback(deserializationError2);
}
}

return callback(null, result, httpRequest, response);
});
Expand Down Expand Up @@ -59980,7 +60014,7 @@ function _beginCreateOrUpdateSourceControl(resourceGroupName, name, siteSourceCo
return callback(err);
}
let statusCode = response.statusCode;
if (statusCode !== 200 && statusCode !== 201) {
if (statusCode !== 200 && statusCode !== 201 && statusCode !== 202) {
let error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
Expand Down Expand Up @@ -60042,6 +60076,23 @@ function _beginCreateOrUpdateSourceControl(resourceGroupName, name, siteSourceCo
return callback(deserializationError1);
}
}
// Deserialize Response
if (statusCode === 202) {
let parsedResponse = null;
try {
parsedResponse = JSON.parse(responseBody);
result = JSON.parse(responseBody);
if (parsedResponse !== null && parsedResponse !== undefined) {
let resultMapper = new client.models['SiteSourceControl']().mapper();
result = client.deserialize(resultMapper, parsedResponse, 'result');
}
} catch (error) {
let deserializationError2 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`);
deserializationError2.request = msRest.stripRequest(httpRequest);
deserializationError2.response = msRest.stripResponse(response);
return callback(deserializationError2);
}
}

return callback(null, result, httpRequest, response);
});
Expand Down

0 comments on commit 06e4155

Please sign in to comment.