From 4d0ccb7cee10590e0c20a8b81c01cc66131ebeef Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 18 Apr 2018 01:39:56 +0000 Subject: [PATCH 1/2] Generated from 3a649f27e5368d86880dc0f4c3b8b2c76676763e normalize head names --- .../apimanagement/lib/operations/apiIssue.js | 14 +++++------ .../lib/operations/apiIssueAttachment.js | 14 +++++------ .../lib/operations/apiIssueComment.js | 14 +++++------ .../apimanagement/lib/operations/index.d.ts | 24 +++++++++---------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/services/apimanagement/lib/operations/apiIssue.js b/lib/services/apimanagement/lib/operations/apiIssue.js index 359db683c4..5c8d60f751 100644 --- a/lib/services/apimanagement/lib/operations/apiIssue.js +++ b/lib/services/apimanagement/lib/operations/apiIssue.js @@ -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') { @@ -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; @@ -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); } @@ -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') { @@ -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); } } diff --git a/lib/services/apimanagement/lib/operations/apiIssueAttachment.js b/lib/services/apimanagement/lib/operations/apiIssueAttachment.js index f24510df3f..a2894beabb 100644 --- a/lib/services/apimanagement/lib/operations/apiIssueAttachment.js +++ b/lib/services/apimanagement/lib/operations/apiIssueAttachment.js @@ -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') { @@ -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; @@ -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); } @@ -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') { @@ -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); } } diff --git a/lib/services/apimanagement/lib/operations/apiIssueComment.js b/lib/services/apimanagement/lib/operations/apiIssueComment.js index 4029236dbf..39729716f3 100644 --- a/lib/services/apimanagement/lib/operations/apiIssueComment.js +++ b/lib/services/apimanagement/lib/operations/apiIssueComment.js @@ -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') { @@ -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; @@ -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); } @@ -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') { @@ -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); } } diff --git a/lib/services/apimanagement/lib/operations/index.d.ts b/lib/services/apimanagement/lib/operations/index.d.ts index bdfecfea76..91cfb380a4 100644 --- a/lib/services/apimanagement/lib/operations/index.d.ts +++ b/lib/services/apimanagement/lib/operations/index.d.ts @@ -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>; + getEntityTagWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the entity state (Etag) version of the Issue for an API specified by @@ -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; - head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, callback: ServiceCallback): void; - head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, callback: ServiceCallback): void; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -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>; + getEntityTagWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the entity state (Etag) version of the issue Comment for an API @@ -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; - head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, callback: ServiceCallback): void; - head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, callback: ServiceCallback): void; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, commentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -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>; + getEntityTagWithHttpOperationResponse(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the entity state (Etag) version of the issue Attachment for an API @@ -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; - head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, callback: ServiceCallback): void; - head(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, callback: ServiceCallback): void; + getEntityTag(resourceGroupName: string, serviceName: string, apiId: string, issueId: string, attachmentId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** From 2d564d67f1f39cab19e5798ab1327a7bb20cc64e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 18 Apr 2018 07:00:14 +0000 Subject: [PATCH 2/2] Generated from 58adb27c9fd292a5f3c01faa388a3183c075b632 delete supports 200 --- lib/services/apimanagement/lib/operations/apiIssue.js | 2 +- lib/services/apimanagement/lib/operations/apiIssueAttachment.js | 2 +- lib/services/apimanagement/lib/operations/apiIssueComment.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/apimanagement/lib/operations/apiIssue.js b/lib/services/apimanagement/lib/operations/apiIssue.js index 5c8d60f751..e0690110da 100644 --- a/lib/services/apimanagement/lib/operations/apiIssue.js +++ b/lib/services/apimanagement/lib/operations/apiIssue.js @@ -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); diff --git a/lib/services/apimanagement/lib/operations/apiIssueAttachment.js b/lib/services/apimanagement/lib/operations/apiIssueAttachment.js index a2894beabb..227dac18a5 100644 --- a/lib/services/apimanagement/lib/operations/apiIssueAttachment.js +++ b/lib/services/apimanagement/lib/operations/apiIssueAttachment.js @@ -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); diff --git a/lib/services/apimanagement/lib/operations/apiIssueComment.js b/lib/services/apimanagement/lib/operations/apiIssueComment.js index 39729716f3..91997c41ee 100644 --- a/lib/services/apimanagement/lib/operations/apiIssueComment.js +++ b/lib/services/apimanagement/lib/operations/apiIssueComment.js @@ -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);