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

Commit

Permalink
[AutoPR apimanagement/resource-manager] ApiIssue HEAD operation name …
Browse files Browse the repository at this point in the history
…consistent across the spec (#2751)

* Generated from 3a649f27e5368d86880dc0f4c3b8b2c76676763e

normalize head names

* Generated from 58adb27c9fd292a5f3c01faa388a3183c075b632

delete supports 200
  • Loading branch information
AutorestCI authored Apr 19, 2018
1 parent d722516 commit 918599e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
16 changes: 8 additions & 8 deletions lib/services/apimanagement/lib/operations/apiIssue.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function _listByService(resourceGroupName, serviceName, apiId, options, callback
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
function _head(resourceGroupName, serviceName, apiId, issueId, options, callback) {
function _getEntityTag(resourceGroupName, serviceName, apiId, issueId, options, callback) {
/* jshint validthis: true */
let client = this.client;
if(!callback && typeof options === 'function') {
Expand Down Expand Up @@ -1053,7 +1053,7 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, issueId, ifMatch,
return callback(err);
}
let statusCode = response.statusCode;
if (statusCode !== 204) {
if (statusCode !== 200 && statusCode !== 204) {
let error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
Expand Down Expand Up @@ -1224,7 +1224,7 @@ class ApiIssue {
constructor(client) {
this.client = client;
this._listByService = _listByService;
this._head = _head;
this._getEntityTag = _getEntityTag;
this._get = _get;
this._createOrUpdate = _createOrUpdate;
this._deleteMethod = _deleteMethod;
Expand Down Expand Up @@ -1374,11 +1374,11 @@ class ApiIssue {
*
* @reject {Error} - The error object.
*/
headWithHttpOperationResponse(resourceGroupName, serviceName, apiId, issueId, options) {
getEntityTagWithHttpOperationResponse(resourceGroupName, serviceName, apiId, issueId, options) {
let client = this.client;
let self = this;
return new Promise((resolve, reject) => {
self._head(resourceGroupName, serviceName, apiId, issueId, options, (err, result, request, response) => {
self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, options, (err, result, request, response) => {
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
httpOperationResponse.body = result;
if (err) { reject(err); }
Expand Down Expand Up @@ -1428,7 +1428,7 @@ class ApiIssue {
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
head(resourceGroupName, serviceName, apiId, issueId, options, optionalCallback) {
getEntityTag(resourceGroupName, serviceName, apiId, issueId, options, optionalCallback) {
let client = this.client;
let self = this;
if (!optionalCallback && typeof options === 'function') {
Expand All @@ -1437,14 +1437,14 @@ class ApiIssue {
}
if (!optionalCallback) {
return new Promise((resolve, reject) => {
self._head(resourceGroupName, serviceName, apiId, issueId, options, (err, result, request, response) => {
self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, options, (err, result, request, response) => {
if (err) { reject(err); }
else { resolve(result); }
return;
});
});
} else {
return self._head(resourceGroupName, serviceName, apiId, issueId, options, optionalCallback);
return self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, options, optionalCallback);
}
}

Expand Down
16 changes: 8 additions & 8 deletions lib/services/apimanagement/lib/operations/apiIssueAttachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function _listByService(resourceGroupName, serviceName, apiId, issueId, options,
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
function _head(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, callback) {
function _getEntityTag(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, callback) {
/* jshint validthis: true */
let client = this.client;
if(!callback && typeof options === 'function') {
Expand Down Expand Up @@ -1154,7 +1154,7 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, issueId, attachmen
return callback(err);
}
let statusCode = response.statusCode;
if (statusCode !== 204) {
if (statusCode !== 200 && statusCode !== 204) {
let error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
Expand Down Expand Up @@ -1326,7 +1326,7 @@ class ApiIssueAttachment {
constructor(client) {
this.client = client;
this._listByService = _listByService;
this._head = _head;
this._getEntityTag = _getEntityTag;
this._get = _get;
this._createOrUpdate = _createOrUpdate;
this._deleteMethod = _deleteMethod;
Expand Down Expand Up @@ -1482,11 +1482,11 @@ class ApiIssueAttachment {
*
* @reject {Error} - The error object.
*/
headWithHttpOperationResponse(resourceGroupName, serviceName, apiId, issueId, attachmentId, options) {
getEntityTagWithHttpOperationResponse(resourceGroupName, serviceName, apiId, issueId, attachmentId, options) {
let client = this.client;
let self = this;
return new Promise((resolve, reject) => {
self._head(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, (err, result, request, response) => {
self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, (err, result, request, response) => {
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
httpOperationResponse.body = result;
if (err) { reject(err); }
Expand Down Expand Up @@ -1539,7 +1539,7 @@ class ApiIssueAttachment {
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
head(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, optionalCallback) {
getEntityTag(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, optionalCallback) {
let client = this.client;
let self = this;
if (!optionalCallback && typeof options === 'function') {
Expand All @@ -1548,14 +1548,14 @@ class ApiIssueAttachment {
}
if (!optionalCallback) {
return new Promise((resolve, reject) => {
self._head(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, (err, result, request, response) => {
self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, (err, result, request, response) => {
if (err) { reject(err); }
else { resolve(result); }
return;
});
});
} else {
return self._head(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, optionalCallback);
return self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, attachmentId, options, optionalCallback);
}
}

Expand Down
16 changes: 8 additions & 8 deletions lib/services/apimanagement/lib/operations/apiIssueComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function _listByService(resourceGroupName, serviceName, apiId, issueId, options,
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
function _head(resourceGroupName, serviceName, apiId, issueId, commentId, options, callback) {
function _getEntityTag(resourceGroupName, serviceName, apiId, issueId, commentId, options, callback) {
/* jshint validthis: true */
let client = this.client;
if(!callback && typeof options === 'function') {
Expand Down Expand Up @@ -1150,7 +1150,7 @@ function _deleteMethod(resourceGroupName, serviceName, apiId, issueId, commentId
return callback(err);
}
let statusCode = response.statusCode;
if (statusCode !== 204) {
if (statusCode !== 200 && statusCode !== 204) {
let error = new Error(responseBody);
error.statusCode = response.statusCode;
error.request = msRest.stripRequest(httpRequest);
Expand Down Expand Up @@ -1322,7 +1322,7 @@ class ApiIssueComment {
constructor(client) {
this.client = client;
this._listByService = _listByService;
this._head = _head;
this._getEntityTag = _getEntityTag;
this._get = _get;
this._createOrUpdate = _createOrUpdate;
this._deleteMethod = _deleteMethod;
Expand Down Expand Up @@ -1478,11 +1478,11 @@ class ApiIssueComment {
*
* @reject {Error} - The error object.
*/
headWithHttpOperationResponse(resourceGroupName, serviceName, apiId, issueId, commentId, options) {
getEntityTagWithHttpOperationResponse(resourceGroupName, serviceName, apiId, issueId, commentId, options) {
let client = this.client;
let self = this;
return new Promise((resolve, reject) => {
self._head(resourceGroupName, serviceName, apiId, issueId, commentId, options, (err, result, request, response) => {
self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, commentId, options, (err, result, request, response) => {
let httpOperationResponse = new msRest.HttpOperationResponse(request, response);
httpOperationResponse.body = result;
if (err) { reject(err); }
Expand Down Expand Up @@ -1535,7 +1535,7 @@ class ApiIssueComment {
*
* {stream} [response] - The HTTP Response stream if an error did not occur.
*/
head(resourceGroupName, serviceName, apiId, issueId, commentId, options, optionalCallback) {
getEntityTag(resourceGroupName, serviceName, apiId, issueId, commentId, options, optionalCallback) {
let client = this.client;
let self = this;
if (!optionalCallback && typeof options === 'function') {
Expand All @@ -1544,14 +1544,14 @@ class ApiIssueComment {
}
if (!optionalCallback) {
return new Promise((resolve, reject) => {
self._head(resourceGroupName, serviceName, apiId, issueId, commentId, options, (err, result, request, response) => {
self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, commentId, options, (err, result, request, response) => {
if (err) { reject(err); }
else { resolve(result); }
return;
});
});
} else {
return self._head(resourceGroupName, serviceName, apiId, issueId, commentId, options, optionalCallback);
return self._getEntityTag(resourceGroupName, serviceName, apiId, issueId, commentId, options, optionalCallback);
}
}

Expand Down
24 changes: 12 additions & 12 deletions lib/services/apimanagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5365,7 +5365,7 @@ export interface ApiIssue {
*
* @reject {Error|ServiceError} - The error object.
*/
headWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
getEntityTagWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

/**
* Gets the entity state (Etag) version of the Issue for an API specified by
Expand Down Expand Up @@ -5407,9 +5407,9 @@ export interface ApiIssue {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, callback: ServiceCallback<void>): void;
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, callback: ServiceCallback<void>): void;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


/**
Expand Down Expand Up @@ -5864,7 +5864,7 @@ export interface ApiIssueComment {
*
* @reject {Error|ServiceError} - The error object.
*/
headWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
getEntityTagWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

/**
* Gets the entity state (Etag) version of the issue Comment for an API
Expand Down Expand Up @@ -5909,9 +5909,9 @@ export interface ApiIssueComment {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, callback: ServiceCallback<void>): void;
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, callback: ServiceCallback<void>): void;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


/**
Expand Down Expand Up @@ -6371,7 +6371,7 @@ export interface ApiIssueAttachment {
*
* @reject {Error|ServiceError} - The error object.
*/
headWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;
getEntityTagWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<void>>;

/**
* Gets the entity state (Etag) version of the issue Attachment for an API
Expand Down Expand Up @@ -6416,9 +6416,9 @@ export interface ApiIssueAttachment {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, callback: ServiceCallback<void>): void;
head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<void>;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, callback: ServiceCallback<void>): void;
getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;


/**
Expand Down

0 comments on commit 918599e

Please sign in to comment.