From a4b55816fa7f52ffb8d3f65dfbd9927c1b37cc9f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 24 Apr 2018 22:42:04 +0000 Subject: [PATCH] Generated from 94426dd9c084482cf78b5515094a389b6995bd5c Another location of the error --- .../lib/models/dataTableResponseColumn.js | 69 + .../lib/models/dataTableResponseObject.js | 92 + .../lib/models/detectorInfo.js | 81 + .../lib/models/detectorResponse.js | 109 + .../lib/models/detectorResponseCollection.js | 68 + .../lib/models/diagnosticData.js | 74 + .../websiteManagement2/lib/models/index.d.ts | 124 + .../websiteManagement2/lib/models/index.js | 7 + .../lib/models/rendering.js | 71 + .../lib/operations/appServiceEnvironments.js | 4 +- .../lib/operations/diagnostics.js | 3383 ++++++++++++++--- .../lib/operations/index.d.ts | 759 +++- 12 files changed, 4273 insertions(+), 568 deletions(-) create mode 100644 lib/services/websiteManagement2/lib/models/dataTableResponseColumn.js create mode 100644 lib/services/websiteManagement2/lib/models/dataTableResponseObject.js create mode 100644 lib/services/websiteManagement2/lib/models/detectorInfo.js create mode 100644 lib/services/websiteManagement2/lib/models/detectorResponse.js create mode 100644 lib/services/websiteManagement2/lib/models/detectorResponseCollection.js create mode 100644 lib/services/websiteManagement2/lib/models/diagnosticData.js create mode 100644 lib/services/websiteManagement2/lib/models/rendering.js diff --git a/lib/services/websiteManagement2/lib/models/dataTableResponseColumn.js b/lib/services/websiteManagement2/lib/models/dataTableResponseColumn.js new file mode 100644 index 0000000000..0d4f245e13 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/dataTableResponseColumn.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Column definition + * + */ +class DataTableResponseColumn { + /** + * Create a DataTableResponseColumn. + * @member {string} [columnName] Name of the column + * @member {string} [dataType] Data type which looks like 'String' or + * 'Int32'. + * @member {string} [columnType] Column Type + */ + constructor() { + } + + /** + * Defines the metadata of DataTableResponseColumn + * + * @returns {object} metadata of DataTableResponseColumn + * + */ + mapper() { + return { + required: false, + serializedName: 'DataTableResponseColumn', + type: { + name: 'Composite', + className: 'DataTableResponseColumn', + modelProperties: { + columnName: { + required: false, + serializedName: 'columnName', + type: { + name: 'String' + } + }, + dataType: { + required: false, + serializedName: 'dataType', + type: { + name: 'String' + } + }, + columnType: { + required: false, + serializedName: 'columnType', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DataTableResponseColumn; diff --git a/lib/services/websiteManagement2/lib/models/dataTableResponseObject.js b/lib/services/websiteManagement2/lib/models/dataTableResponseObject.js new file mode 100644 index 0000000000..9b1b335eb2 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/dataTableResponseObject.js @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Data Table which defines columns and raw row values + * + */ +class DataTableResponseObject { + /** + * Create a DataTableResponseObject. + * @member {string} [tableName] Name of the table + * @member {array} [columns] List of columns with data types + * @member {array} [rows] Raw row values + */ + constructor() { + } + + /** + * Defines the metadata of DataTableResponseObject + * + * @returns {object} metadata of DataTableResponseObject + * + */ + mapper() { + return { + required: false, + serializedName: 'DataTableResponseObject', + type: { + name: 'Composite', + className: 'DataTableResponseObject', + modelProperties: { + tableName: { + required: false, + serializedName: 'tableName', + type: { + name: 'String' + } + }, + columns: { + required: false, + serializedName: 'columns', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DataTableResponseColumnElementType', + type: { + name: 'Composite', + className: 'DataTableResponseColumn' + } + } + } + }, + rows: { + required: false, + serializedName: 'rows', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ArrayElementType', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + } + }; + } +} + +module.exports = DataTableResponseObject; diff --git a/lib/services/websiteManagement2/lib/models/detectorInfo.js b/lib/services/websiteManagement2/lib/models/detectorInfo.js new file mode 100644 index 0000000000..7dc038b07c --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/detectorInfo.js @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Definition of Detector + * + */ +class DetectorInfo { + /** + * Create a DetectorInfo. + * @member {string} [description] Short description of the detector and its + * purpose + * @member {string} [category] Support Category + * @member {string} [subCategory] Support Sub Category + * @member {string} [supportTopicId] Support Topic Id + */ + constructor() { + } + + /** + * Defines the metadata of DetectorInfo + * + * @returns {object} metadata of DetectorInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'DetectorInfo', + type: { + name: 'Composite', + className: 'DetectorInfo', + modelProperties: { + description: { + required: false, + readOnly: true, + serializedName: 'description', + type: { + name: 'String' + } + }, + category: { + required: false, + readOnly: true, + serializedName: 'category', + type: { + name: 'String' + } + }, + subCategory: { + required: false, + readOnly: true, + serializedName: 'subCategory', + type: { + name: 'String' + } + }, + supportTopicId: { + required: false, + readOnly: true, + serializedName: 'supportTopicId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DetectorInfo; diff --git a/lib/services/websiteManagement2/lib/models/detectorResponse.js b/lib/services/websiteManagement2/lib/models/detectorResponse.js new file mode 100644 index 0000000000..6cfb11fcf6 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/detectorResponse.js @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Class representing Response from Detector + * + * @extends models['ProxyOnlyResource'] + */ +class DetectorResponse extends models['ProxyOnlyResource'] { + /** + * Create a DetectorResponse. + * @member {object} [metadata] metadata for the detector + * @member {string} [metadata.description] Short description of the detector + * and its purpose + * @member {string} [metadata.category] Support Category + * @member {string} [metadata.subCategory] Support Sub Category + * @member {string} [metadata.supportTopicId] Support Topic Id + * @member {array} [dataset] Data Set + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DetectorResponse + * + * @returns {object} metadata of DetectorResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'DetectorResponse', + type: { + name: 'Composite', + className: 'DetectorResponse', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + kind: { + required: false, + serializedName: 'kind', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + metadata: { + required: false, + serializedName: 'properties.metadata', + type: { + name: 'Composite', + className: 'DetectorInfo' + } + }, + dataset: { + required: false, + serializedName: 'properties.dataset', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DiagnosticDataElementType', + type: { + name: 'Composite', + className: 'DiagnosticData' + } + } + } + } + } + } + }; + } +} + +module.exports = DetectorResponse; diff --git a/lib/services/websiteManagement2/lib/models/detectorResponseCollection.js b/lib/services/websiteManagement2/lib/models/detectorResponseCollection.js new file mode 100644 index 0000000000..4d168e407d --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/detectorResponseCollection.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Collection of detector responses + */ +class DetectorResponseCollection extends Array { + /** + * Create a DetectorResponseCollection. + * @member {string} [nextLink] Link to next page of resources. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DetectorResponseCollection + * + * @returns {object} metadata of DetectorResponseCollection + * + */ + mapper() { + return { + required: false, + serializedName: 'DetectorResponseCollection', + type: { + name: 'Composite', + className: 'DetectorResponseCollection', + modelProperties: { + value: { + required: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DetectorResponseElementType', + type: { + name: 'Composite', + className: 'DetectorResponse' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DetectorResponseCollection; diff --git a/lib/services/websiteManagement2/lib/models/diagnosticData.js b/lib/services/websiteManagement2/lib/models/diagnosticData.js new file mode 100644 index 0000000000..e583cf9598 --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/diagnosticData.js @@ -0,0 +1,74 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Set of data with rendering instructions + * + */ +class DiagnosticData { + /** + * Create a DiagnosticData. + * @member {object} [table] Data in table form + * @member {string} [table.tableName] Name of the table + * @member {array} [table.columns] List of columns with data types + * @member {array} [table.rows] Raw row values + * @member {object} [renderingProperties] Properties that describe how the + * table should be rendered + * @member {string} [renderingProperties.renderingType] Rendering Type. + * Possible values include: 'NoGraph', 'Table', 'TimeSeries', + * 'TimeSeriesPerInstance' + * @member {string} [renderingProperties.title] Title of data + * @member {string} [renderingProperties.description] Description of the data + * that will help it be interpreted + */ + constructor() { + } + + /** + * Defines the metadata of DiagnosticData + * + * @returns {object} metadata of DiagnosticData + * + */ + mapper() { + return { + required: false, + serializedName: 'DiagnosticData', + type: { + name: 'Composite', + className: 'DiagnosticData', + modelProperties: { + table: { + required: false, + serializedName: 'table', + type: { + name: 'Composite', + className: 'DataTableResponseObject' + } + }, + renderingProperties: { + required: false, + serializedName: 'renderingProperties', + type: { + name: 'Composite', + className: 'Rendering' + } + } + } + } + }; + } +} + +module.exports = DiagnosticData; diff --git a/lib/services/websiteManagement2/lib/models/index.d.ts b/lib/services/websiteManagement2/lib/models/index.d.ts index 2ccef7087d..1ad4b42f71 100644 --- a/lib/services/websiteManagement2/lib/models/index.d.ts +++ b/lib/services/websiteManagement2/lib/models/index.d.ts @@ -3391,6 +3391,118 @@ export interface AnalysisDefinition extends ProxyOnlyResource { readonly description?: string; } +/** + * @class + * Initializes a new instance of the DataTableResponseColumn class. + * @constructor + * Column definition + * + * @member {string} [columnName] Name of the column + * @member {string} [dataType] Data type which looks like 'String' or 'Int32'. + * @member {string} [columnType] Column Type + */ +export interface DataTableResponseColumn { + columnName?: string; + dataType?: string; + columnType?: string; +} + +/** + * @class + * Initializes a new instance of the DataTableResponseObject class. + * @constructor + * Data Table which defines columns and raw row values + * + * @member {string} [tableName] Name of the table + * @member {array} [columns] List of columns with data types + * @member {array} [rows] Raw row values + */ +export interface DataTableResponseObject { + tableName?: string; + columns?: DataTableResponseColumn[]; + rows?: string[][]; +} + +/** + * @class + * Initializes a new instance of the DetectorInfo class. + * @constructor + * Definition of Detector + * + * @member {string} [description] Short description of the detector and its + * purpose + * @member {string} [category] Support Category + * @member {string} [subCategory] Support Sub Category + * @member {string} [supportTopicId] Support Topic Id + */ +export interface DetectorInfo { + readonly description?: string; + readonly category?: string; + readonly subCategory?: string; + readonly supportTopicId?: string; +} + +/** + * @class + * Initializes a new instance of the Rendering class. + * @constructor + * Instructions for rendering the data + * + * @member {string} [renderingType] Rendering Type. Possible values include: + * 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance' + * @member {string} [title] Title of data + * @member {string} [description] Description of the data that will help it be + * interpreted + */ +export interface Rendering { + renderingType?: string; + title?: string; + description?: string; +} + +/** + * @class + * Initializes a new instance of the DiagnosticData class. + * @constructor + * Set of data with rendering instructions + * + * @member {object} [table] Data in table form + * @member {string} [table.tableName] Name of the table + * @member {array} [table.columns] List of columns with data types + * @member {array} [table.rows] Raw row values + * @member {object} [renderingProperties] Properties that describe how the + * table should be rendered + * @member {string} [renderingProperties.renderingType] Rendering Type. + * Possible values include: 'NoGraph', 'Table', 'TimeSeries', + * 'TimeSeriesPerInstance' + * @member {string} [renderingProperties.title] Title of data + * @member {string} [renderingProperties.description] Description of the data + * that will help it be interpreted + */ +export interface DiagnosticData { + table?: DataTableResponseObject; + renderingProperties?: Rendering; +} + +/** + * @class + * Initializes a new instance of the DetectorResponse class. + * @constructor + * Class representing Response from Detector + * + * @member {object} [metadata] metadata for the detector + * @member {string} [metadata.description] Short description of the detector + * and its purpose + * @member {string} [metadata.category] Support Category + * @member {string} [metadata.subCategory] Support Sub Category + * @member {string} [metadata.supportTopicId] Support Topic Id + * @member {array} [dataset] Data Set + */ +export interface DetectorResponse extends ProxyOnlyResource { + metadata?: DetectorInfo; + dataset?: DiagnosticData[]; +} + /** * @class * Initializes a new instance of the DiagnosticAnalysis class. @@ -6777,6 +6889,18 @@ export interface DeletedWebAppCollection extends Array { readonly nextLink?: string; } +/** + * @class + * Initializes a new instance of the DetectorResponseCollection class. + * @constructor + * Collection of detector responses + * + * @member {string} [nextLink] Link to next page of resources. + */ +export interface DetectorResponseCollection extends Array { + readonly nextLink?: string; +} + /** * @class * Initializes a new instance of the DiagnosticCategoryCollection class. diff --git a/lib/services/websiteManagement2/lib/models/index.js b/lib/services/websiteManagement2/lib/models/index.js index af2e518523..2e4f391d06 100644 --- a/lib/services/websiteManagement2/lib/models/index.js +++ b/lib/services/websiteManagement2/lib/models/index.js @@ -126,6 +126,12 @@ exports.DataSource = require('./dataSource'); exports.ResponseMetaData = require('./responseMetaData'); exports.AnalysisData = require('./analysisData'); exports.AnalysisDefinition = require('./analysisDefinition'); +exports.DataTableResponseColumn = require('./dataTableResponseColumn'); +exports.DataTableResponseObject = require('./dataTableResponseObject'); +exports.DetectorInfo = require('./detectorInfo'); +exports.Rendering = require('./rendering'); +exports.DiagnosticData = require('./diagnosticData'); +exports.DetectorResponse = require('./detectorResponse'); exports.DiagnosticAnalysis = require('./diagnosticAnalysis'); exports.DiagnosticCategory = require('./diagnosticCategory'); exports.DiagnosticDetectorResponse = require('./diagnosticDetectorResponse'); @@ -234,6 +240,7 @@ exports.TopLevelDomainCollection = require('./topLevelDomainCollection'); exports.TldLegalAgreementCollection = require('./tldLegalAgreementCollection'); exports.CertificateCollection = require('./certificateCollection'); exports.DeletedWebAppCollection = require('./deletedWebAppCollection'); +exports.DetectorResponseCollection = require('./detectorResponseCollection'); exports.DiagnosticCategoryCollection = require('./diagnosticCategoryCollection'); exports.DiagnosticAnalysisCollection = require('./diagnosticAnalysisCollection'); exports.DiagnosticDetectorCollection = require('./diagnosticDetectorCollection'); diff --git a/lib/services/websiteManagement2/lib/models/rendering.js b/lib/services/websiteManagement2/lib/models/rendering.js new file mode 100644 index 0000000000..09e9783dbb --- /dev/null +++ b/lib/services/websiteManagement2/lib/models/rendering.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Instructions for rendering the data + * + */ +class Rendering { + /** + * Create a Rendering. + * @member {string} [renderingType] Rendering Type. Possible values include: + * 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance' + * @member {string} [title] Title of data + * @member {string} [description] Description of the data that will help it + * be interpreted + */ + constructor() { + } + + /** + * Defines the metadata of Rendering + * + * @returns {object} metadata of Rendering + * + */ + mapper() { + return { + required: false, + serializedName: 'Rendering', + type: { + name: 'Composite', + className: 'Rendering', + modelProperties: { + renderingType: { + required: false, + serializedName: 'renderingType', + type: { + name: 'Enum', + allowedValues: [ 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance' ] + } + }, + title: { + required: false, + serializedName: 'title', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Rendering; diff --git a/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js b/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js index 77b8ecdb35..ad008a5ab6 100644 --- a/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js +++ b/lib/services/websiteManagement2/lib/operations/appServiceEnvironments.js @@ -2930,7 +2930,7 @@ function _listMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, op // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}metrics'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{instance}', encodeURIComponent(instance)); @@ -5689,7 +5689,7 @@ function _listWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}metrics'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{workerPoolName}', encodeURIComponent(workerPoolName)); diff --git a/lib/services/websiteManagement2/lib/operations/diagnostics.js b/lib/services/websiteManagement2/lib/operations/diagnostics.js index 9eb79eb3f3..c33b53260b 100644 --- a/lib/services/websiteManagement2/lib/operations/diagnostics.js +++ b/lib/services/websiteManagement2/lib/operations/diagnostics.js @@ -15,14 +15,14 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * @summary Get Diagnostics Categories + * @summary List Hosting Environment Detector Responses * - * Get Diagnostics Categories + * List Hosting Environment Detector Responses * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} siteName Site Name + * @param {string} name Site Name * * @param {object} [options] Optional Parameters. * @@ -36,14 +36,14 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticCategoryCollection} for more + * See {@link DetectorResponseCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDiagnosticCategories(resourceGroupName, siteName, options, callback) { +function _listHostingEnvironmentDetectorResponses(resourceGroupName, name, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -73,8 +73,8 @@ function _listSiteDiagnosticCategories(resourceGroupName, siteName, options, cal throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); } } - if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { - throw new Error('siteName cannot be null or undefined and it must be of type string.'); + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -88,9 +88,9 @@ function _listSiteDiagnosticCategories(resourceGroupName, siteName, options, cal // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -160,7 +160,7 @@ function _listSiteDiagnosticCategories(resourceGroupName, siteName, options, cal parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); + let resultMapper = new client.models['DetectorResponseCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -176,19 +176,25 @@ function _listSiteDiagnosticCategories(resourceGroupName, siteName, options, cal } /** - * @summary Get Diagnostics Category + * @summary Get Hosting Environment Detector Response * - * Get Diagnostics Category + * Get Hosting Environment Detector Response * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * - * @param {string} siteName Site Name + * @param {string} name App Service Environment Name * - * @param {string} diagnosticCategory Diagnostic Category + * @param {string} detectorName Detector Resource Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -199,13 +205,13 @@ function _listSiteDiagnosticCategories(resourceGroupName, siteName, options, cal * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticCategory} for more information. + * See {@link DetectorResponse} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCategory, options, callback) { +function _getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -215,6 +221,9 @@ function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCateg if (!callback) { throw new Error('callback cannot be null.'); } + let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; + let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; + let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -235,11 +244,28 @@ function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCateg throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); } } - if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { - throw new Error('siteName cannot be null or undefined and it must be of type string.'); + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); } - if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { - throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { + throw new Error('detectorName cannot be null or undefined and it must be of type string.'); + } + if (startTime && !(startTime instanceof Date || + (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { + throw new Error('startTime must be of type date.'); + } + if (endTime && !(endTime instanceof Date || + (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { + throw new Error('endTime must be of type date.'); + } + if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { + throw new Error('timeGrain must be of type string.'); + } + if (timeGrain !== null && timeGrain !== undefined) { + if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) + { + throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); + } } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -253,12 +279,21 @@ function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCateg // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{name}', encodeURIComponent(name)); + requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (startTime !== null && startTime !== undefined) { + queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); + } + if (endTime !== null && endTime !== undefined) { + queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); + } + if (timeGrain !== null && timeGrain !== undefined) { + queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); + } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -326,7 +361,7 @@ function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCateg parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticCategory']().mapper(); + let resultMapper = new client.models['DetectorResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -342,17 +377,15 @@ function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCateg } /** - * @summary Get Site Analyses + * @summary List Site Detector Responses * - * Get Site Analyses + * List Site Detector Responses * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -365,14 +398,14 @@ function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCateg * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysisCollection} for more + * See {@link DetectorResponseCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, options, callback) { +function _listSiteDetectorResponses(resourceGroupName, siteName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -405,9 +438,6 @@ function _listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, opti if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { - throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -420,10 +450,9 @@ function _listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, opti // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -493,7 +522,7 @@ function _listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, opti parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); + let resultMapper = new client.models['DetectorResponseCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -509,21 +538,25 @@ function _listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, opti } /** - * @summary Get Site Analysis + * @summary Get site detector response * - * Get Site Analysis + * Get site detector response * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category - * - * @param {string} analysisName Analysis Name + * @param {string} detectorName Detector Resource Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -534,13 +567,13 @@ function _listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, opti * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysis} for more information. + * See {@link DetectorResponse} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, options, callback) { +function _getSiteDetectorResponse(resourceGroupName, siteName, detectorName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -550,6 +583,9 @@ function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analy if (!callback) { throw new Error('callback cannot be null.'); } + let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; + let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; + let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -573,11 +609,25 @@ function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analy if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { - throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { + throw new Error('detectorName cannot be null or undefined and it must be of type string.'); } - if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { - throw new Error('analysisName cannot be null or undefined and it must be of type string.'); + if (startTime && !(startTime instanceof Date || + (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { + throw new Error('startTime must be of type date.'); + } + if (endTime && !(endTime instanceof Date || + (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { + throw new Error('endTime must be of type date.'); + } + if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { + throw new Error('timeGrain must be of type string.'); + } + if (timeGrain !== null && timeGrain !== undefined) { + if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) + { + throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); + } } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -591,13 +641,21 @@ function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analy // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); + requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (startTime !== null && startTime !== undefined) { + queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); + } + if (endTime !== null && endTime !== undefined) { + queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); + } + if (timeGrain !== null && timeGrain !== undefined) { + queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); + } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -665,7 +723,7 @@ function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analy parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); + let resultMapper = new client.models['DetectorResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -681,27 +739,17 @@ function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analy } /** - * @summary Execute Analysis + * @summary Get Diagnostics Categories * - * Execute Analysis + * Get Diagnostics Categories * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Category Name - * - * @param {string} analysisName Analysis Resource Name - * * @param {object} [options] Optional Parameters. * - * @param {date} [options.startTime] Start Time - * - * @param {date} [options.endTime] End Time - * - * @param {string} [options.timeGrain] Time Grain - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -712,13 +760,14 @@ function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analy * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysis} for more information. + * See {@link DiagnosticCategoryCollection} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, options, callback) { +function _listSiteDiagnosticCategories(resourceGroupName, siteName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -728,9 +777,6 @@ function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, a if (!callback) { throw new Error('callback cannot be null.'); } - let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; - let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; - let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -754,29 +800,6 @@ function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, a if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { - throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); - } - if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { - throw new Error('analysisName cannot be null or undefined and it must be of type string.'); - } - if (startTime && !(startTime instanceof Date || - (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { - throw new Error('startTime must be of type date.'); - } - if (endTime && !(endTime instanceof Date || - (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { - throw new Error('endTime must be of type date.'); - } - if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { - throw new Error('timeGrain must be of type string.'); - } - if (timeGrain !== null && timeGrain !== undefined) { - if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) - { - throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); - } - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -789,22 +812,11 @@ function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, a // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (startTime !== null && startTime !== undefined) { - queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); - } - if (endTime !== null && endTime !== undefined) { - queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); - } - if (timeGrain !== null && timeGrain !== undefined) { - queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); - } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -812,7 +824,7 @@ function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, a // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -872,7 +884,7 @@ function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, a parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); + let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -888,9 +900,9 @@ function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, a } /** - * @summary Get Detectors + * @summary Get Diagnostics Category * - * Get Detectors + * Get Diagnostics Category * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -911,14 +923,13 @@ function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, a * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more - * information. + * See {@link DiagnosticCategory} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, options, callback) { +function _getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCategory, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -966,7 +977,7 @@ function _listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, opt // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); @@ -1039,7 +1050,7 @@ function _listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, opt parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + let resultMapper = new client.models['DiagnosticCategory']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1055,9 +1066,9 @@ function _listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, opt } /** - * @summary Get Detector + * @summary Get Site Analyses * - * Get Detector + * Get Site Analyses * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -1066,8 +1077,6 @@ function _listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, opt * * @param {string} diagnosticCategory Diagnostic Category * - * @param {string} detectorName Detector Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1080,14 +1089,14 @@ function _listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, opt * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more + * See {@link DiagnosticAnalysisCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, callback) { +function _listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1123,9 +1132,6 @@ function _getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detec if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); } - if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { - throw new Error('detectorName cannot be null or undefined and it must be of type string.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -1138,11 +1144,10 @@ function _getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detec // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1212,7 +1217,7 @@ function _getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detec parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1228,27 +1233,21 @@ function _getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detec } /** - * @summary Execute Detector + * @summary Get Site Analysis * - * Execute Detector + * Get Site Analysis * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} detectorName Detector Resource Name + * @param {string} diagnosticCategory Diagnostic Category * - * @param {string} diagnosticCategory Category Name + * @param {string} analysisName Analysis Name * * @param {object} [options] Optional Parameters. * - * @param {date} [options.startTime] Start Time - * - * @param {date} [options.endTime] End Time - * - * @param {string} [options.timeGrain] Time Grain - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1259,14 +1258,13 @@ function _getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detec * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorResponse} for more - * information. + * See {@link DiagnosticAnalysis} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, callback) { +function _getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1276,9 +1274,6 @@ function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnos if (!callback) { throw new Error('callback cannot be null.'); } - let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; - let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; - let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -1302,28 +1297,11 @@ function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnos if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { - throw new Error('detectorName cannot be null or undefined and it must be of type string.'); - } if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); } - if (startTime && !(startTime instanceof Date || - (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { - throw new Error('startTime must be of type date.'); - } - if (endTime && !(endTime instanceof Date || - (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { - throw new Error('endTime must be of type date.'); - } - if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { - throw new Error('timeGrain must be of type string.'); - } - if (timeGrain !== null && timeGrain !== undefined) { - if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) - { - throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); - } + if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { + throw new Error('analysisName cannot be null or undefined and it must be of type string.'); } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -1337,22 +1315,13 @@ function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnos // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (startTime !== null && startTime !== undefined) { - queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); - } - if (endTime !== null && endTime !== undefined) { - queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); - } - if (timeGrain !== null && timeGrain !== undefined) { - queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); - } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1360,7 +1329,7 @@ function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnos // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1420,7 +1389,7 @@ function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnos parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorResponse']().mapper(); + let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1436,19 +1405,27 @@ function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnos } /** - * @summary Get Diagnostics Categories + * @summary Execute Analysis * - * Get Diagnostics Categories + * Execute Analysis * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} slot Slot Name + * @param {string} diagnosticCategory Category Name + * + * @param {string} analysisName Analysis Resource Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1459,14 +1436,13 @@ function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnos * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticCategoryCollection} for more - * information. + * See {@link DiagnosticAnalysis} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, options, callback) { +function _executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1476,6 +1452,9 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op if (!callback) { throw new Error('callback cannot be null.'); } + let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; + let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; + let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -1499,8 +1478,28 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { - throw new Error('slot cannot be null or undefined and it must be of type string.'); + if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { + throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + } + if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { + throw new Error('analysisName cannot be null or undefined and it must be of type string.'); + } + if (startTime && !(startTime instanceof Date || + (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { + throw new Error('startTime must be of type date.'); + } + if (endTime && !(endTime instanceof Date || + (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { + throw new Error('endTime must be of type date.'); + } + if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { + throw new Error('timeGrain must be of type string.'); + } + if (timeGrain !== null && timeGrain !== undefined) { + if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) + { + throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); + } } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -1514,12 +1513,22 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (startTime !== null && startTime !== undefined) { + queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); + } + if (endTime !== null && endTime !== undefined) { + queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); + } + if (timeGrain !== null && timeGrain !== undefined) { + queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); + } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1527,7 +1536,7 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1587,7 +1596,7 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); + let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1603,9 +1612,9 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op } /** - * @summary Get Diagnostics Category + * @summary Get Detectors * - * Get Diagnostics Category + * Get Detectors * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -1614,8 +1623,6 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op * * @param {string} diagnosticCategory Diagnostic Category * - * @param {string} slot Slot Name - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1628,13 +1635,14 @@ function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, op * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticCategory} for more information. + * See {@link DiagnosticDetectorCollection} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticCategory, slot, options, callback) { +function _listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1670,9 +1678,6 @@ function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticC if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); } - if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { - throw new Error('slot cannot be null or undefined and it must be of type string.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -1685,11 +1690,10 @@ function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticC // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1759,7 +1763,7 @@ function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticC parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticCategory']().mapper(); + let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1775,9 +1779,9 @@ function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticC } /** - * @summary Get Site Analyses + * @summary Get Detector * - * Get Site Analyses + * Get Detector * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -1786,7 +1790,7 @@ function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticC * * @param {string} diagnosticCategory Diagnostic Category * - * @param {string} slot Slot Name + * @param {string} detectorName Detector Name * * @param {object} [options] Optional Parameters. * @@ -1800,14 +1804,14 @@ function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticC * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysisCollection} for more + * See {@link DiagnosticDetectorCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, slot, options, callback) { +function _getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1843,8 +1847,8 @@ function _listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); } - if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { - throw new Error('slot cannot be null or undefined and it must be of type string.'); + if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { + throw new Error('detectorName cannot be null or undefined and it must be of type string.'); } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -1858,11 +1862,11 @@ function _listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -1932,7 +1936,7 @@ function _listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); + let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1948,23 +1952,27 @@ function _listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, } /** - * @summary Get Site Analysis + * @summary Execute Detector * - * Get Site Analysis + * Execute Detector * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category - * - * @param {string} analysisName Analysis Name + * @param {string} detectorName Detector Resource Name * - * @param {string} slot Slot - optional + * @param {string} diagnosticCategory Category Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1975,13 +1983,14 @@ function _listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysis} for more information. + * See {@link DiagnosticDetectorResponse} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options, callback) { +function _executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1991,6 +2000,9 @@ function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, a if (!callback) { throw new Error('callback cannot be null.'); } + let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; + let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; + let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -2014,14 +2026,28 @@ function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, a if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } + if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { + throw new Error('detectorName cannot be null or undefined and it must be of type string.'); + } if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); } - if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { - throw new Error('analysisName cannot be null or undefined and it must be of type string.'); + if (startTime && !(startTime instanceof Date || + (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { + throw new Error('startTime must be of type date.'); + } + if (endTime && !(endTime instanceof Date || + (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { + throw new Error('endTime must be of type date.'); + } + if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { + throw new Error('timeGrain must be of type string.'); } - if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { - throw new Error('slot cannot be null or undefined and it must be of type string.'); + if (timeGrain !== null && timeGrain !== undefined) { + if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) + { + throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); + } } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); @@ -2035,14 +2061,22 @@ function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, a // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); - requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (startTime !== null && startTime !== undefined) { + queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); + } + if (endTime !== null && endTime !== undefined) { + queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); + } + if (timeGrain !== null && timeGrain !== undefined) { + queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); + } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -2050,7 +2084,7 @@ function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, a // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2110,7 +2144,7 @@ function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, a parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); + let resultMapper = new client.models['DiagnosticDetectorResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2126,29 +2160,19 @@ function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, a } /** - * @summary Execute Analysis + * @summary List Site Detector Responses * - * Execute Analysis + * List Site Detector Responses * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Category Name - * - * @param {string} analysisName Analysis Resource Name - * * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * - * @param {date} [options.startTime] Start Time - * - * @param {date} [options.endTime] End Time - * - * @param {string} [options.timeGrain] Time Grain - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2159,13 +2183,14 @@ function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, a * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysis} for more information. + * See {@link DetectorResponseCollection} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options, callback) { +function _listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2175,9 +2200,6 @@ function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategor if (!callback) { throw new Error('callback cannot be null.'); } - let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; - let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; - let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -2201,32 +2223,9 @@ function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategor if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { - throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); - } - if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { - throw new Error('analysisName cannot be null or undefined and it must be of type string.'); - } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } - if (startTime && !(startTime instanceof Date || - (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { - throw new Error('startTime must be of type date.'); - } - if (endTime && !(endTime instanceof Date || - (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { - throw new Error('endTime must be of type date.'); - } - if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { - throw new Error('timeGrain must be of type string.'); - } - if (timeGrain !== null && timeGrain !== undefined) { - if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) - { - throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); - } - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -2239,23 +2238,12 @@ function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategor // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (startTime !== null && startTime !== undefined) { - queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); - } - if (endTime !== null && endTime !== undefined) { - queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); - } - if (timeGrain !== null && timeGrain !== undefined) { - queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); - } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -2263,7 +2251,7 @@ function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategor // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2323,7 +2311,7 @@ function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategor parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); + let resultMapper = new client.models['DetectorResponseCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2339,39 +2327,44 @@ function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategor } /** - * @summary Get Detectors + * @summary Get site detector response * - * Get Detectors + * Get site detector response * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category + * @param {string} detectorName Detector Resource Name * * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {date} [options.startTime] Start Time * - * @param {function} callback - The callback. + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more - * information. + * See {@link DetectorResponse} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, slot, options, callback) { +function _getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2381,6 +2374,9 @@ function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, if (!callback) { throw new Error('callback cannot be null.'); } + let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; + let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; + let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -2404,12 +2400,29 @@ function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { - throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { + throw new Error('detectorName cannot be null or undefined and it must be of type string.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } + if (startTime && !(startTime instanceof Date || + (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { + throw new Error('startTime must be of type date.'); + } + if (endTime && !(endTime instanceof Date || + (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { + throw new Error('endTime must be of type date.'); + } + if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { + throw new Error('timeGrain must be of type string.'); + } + if (timeGrain !== null && timeGrain !== undefined) { + if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) + { + throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); + } + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -2422,13 +2435,22 @@ function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; + if (startTime !== null && startTime !== undefined) { + queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); + } + if (endTime !== null && endTime !== undefined) { + queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); + } + if (timeGrain !== null && timeGrain !== undefined) { + queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); + } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -2496,7 +2518,7 @@ function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + let resultMapper = new client.models['DetectorResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2512,19 +2534,15 @@ function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, } /** - * @summary Get Detector + * @summary Get Diagnostics Categories * - * Get Detector + * Get Diagnostics Categories * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category - * - * @param {string} detectorName Detector Name - * * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. @@ -2539,14 +2557,14 @@ function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more + * See {@link DiagnosticCategoryCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, detectorName, slot, options, callback) { +function _listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2579,12 +2597,6 @@ function _getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, d if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { - throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); - } - if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { - throw new Error('detectorName cannot be null or undefined and it must be of type string.'); - } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } @@ -2600,11 +2612,9 @@ function _getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, d // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); - requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; @@ -2675,7 +2685,7 @@ function _getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, d parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2691,29 +2701,21 @@ function _getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, d } /** - * @summary Execute Detector + * @summary Get Diagnostics Category * - * Execute Detector + * Get Diagnostics Category * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} detectorName Detector Resource Name - * - * @param {string} diagnosticCategory Category Name + * @param {string} diagnosticCategory Diagnostic Category * * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * - * @param {date} [options.startTime] Start Time - * - * @param {date} [options.endTime] End Time - * - * @param {string} [options.timeGrain] Time Grain - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2724,14 +2726,13 @@ function _getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, d * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorResponse} for more - * information. + * See {@link DiagnosticCategory} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, options, callback) { +function _getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticCategory, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2741,9 +2742,6 @@ function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, dia if (!callback) { throw new Error('callback cannot be null.'); } - let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; - let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; - let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; let apiVersion = '2016-03-01'; // Validate try { @@ -2767,32 +2765,12 @@ function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, dia if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { throw new Error('siteName cannot be null or undefined and it must be of type string.'); } - if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { - throw new Error('detectorName cannot be null or undefined and it must be of type string.'); - } if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); } if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { throw new Error('slot cannot be null or undefined and it must be of type string.'); } - if (startTime && !(startTime instanceof Date || - (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { - throw new Error('startTime must be of type date.'); - } - if (endTime && !(endTime instanceof Date || - (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { - throw new Error('endTime must be of type date.'); - } - if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { - throw new Error('timeGrain must be of type string.'); - } - if (timeGrain !== null && timeGrain !== undefined) { - if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) - { - throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); - } - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -2805,23 +2783,13 @@ function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, dia // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); - requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (startTime !== null && startTime !== undefined) { - queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); - } - if (endTime !== null && endTime !== undefined) { - queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); - } - if (timeGrain !== null && timeGrain !== undefined) { - queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); - } queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -2829,7 +2797,7 @@ function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, dia // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2889,7 +2857,7 @@ function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, dia parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorResponse']().mapper(); + let resultMapper = new client.models['DiagnosticCategory']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2905,12 +2873,18 @@ function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, dia } /** - * @summary Get Diagnostics Categories + * @summary Get Site Analyses * - * Get Diagnostics Categories + * Get Site Analyses * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Diagnostic Category + * + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -2924,14 +2898,14 @@ function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, dia * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticCategoryCollection} for more + * See {@link DiagnosticAnalysisCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDiagnosticCategoriesNext(nextPageLink, options, callback) { +function _listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -2941,10 +2915,37 @@ function _listSiteDiagnosticCategoriesNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2016-03-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { + throw new Error('siteName cannot be null or undefined and it must be of type string.'); + } + if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { + throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -2954,8 +2955,18 @@ function _listSiteDiagnosticCategoriesNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3019,7 +3030,7 @@ function _listSiteDiagnosticCategoriesNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); + let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3035,12 +3046,20 @@ function _listSiteDiagnosticCategoriesNext(nextPageLink, options, callback) { } /** - * @summary Get Site Analyses + * @summary Get Site Analysis * - * Get Site Analyses + * Get Site Analysis * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Diagnostic Category + * + * @param {string} analysisName Analysis Name + * + * @param {string} slot Slot - optional * * @param {object} [options] Optional Parameters. * @@ -3054,14 +3073,13 @@ function _listSiteDiagnosticCategoriesNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysisCollection} for more - * information. + * See {@link DiagnosticAnalysis} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteAnalysesNext(nextPageLink, options, callback) { +function _getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3071,10 +3089,40 @@ function _listSiteAnalysesNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2016-03-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { + throw new Error('siteName cannot be null or undefined and it must be of type string.'); + } + if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { + throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + } + if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { + throw new Error('analysisName cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -3084,12 +3132,23 @@ function _listSiteAnalysesNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3149,7 +3208,7 @@ function _listSiteAnalysesNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); + let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3165,15 +3224,29 @@ function _listSiteAnalysesNext(nextPageLink, options, callback) { } /** - * @summary Get Detectors + * @summary Execute Analysis * - * Get Detectors + * Execute Analysis * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Category Name + * + * @param {string} analysisName Analysis Resource Name + * + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3184,14 +3257,13 @@ function _listSiteAnalysesNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more - * information. + * See {@link DiagnosticAnalysis} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDetectorsNext(nextPageLink, options, callback) { +function _executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3201,10 +3273,60 @@ function _listSiteDetectorsNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; + let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; + let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; + let apiVersion = '2016-03-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { + throw new Error('siteName cannot be null or undefined and it must be of type string.'); + } + if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { + throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + } + if (analysisName === null || analysisName === undefined || typeof analysisName.valueOf() !== 'string') { + throw new Error('analysisName cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (startTime && !(startTime instanceof Date || + (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { + throw new Error('startTime must be of type date.'); + } + if (endTime && !(endTime instanceof Date || + (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { + throw new Error('endTime must be of type date.'); + } + if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { + throw new Error('timeGrain must be of type string.'); + } + if (timeGrain !== null && timeGrain !== undefined) { + if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) + { + throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); + } + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -3214,12 +3336,32 @@ function _listSiteDetectorsNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{analysisName}', encodeURIComponent(analysisName)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (startTime !== null && startTime !== undefined) { + queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); + } + if (endTime !== null && endTime !== undefined) { + queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); + } + if (timeGrain !== null && timeGrain !== undefined) { + queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3279,7 +3421,7 @@ function _listSiteDetectorsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + let resultMapper = new client.models['DiagnosticAnalysis']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3295,12 +3437,18 @@ function _listSiteDetectorsNext(nextPageLink, options, callback) { } /** - * @summary Get Detector + * @summary Get Detectors * - * Get Detector + * Get Detectors * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Diagnostic Category + * + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -3321,7 +3469,7 @@ function _listSiteDetectorsNext(nextPageLink, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteDetectorNext(nextPageLink, options, callback) { +function _listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3331,10 +3479,37 @@ function _getSiteDetectorNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2016-03-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { + throw new Error('siteName cannot be null or undefined and it must be of type string.'); + } + if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { + throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -3344,8 +3519,18 @@ function _getSiteDetectorNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3425,12 +3610,20 @@ function _getSiteDetectorNext(nextPageLink, options, callback) { } /** - * @summary Get Diagnostics Categories + * @summary Get Detector * - * Get Diagnostics Categories + * Get Detector * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Diagnostic Category + * + * @param {string} detectorName Detector Name + * + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -3444,14 +3637,14 @@ function _getSiteDetectorNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticCategoryCollection} for more + * See {@link DiagnosticDetectorCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDiagnosticCategoriesSlotNext(nextPageLink, options, callback) { +function _getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, detectorName, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3461,10 +3654,40 @@ function _listSiteDiagnosticCategoriesSlotNext(nextPageLink, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2016-03-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { + throw new Error('siteName cannot be null or undefined and it must be of type string.'); + } + if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { + throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + } + if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { + throw new Error('detectorName cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -3474,19 +3697,30 @@ function _listSiteDiagnosticCategoriesSlotNext(nextPageLink, options, callback) } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } @@ -3539,7 +3773,7 @@ function _listSiteDiagnosticCategoriesSlotNext(nextPageLink, options, callback) parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); + let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3555,15 +3789,29 @@ function _listSiteDiagnosticCategoriesSlotNext(nextPageLink, options, callback) } /** - * @summary Get Site Analyses + * @summary Execute Detector * - * Get Site Analyses + * Execute Detector * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {string} diagnosticCategory Category Name + * + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3574,14 +3822,14 @@ function _listSiteDiagnosticCategoriesSlotNext(nextPageLink, options, callback) * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysisCollection} for more + * See {@link DiagnosticDetectorResponse} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteAnalysesSlotNext(nextPageLink, options, callback) { +function _executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3591,10 +3839,60 @@ function _listSiteAnalysesSlotNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let startTime = (options && options.startTime !== undefined) ? options.startTime : undefined; + let endTime = (options && options.endTime !== undefined) ? options.endTime : undefined; + let timeGrain = (options && options.timeGrain !== undefined) ? options.timeGrain : undefined; + let apiVersion = '2016-03-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName !== null && resourceGroupName !== undefined) { + if (resourceGroupName.length > 90) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MaxLength": 90'); + } + if (resourceGroupName.length < 1) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "MinLength": 1'); + } + if (resourceGroupName.match(/^[-\w\._\(\)]+[^\.]$/) === null) + { + throw new Error('"resourceGroupName" should satisfy the constraint - "Pattern": /^[-\w\._\(\)]+[^\.]$/'); + } + } + if (siteName === null || siteName === undefined || typeof siteName.valueOf() !== 'string') { + throw new Error('siteName cannot be null or undefined and it must be of type string.'); + } + if (detectorName === null || detectorName === undefined || typeof detectorName.valueOf() !== 'string') { + throw new Error('detectorName cannot be null or undefined and it must be of type string.'); + } + if (diagnosticCategory === null || diagnosticCategory === undefined || typeof diagnosticCategory.valueOf() !== 'string') { + throw new Error('diagnosticCategory cannot be null or undefined and it must be of type string.'); + } + if (slot === null || slot === undefined || typeof slot.valueOf() !== 'string') { + throw new Error('slot cannot be null or undefined and it must be of type string.'); + } + if (startTime && !(startTime instanceof Date || + (typeof startTime.valueOf() === 'string' && !isNaN(Date.parse(startTime))))) { + throw new Error('startTime must be of type date.'); + } + if (endTime && !(endTime instanceof Date || + (typeof endTime.valueOf() === 'string' && !isNaN(Date.parse(endTime))))) { + throw new Error('endTime must be of type date.'); + } + if (timeGrain !== null && timeGrain !== undefined && typeof timeGrain.valueOf() !== 'string') { + throw new Error('timeGrain must be of type string.'); + } + if (timeGrain !== null && timeGrain !== undefined) { + if (timeGrain.match(/PT[1-9][0-9]+[SMH]/) === null) + { + throw new Error('"timeGrain" should satisfy the constraint - "Pattern": /PT[1-9][0-9]+[SMH]/'); + } + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } 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.'); @@ -3604,12 +3902,32 @@ function _listSiteAnalysesSlotNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{siteName}', encodeURIComponent(siteName)); + requestUrl = requestUrl.replace('{detectorName}', encodeURIComponent(detectorName)); + requestUrl = requestUrl.replace('{diagnosticCategory}', encodeURIComponent(diagnosticCategory)); + requestUrl = requestUrl.replace('{slot}', encodeURIComponent(slot)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (startTime !== null && startTime !== undefined) { + queryParameters.push('startTime=' + encodeURIComponent(client.serializeObject(startTime))); + } + if (endTime !== null && endTime !== undefined) { + queryParameters.push('endTime=' + encodeURIComponent(client.serializeObject(endTime))); + } + if (timeGrain !== null && timeGrain !== undefined) { + queryParameters.push('timeGrain=' + encodeURIComponent(timeGrain)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3669,7 +3987,7 @@ function _listSiteAnalysesSlotNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); + let resultMapper = new client.models['DiagnosticDetectorResponse']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3685,9 +4003,9 @@ function _listSiteAnalysesSlotNext(nextPageLink, options, callback) { } /** - * @summary Get Detectors + * @summary List Hosting Environment Detector Responses * - * Get Detectors + * List Hosting Environment Detector Responses * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -3704,14 +4022,14 @@ function _listSiteAnalysesSlotNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more + * See {@link DetectorResponseCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listSiteDetectorsSlotNext(nextPageLink, options, callback) { +function _listHostingEnvironmentDetectorResponsesNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3799,7 +4117,7 @@ function _listSiteDetectorsSlotNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + let resultMapper = new client.models['DetectorResponseCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3815,9 +4133,9 @@ function _listSiteDetectorsSlotNext(nextPageLink, options, callback) { } /** - * @summary Get Detector + * @summary List Site Detector Responses * - * Get Detector + * List Site Detector Responses * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -3834,14 +4152,14 @@ function _listSiteDetectorsSlotNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more + * See {@link DetectorResponseCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getSiteDetectorSlotNext(nextPageLink, options, callback) { +function _listSiteDetectorResponsesNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3929,7 +4247,7 @@ function _getSiteDetectorSlotNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + let resultMapper = new client.models['DetectorResponseCollection']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3944,38 +4262,1619 @@ function _getSiteDetectorSlotNext(nextPageLink, options, callback) { }); } -/** Class representing a Diagnostics. */ -class Diagnostics { - /** - * Create a Diagnostics. - * @param {WebSiteManagementClient} client Reference to the service client. +/** + * @summary Get Diagnostics Categories + * + * Get Diagnostics Categories + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticCategoryCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listSiteDiagnosticCategoriesNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get Site Analyses + * + * Get Site Analyses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticAnalysisCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listSiteAnalysesNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get Detectors + * + * Get Detectors + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listSiteDetectorsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get Detector + * + * Get Detector + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getSiteDetectorNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listSiteDetectorResponsesSlotNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DetectorResponseCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get Diagnostics Categories + * + * Get Diagnostics Categories + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticCategoryCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listSiteDiagnosticCategoriesSlotNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticCategoryCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get Site Analyses + * + * Get Site Analyses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticAnalysisCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listSiteAnalysesSlotNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticAnalysisCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get Detectors + * + * Get Detectors + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listSiteDetectorsSlotNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Get Detector + * + * Get Detector + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getSiteDetectorSlotNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + 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.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DiagnosticDetectorCollection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Diagnostics. */ +class Diagnostics { + /** + * Create a Diagnostics. + * @param {WebSiteManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._listHostingEnvironmentDetectorResponses = _listHostingEnvironmentDetectorResponses; + this._getHostingEnvironmentDetectorResponse = _getHostingEnvironmentDetectorResponse; + this._listSiteDetectorResponses = _listSiteDetectorResponses; + this._getSiteDetectorResponse = _getSiteDetectorResponse; + this._listSiteDiagnosticCategories = _listSiteDiagnosticCategories; + this._getSiteDiagnosticCategory = _getSiteDiagnosticCategory; + this._listSiteAnalyses = _listSiteAnalyses; + this._getSiteAnalysis = _getSiteAnalysis; + this._executeSiteAnalysis = _executeSiteAnalysis; + this._listSiteDetectors = _listSiteDetectors; + this._getSiteDetector = _getSiteDetector; + this._executeSiteDetector = _executeSiteDetector; + this._listSiteDetectorResponsesSlot = _listSiteDetectorResponsesSlot; + this._getSiteDetectorResponseSlot = _getSiteDetectorResponseSlot; + this._listSiteDiagnosticCategoriesSlot = _listSiteDiagnosticCategoriesSlot; + this._getSiteDiagnosticCategorySlot = _getSiteDiagnosticCategorySlot; + this._listSiteAnalysesSlot = _listSiteAnalysesSlot; + this._getSiteAnalysisSlot = _getSiteAnalysisSlot; + this._executeSiteAnalysisSlot = _executeSiteAnalysisSlot; + this._listSiteDetectorsSlot = _listSiteDetectorsSlot; + this._getSiteDetectorSlot = _getSiteDetectorSlot; + this._executeSiteDetectorSlot = _executeSiteDetectorSlot; + this._listHostingEnvironmentDetectorResponsesNext = _listHostingEnvironmentDetectorResponsesNext; + this._listSiteDetectorResponsesNext = _listSiteDetectorResponsesNext; + this._listSiteDiagnosticCategoriesNext = _listSiteDiagnosticCategoriesNext; + this._listSiteAnalysesNext = _listSiteAnalysesNext; + this._listSiteDetectorsNext = _listSiteDetectorsNext; + this._getSiteDetectorNext = _getSiteDetectorNext; + this._listSiteDetectorResponsesSlotNext = _listSiteDetectorResponsesSlotNext; + this._listSiteDiagnosticCategoriesSlotNext = _listSiteDiagnosticCategoriesSlotNext; + this._listSiteAnalysesSlotNext = _listSiteAnalysesSlotNext; + this._listSiteDetectorsSlotNext = _listSiteDetectorsSlotNext; + this._getSiteDetectorSlotNext = _getSiteDetectorSlotNext; + } + + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listHostingEnvironmentDetectorResponsesWithHttpOperationResponse(resourceGroupName, name, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listHostingEnvironmentDetectorResponses(resourceGroupName, name, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listHostingEnvironmentDetectorResponses(resourceGroupName, name, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listHostingEnvironmentDetectorResponses(resourceGroupName, name, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listHostingEnvironmentDetectorResponses(resourceGroupName, name, options, optionalCallback); + } + } + + /** + * @summary Get Hosting Environment Detector Response + * + * Get Hosting Environment Detector Response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name App Service Environment Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getHostingEnvironmentDetectorResponseWithHttpOperationResponse(resourceGroupName, name, detectorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get Hosting Environment Detector Response + * + * Get Hosting Environment Detector Response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name App Service Environment Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DetectorResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName, options, optionalCallback); + } + } + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listSiteDetectorResponsesWithHttpOperationResponse(resourceGroupName, siteName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listSiteDetectorResponses(resourceGroupName, siteName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listSiteDetectorResponses(resourceGroupName, siteName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listSiteDetectorResponses(resourceGroupName, siteName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listSiteDetectorResponses(resourceGroupName, siteName, options, optionalCallback); + } + } + + /** + * @summary Get site detector response + * + * Get site detector response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getSiteDetectorResponseWithHttpOperationResponse(resourceGroupName, siteName, detectorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getSiteDetectorResponse(resourceGroupName, siteName, detectorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get site detector response + * + * Get site detector response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DetectorResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. */ - constructor(client) { - this.client = client; - this._listSiteDiagnosticCategories = _listSiteDiagnosticCategories; - this._getSiteDiagnosticCategory = _getSiteDiagnosticCategory; - this._listSiteAnalyses = _listSiteAnalyses; - this._getSiteAnalysis = _getSiteAnalysis; - this._executeSiteAnalysis = _executeSiteAnalysis; - this._listSiteDetectors = _listSiteDetectors; - this._getSiteDetector = _getSiteDetector; - this._executeSiteDetector = _executeSiteDetector; - this._listSiteDiagnosticCategoriesSlot = _listSiteDiagnosticCategoriesSlot; - this._getSiteDiagnosticCategorySlot = _getSiteDiagnosticCategorySlot; - this._listSiteAnalysesSlot = _listSiteAnalysesSlot; - this._getSiteAnalysisSlot = _getSiteAnalysisSlot; - this._executeSiteAnalysisSlot = _executeSiteAnalysisSlot; - this._listSiteDetectorsSlot = _listSiteDetectorsSlot; - this._getSiteDetectorSlot = _getSiteDetectorSlot; - this._executeSiteDetectorSlot = _executeSiteDetectorSlot; - this._listSiteDiagnosticCategoriesNext = _listSiteDiagnosticCategoriesNext; - this._listSiteAnalysesNext = _listSiteAnalysesNext; - this._listSiteDetectorsNext = _listSiteDetectorsNext; - this._getSiteDetectorNext = _getSiteDetectorNext; - this._listSiteDiagnosticCategoriesSlotNext = _listSiteDiagnosticCategoriesSlotNext; - this._listSiteAnalysesSlotNext = _listSiteAnalysesSlotNext; - this._listSiteDetectorsSlotNext = _listSiteDetectorsSlotNext; - this._getSiteDetectorSlotNext = _getSiteDetectorSlotNext; + getSiteDetectorResponse(resourceGroupName, siteName, detectorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getSiteDetectorResponse(resourceGroupName, siteName, detectorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getSiteDetectorResponse(resourceGroupName, siteName, detectorName, options, optionalCallback); + } } /** @@ -4624,7 +6523,217 @@ class Diagnostics { * * @param {string} diagnosticCategory Diagnostic Category * - * @param {string} detectorName Detector Name + * @param {string} detectorName Detector Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DiagnosticDetectorCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, optionalCallback); + } + } + + /** + * @summary Execute Detector + * + * Execute Detector + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {string} diagnosticCategory Category Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + executeSiteDetectorWithHttpOperationResponse(resourceGroupName, siteName, detectorName, diagnosticCategory, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Execute Detector + * + * Execute Detector + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {string} diagnosticCategory Category Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DiagnosticDetectorResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, optionalCallback); + } + } + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} slot Slot Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listSiteDetectorResponsesSlotWithHttpOperationResponse(resourceGroupName, siteName, slot, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -4638,7 +6747,7 @@ class Diagnostics { * * {Promise} A promise is returned * - * @resolve {DiagnosticDetectorCollection} - The deserialized result object. + * @resolve {DetectorResponseCollection} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4647,14 +6756,14 @@ class Diagnostics { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more + * See {@link DetectorResponseCollection} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, optionalCallback) { + listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4663,21 +6772,21 @@ class Diagnostics { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, (err, result, request, response) => { + self._listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName, options, optionalCallback); + return self._listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot, options, optionalCallback); } } /** - * @summary Execute Detector + * @summary Get site detector response * - * Execute Detector + * Get site detector response * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -4686,7 +6795,7 @@ class Diagnostics { * * @param {string} detectorName Detector Resource Name * - * @param {string} diagnosticCategory Category Name + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -4701,15 +6810,15 @@ class Diagnostics { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - executeSiteDetectorWithHttpOperationResponse(resourceGroupName, siteName, detectorName, diagnosticCategory, options) { + getSiteDetectorResponseSlotWithHttpOperationResponse(resourceGroupName, siteName, detectorName, slot, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, (err, result, request, response) => { + self._getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4720,9 +6829,9 @@ class Diagnostics { } /** - * @summary Execute Detector + * @summary Get site detector response * - * Execute Detector + * Get site detector response * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -4731,7 +6840,7 @@ class Diagnostics { * * @param {string} detectorName Detector Resource Name * - * @param {string} diagnosticCategory Category Name + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -4751,7 +6860,7 @@ class Diagnostics { * * {Promise} A promise is returned * - * @resolve {DiagnosticDetectorResponse} - The deserialized result object. + * @resolve {DetectorResponse} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4760,14 +6869,13 @@ class Diagnostics { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorResponse} for more - * information. + * See {@link DetectorResponse} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, optionalCallback) { + getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4776,14 +6884,14 @@ class Diagnostics { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, (err, result, request, response) => { + self._getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory, options, optionalCallback); + return self._getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot, options, optionalCallback); } } @@ -5628,6 +7736,184 @@ class Diagnostics { } } + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listHostingEnvironmentDetectorResponsesNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listHostingEnvironmentDetectorResponsesNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listHostingEnvironmentDetectorResponsesNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listHostingEnvironmentDetectorResponsesNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listHostingEnvironmentDetectorResponsesNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listSiteDetectorResponsesNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listSiteDetectorResponsesNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listSiteDetectorResponsesNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listSiteDetectorResponsesNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listSiteDetectorResponsesNext(nextPageLink, options, optionalCallback); + } + } + /** * @summary Get Diagnostics Categories * @@ -5984,6 +8270,95 @@ class Diagnostics { } } + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listSiteDetectorResponsesSlotNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listSiteDetectorResponsesSlotNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listSiteDetectorResponsesSlotNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listSiteDetectorResponsesSlotNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listSiteDetectorResponsesSlotNext(nextPageLink, options, optionalCallback); + } + } + /** * @summary Get Diagnostics Categories * diff --git a/lib/services/websiteManagement2/lib/operations/index.d.ts b/lib/services/websiteManagement2/lib/operations/index.d.ts index f99d619675..6a0a06d829 100644 --- a/lib/services/websiteManagement2/lib/operations/index.d.ts +++ b/lib/services/websiteManagement2/lib/operations/index.d.ts @@ -5180,6 +5180,300 @@ export interface DeletedWebApps { export interface Diagnostics { + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listHostingEnvironmentDetectorResponsesWithHttpOperationResponse(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DetectorResponseCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listHostingEnvironmentDetectorResponses(resourceGroupName: string, name: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listHostingEnvironmentDetectorResponses(resourceGroupName: string, name: string, callback: ServiceCallback): void; + listHostingEnvironmentDetectorResponses(resourceGroupName: string, name: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get Hosting Environment Detector Response + * + * Get Hosting Environment Detector Response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name App Service Environment Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getHostingEnvironmentDetectorResponseWithHttpOperationResponse(resourceGroupName: string, name: string, detectorName: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get Hosting Environment Detector Response + * + * Get Hosting Environment Detector Response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} name App Service Environment Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DetectorResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DetectorResponse} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponse} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getHostingEnvironmentDetectorResponse(resourceGroupName: string, name: string, detectorName: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getHostingEnvironmentDetectorResponse(resourceGroupName: string, name: string, detectorName: string, callback: ServiceCallback): void; + getHostingEnvironmentDetectorResponse(resourceGroupName: string, name: string, detectorName: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listSiteDetectorResponsesWithHttpOperationResponse(resourceGroupName: string, siteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DetectorResponseCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listSiteDetectorResponses(resourceGroupName: string, siteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSiteDetectorResponses(resourceGroupName: string, siteName: string, callback: ServiceCallback): void; + listSiteDetectorResponses(resourceGroupName: string, siteName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get site detector response + * + * Get site detector response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getSiteDetectorResponseWithHttpOperationResponse(resourceGroupName: string, siteName: string, detectorName: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get site detector response + * + * Get site detector response + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} detectorName Detector Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DetectorResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DetectorResponse} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponse} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getSiteDetectorResponse(resourceGroupName: string, siteName: string, detectorName: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getSiteDetectorResponse(resourceGroupName: string, siteName: string, detectorName: string, callback: ServiceCallback): void; + getSiteDetectorResponse(resourceGroupName: string, siteName: string, detectorName: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Get Diagnostics Categories * @@ -5494,25 +5788,168 @@ export interface Diagnostics { /** * @summary Execute Analysis * - * Execute Analysis + * Execute Analysis + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Category Name + * + * @param {string} analysisName Analysis Resource Name + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DiagnosticAnalysis} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DiagnosticAnalysis} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticAnalysis} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + executeSiteAnalysis(resourceGroupName: string, siteName: string, diagnosticCategory: string, analysisName: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + executeSiteAnalysis(resourceGroupName: string, siteName: string, diagnosticCategory: string, analysisName: string, callback: ServiceCallback): void; + executeSiteAnalysis(resourceGroupName: string, siteName: string, diagnosticCategory: string, analysisName: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get Detectors + * + * Get Detectors + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Diagnostic Category + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listSiteDetectorsWithHttpOperationResponse(resourceGroupName: string, siteName: string, diagnosticCategory: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get Detectors + * + * Get Detectors + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Diagnostic Category + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DiagnosticDetectorCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DiagnosticDetectorCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listSiteDetectors(resourceGroupName: string, siteName: string, diagnosticCategory: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSiteDetectors(resourceGroupName: string, siteName: string, diagnosticCategory: string, callback: ServiceCallback): void; + listSiteDetectors(resourceGroupName: string, siteName: string, diagnosticCategory: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get Detector + * + * Get Detector + * + * @param {string} resourceGroupName Name of the resource group to which the + * resource belongs. + * + * @param {string} siteName Site Name + * + * @param {string} diagnosticCategory Diagnostic Category + * + * @param {string} detectorName Detector Name + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getSiteDetectorWithHttpOperationResponse(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get Detector + * + * Get Detector * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Category Name + * @param {string} diagnosticCategory Diagnostic Category * - * @param {string} analysisName Analysis Resource Name + * @param {string} detectorName Detector Name * * @param {object} [options] Optional Parameters. * - * @param {date} [options.startTime] Start Time - * - * @param {date} [options.endTime] End Time - * - * @param {string} [options.timeGrain] Time Grain - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5523,7 +5960,7 @@ export interface Diagnostics { * * {Promise} A promise is returned. * - * @resolve {DiagnosticAnalysis} - The deserialized result object. + * @resolve {DiagnosticDetectorCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5531,57 +5968,74 @@ export interface Diagnostics { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DiagnosticAnalysis} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticAnalysis} for more information. + * {DiagnosticDetectorCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorCollection} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - executeSiteAnalysis(resourceGroupName: string, siteName: string, diagnosticCategory: string, analysisName: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - executeSiteAnalysis(resourceGroupName: string, siteName: string, diagnosticCategory: string, analysisName: string, callback: ServiceCallback): void; - executeSiteAnalysis(resourceGroupName: string, siteName: string, diagnosticCategory: string, analysisName: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getSiteDetector(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getSiteDetector(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, callback: ServiceCallback): void; + getSiteDetector(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get Detectors + * @summary Execute Detector * - * Get Detectors + * Execute Detector * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category + * @param {string} detectorName Detector Resource Name + * + * @param {string} diagnosticCategory Category Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listSiteDetectorsWithHttpOperationResponse(resourceGroupName: string, siteName: string, diagnosticCategory: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + executeSiteDetectorWithHttpOperationResponse(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get Detectors + * @summary Execute Detector * - * Get Detectors + * Execute Detector * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category + * @param {string} detectorName Detector Resource Name + * + * @param {string} diagnosticCategory Category Name * * @param {object} [options] Optional Parameters. * + * @param {date} [options.startTime] Start Time + * + * @param {date} [options.endTime] End Time + * + * @param {string} [options.timeGrain] Time Grain + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5592,7 +6046,7 @@ export interface Diagnostics { * * {Promise} A promise is returned. * - * @resolve {DiagnosticDetectorCollection} - The deserialized result object. + * @resolve {DiagnosticDetectorResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5600,32 +6054,30 @@ export interface Diagnostics { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DiagnosticDetectorCollection} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more + * {DiagnosticDetectorResponse} [result] - The deserialized result object if an error did not occur. + * See {@link DiagnosticDetectorResponse} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listSiteDetectors(resourceGroupName: string, siteName: string, diagnosticCategory: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listSiteDetectors(resourceGroupName: string, siteName: string, diagnosticCategory: string, callback: ServiceCallback): void; - listSiteDetectors(resourceGroupName: string, siteName: string, diagnosticCategory: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + executeSiteDetector(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + executeSiteDetector(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, callback: ServiceCallback): void; + executeSiteDetector(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get Detector + * @summary List Site Detector Responses * - * Get Detector + * List Site Detector Responses * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category - * - * @param {string} detectorName Detector Name + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -5634,25 +6086,23 @@ export interface Diagnostics { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getSiteDetectorWithHttpOperationResponse(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listSiteDetectorResponsesSlotWithHttpOperationResponse(resourceGroupName: string, siteName: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get Detector + * @summary List Site Detector Responses * - * Get Detector + * List Site Detector Responses * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. * * @param {string} siteName Site Name * - * @param {string} diagnosticCategory Diagnostic Category - * - * @param {string} detectorName Detector Name + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -5666,7 +6116,7 @@ export interface Diagnostics { * * {Promise} A promise is returned. * - * @resolve {DiagnosticDetectorCollection} - The deserialized result object. + * @resolve {DetectorResponseCollection} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5674,23 +6124,23 @@ export interface Diagnostics { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DiagnosticDetectorCollection} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorCollection} for more + * {DetectorResponseCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getSiteDetector(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getSiteDetector(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, callback: ServiceCallback): void; - getSiteDetector(resourceGroupName: string, siteName: string, diagnosticCategory: string, detectorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listSiteDetectorResponsesSlot(resourceGroupName: string, siteName: string, slot: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSiteDetectorResponsesSlot(resourceGroupName: string, siteName: string, slot: string, callback: ServiceCallback): void; + listSiteDetectorResponsesSlot(resourceGroupName: string, siteName: string, slot: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Execute Detector + * @summary Get site detector response * - * Execute Detector + * Get site detector response * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -5699,7 +6149,7 @@ export interface Diagnostics { * * @param {string} detectorName Detector Resource Name * - * @param {string} diagnosticCategory Category Name + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -5714,16 +6164,16 @@ export interface Diagnostics { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - executeSiteDetectorWithHttpOperationResponse(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getSiteDetectorResponseSlotWithHttpOperationResponse(resourceGroupName: string, siteName: string, detectorName: string, slot: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Execute Detector + * @summary Get site detector response * - * Execute Detector + * Get site detector response * * @param {string} resourceGroupName Name of the resource group to which the * resource belongs. @@ -5732,7 +6182,7 @@ export interface Diagnostics { * * @param {string} detectorName Detector Resource Name * - * @param {string} diagnosticCategory Category Name + * @param {string} slot Slot Name * * @param {object} [options] Optional Parameters. * @@ -5752,7 +6202,7 @@ export interface Diagnostics { * * {Promise} A promise is returned. * - * @resolve {DiagnosticDetectorResponse} - The deserialized result object. + * @resolve {DetectorResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5760,17 +6210,16 @@ export interface Diagnostics { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DiagnosticDetectorResponse} [result] - The deserialized result object if an error did not occur. - * See {@link DiagnosticDetectorResponse} for more - * information. + * {DetectorResponse} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponse} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - executeSiteDetector(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - executeSiteDetector(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, callback: ServiceCallback): void; - executeSiteDetector(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getSiteDetectorResponseSlot(resourceGroupName: string, siteName: string, detectorName: string, slot: string, options?: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getSiteDetectorResponseSlot(resourceGroupName: string, siteName: string, detectorName: string, slot: string, callback: ServiceCallback): void; + getSiteDetectorResponseSlot(resourceGroupName: string, siteName: string, detectorName: string, slot: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6398,6 +6847,130 @@ export interface Diagnostics { executeSiteDetectorSlot(resourceGroupName: string, siteName: string, detectorName: string, diagnosticCategory: string, slot: string, options: { startTime? : Date, endTime? : Date, timeGrain? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listHostingEnvironmentDetectorResponsesNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Hosting Environment Detector Responses + * + * List Hosting Environment Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DetectorResponseCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listHostingEnvironmentDetectorResponsesNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listHostingEnvironmentDetectorResponsesNext(nextPageLink: string, callback: ServiceCallback): void; + listHostingEnvironmentDetectorResponsesNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listSiteDetectorResponsesNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DetectorResponseCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listSiteDetectorResponsesNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSiteDetectorResponsesNext(nextPageLink: string, callback: ServiceCallback): void; + listSiteDetectorResponsesNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Get Diagnostics Categories * @@ -6646,6 +7219,68 @@ export interface Diagnostics { getSiteDetectorNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listSiteDetectorResponsesSlotNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List Site Detector Responses + * + * List Site Detector Responses + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DetectorResponseCollection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DetectorResponseCollection} [result] - The deserialized result object if an error did not occur. + * See {@link DetectorResponseCollection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listSiteDetectorResponsesSlotNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSiteDetectorResponsesSlotNext(nextPageLink: string, callback: ServiceCallback): void; + listSiteDetectorResponsesSlotNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * @summary Get Diagnostics Categories *